leerness 1.9.378 → 1.9.380
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 +34 -0
- package/README.md +5 -5
- package/bin/harness.js +10 -15
- package/lib/catalogs.js +4 -1
- package/lib/pure-utils.js +20 -1
- package/package.json +1 -1
- package/scripts/e2e.js +41 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,39 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.9.380 — 2026-06-06 — UR-0025: REQUIRED_WORKSPACE_FILES 단일출처 (필수목록 3중 중복 제거)
|
|
4
|
+
|
|
5
|
+
**🧩 verify / migrate audit / migrate apply 가 각자 보유하던 동일 9-파일 필수목록을 catalogs 단일출처로 DRY.**
|
|
6
|
+
|
|
7
|
+
### 배경
|
|
8
|
+
필수 워크스페이스 파일 목록(9종)이 verify(6786)·migrateAuditCmd(6807)·migrateApplyCmd(6839) 에 **3중 복제**돼 있었음. 한 곳만 바뀌면 불일치 위험.
|
|
9
|
+
|
|
10
|
+
### 구현
|
|
11
|
+
1. **`REQUIRED_WORKSPACE_FILES`** → lib/catalogs.js (단일출처).
|
|
12
|
+
2. harness 3개 인라인 배열 → `const required = REQUIRED_WORKSPACE_FILES;` 로 교체(node 스크립트 결정적 교체, 내용 동일 확인).
|
|
13
|
+
3. 별도 4-파일 경량 체크(7511)는 다른 용도라 보존(중복 아님).
|
|
14
|
+
|
|
15
|
+
### 검증 (회귀 0)
|
|
16
|
+
- **selftest 125→126 PASS** (catalog 9파일 + reference equality + 3 사이트 const 사용).
|
|
17
|
+
- **E2E 324→325 PASS** (verify: init 통과 / AGENTS.md 누락 시 exit 1 + missing 메시지).
|
|
18
|
+
- 실측: verify init통과·누락실패, migrate audit missing-file 감지 정상.
|
|
19
|
+
|
|
20
|
+
## 1.9.379 — 2026-06-06 — UR-0025 심화: pulse 핸들러 렌더 코어 분리 (수집→렌더 패턴 착수)
|
|
21
|
+
|
|
22
|
+
**🧩 큰 핸들러 모듈화 착수 — display 핸들러의 "수집(I/O) → 렌더(순수)" 분리 패턴을 pulse 에 적용.**
|
|
23
|
+
|
|
24
|
+
### 배경
|
|
25
|
+
사용자 선택(큰 핸들러 모듈화/UR-0025 심화). 대형 I/O-결합 핸들러를 안전하게 분해하기 위해, **순수한 렌더/포맷 코어**를 lib/pure-utils 로 분리하고 핸들러는 gather(I/O)+순수 렌더 구조로 정리하는 패턴을 확립. 첫 대상: pulse(집계 display 핸들러).
|
|
26
|
+
|
|
27
|
+
### 구현
|
|
28
|
+
1. **`_memorySurface(counts)`**(pure-utils): T/D/R/P/L 카운트 → 문자열. pulse + memory-status 단일출처(중복 포맷 제거).
|
|
29
|
+
2. **`_renderPulseLine(data)`**(pure-utils): gather 된 data → 한 줄 요약 문자열(마일스톤/비정상종료 조건부 포함).
|
|
30
|
+
3. **pulseCmd**: 인라인 memory-surface 조합 + 한 줄 조합을 순수 코어 호출로 교체(gather 부분만 I/O 유지).
|
|
31
|
+
|
|
32
|
+
### 검증 (회귀 0)
|
|
33
|
+
- **selftest 124→125 PASS** (행위: `_memorySurface` 카운트→문자열, `_renderPulseLine` 기본/마일스톤/abnormal 분기 + pulse 와이어).
|
|
34
|
+
- **E2E 323→324 PASS** (행위: 빌더 동작 + pulse CLI 한 줄 출력 정규식 유지).
|
|
35
|
+
- 실측: pulse human/JSON 출력 동일.
|
|
36
|
+
|
|
3
37
|
## 1.9.378 — 2026-06-06 — UR-0073: 에이전트 팀 MCP 노출 (read-only list/preview)
|
|
4
38
|
|
|
5
39
|
**🧩 신규 team 서브시스템을 MCP 로 외부 AI 에 노출 — 에이전트 팀 비전을 외부 에이전트가 직접 활용.**
|
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.380 하네스를 사용합니다. 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.380는 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.378는 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.380)** · 매 라운드 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.380: 2026-06-06
|
|
588
588
|
<!-- leerness:project-readme:end -->
|
|
589
589
|
|
package/bin/harness.js
CHANGED
|
@@ -7,7 +7,7 @@ const cp = require('child_process');
|
|
|
7
7
|
const os = require('os'); // 1.9.178: _publishToNpm 에서 os.tmpdir() 사용 (전역 import)
|
|
8
8
|
const readline = require('readline');
|
|
9
9
|
// 1.9.274 (UR-0025 1단계): 순수 유틸 함수 모듈 분리 (require-based, 비파괴). selftest 7종이 동작 검증.
|
|
10
|
-
const { _isSecretKey, _isPlaceholderSecret, _looksSecretLike, _mergeLines, _mergeEnvLines, _mergeReadmeSection, _managedMerge, _parseSkillsValue, _parseArchiveBlocks, _parseSkillCatalog, _renderTeamsMd, _composeTeamPlan, _teamHandoffReminders, _cadenceAssessment, _teamDeployGate, _renderWorkspaceReferenceGuide, compareVer, parseHarnessVersion, _classifyCJK, _riskLabel, _detectSystemLang, _parseSlashFromHelp,
|
|
10
|
+
const { _isSecretKey, _isPlaceholderSecret, _looksSecretLike, _mergeLines, _mergeEnvLines, _mergeReadmeSection, _managedMerge, _parseSkillsValue, _parseArchiveBlocks, _parseSkillCatalog, _renderTeamsMd, _composeTeamPlan, _teamHandoffReminders, _cadenceAssessment, _teamDeployGate, _renderWorkspaceReferenceGuide, _memorySurface, _renderPulseLine, compareVer, parseHarnessVersion, _classifyCJK, _riskLabel, _detectSystemLang, _parseSlashFromHelp,
|
|
11
11
|
PERMISSION_TIERS, _tierRank, _requiredTier, _policyAllows, _resolveNpmTag, _mcpJsonContent, _newRunRecord,
|
|
12
12
|
_htmlToText, _extractTitle, _extractLinks,
|
|
13
13
|
_countDatedBlocks, _extractDecisionBlocks, _classifyIntent,
|
|
@@ -26,9 +26,9 @@ const { _isSecretKey, _isPlaceholderSecret, _looksSecretLike, _mergeLines, _merg
|
|
|
26
26
|
// 1.9.304 (UR-0025): 순수 분석/검증 함수 모듈 분리.
|
|
27
27
|
const { _evidenceQuality, _parseEvidenceStats, _shellGuardAnalyze, _claimFileInGit, _epistemicHonestyCheck } = require('../lib/analyzers');
|
|
28
28
|
// 1.9.295 (UR-0025 4단계): 정적 데이터 카탈로그 모듈 분리 (비파괴, require-based).
|
|
29
|
-
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, SKILL_CATALOG_PRESETS } = require('../lib/catalogs'); // 1.9.344/368/369 (UR-0025): catalog 분리 (MERGE_OVERWRITE_FILES/MINIMAL_SKIP_KEYS 포함)
|
|
29
|
+
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, SKILL_CATALOG_PRESETS } = require('../lib/catalogs'); // 1.9.344/368/369 (UR-0025): catalog 분리 (MERGE_OVERWRITE_FILES/MINIMAL_SKIP_KEYS 포함)
|
|
30
30
|
|
|
31
|
-
const VERSION = '1.9.
|
|
31
|
+
const VERSION = '1.9.380';
|
|
32
32
|
|
|
33
33
|
// 1.9.290 (UR-0037, Codex gpt-5.5 #4 수렴): CLI 전용 부작용은 require 시 실행하지 않는다.
|
|
34
34
|
// 이전: warning listener 제거 / NODE_OPTIONS 변경 / chcp IIFE 가 top-level 즉시 실행 → require('harness') 시 호스트 프로세스 오염.
|
|
@@ -3015,6 +3015,8 @@ function _selfTestCases() {
|
|
|
3015
3015
|
{ name: 'UR-0073 Phase D: _teamDeployGate 이중 게이트 (dry-run 기본/env 게이트/실행) 행위 (1.9.376)', run: () => { const m = require('../lib/pure-utils'); if (typeof _teamDeployGate !== 'function' || m._teamDeployGate !== _teamDeployGate) return false; const team = { id: 'd', deployCommand: 'echo hi' }; const noCmd = _teamDeployGate({ id: 'x' }, { yes: true, envOn: true }).mode === 'no-command'; const dry = _teamDeployGate(team, { yes: false, envOn: true }).mode === 'dry-run'; const gated = _teamDeployGate(team, { yes: true, envOn: false }).mode === 'gated'; const exec = _teamDeployGate(team, { yes: true, envOn: true }).mode === 'execute'; return noCmd && dry && gated && exec; } },
|
|
3016
3016
|
{ name: 'UR-0025: _renderWorkspaceReferenceGuide 모듈 분리 + 빌더 동작 (1.9.377)', run: () => { const m = require('../lib/pure-utils'); if (typeof _renderWorkspaceReferenceGuide !== 'function' || m._renderWorkspaceReferenceGuide !== _renderWorkspaceReferenceGuide) return false; const g = _renderWorkspaceReferenceGuide('.leerness', '9.9.9', '2026-01-01T00:00:00.000Z'); const wrapperThin = read(__filename).includes('return _renderWorkspaceReferenceGuide(dirName, VERSION, new Date().toISOString())'); return g.includes('.leerness/progress-tracker.md') && g.includes('9.9.9') && g.includes('자주 묻는 위치') && g.includes('마이그레이션 안내') && wrapperThin; } },
|
|
3017
3017
|
{ name: 'UR-0073: team MCP 도구 2종(read-only) 정의 + dispatch 와이어 (1.9.378)', run: () => { const tools = require('../lib/mcp-tools'); const src = read(__filename); const tl = tools.find(t => t.name === 'leerness_team_list'); const tp = tools.find(t => t.name === 'leerness_team_preview'); const defsOk = tl && tl.requiredTier === 'read-only' && tp && tp.requiredTier === 'read-only' && tp.inputSchema.required && tp.inputSchema.required.includes('id'); const wired = src.includes("case " + "'leerness_team_list':") && src.includes("case " + "'leerness_team_preview':") && /cliArgs = \['team', 'list'/.test(src) && /cliArgs = \['team', 'preview'/.test(src); return !!defsOk && wired; } },
|
|
3018
|
+
{ name: 'UR-0025 심화: pulse 렌더 코어 분리 — _memorySurface + _renderPulseLine 행위 (1.9.379)', run: () => { const m = require('../lib/pure-utils'); if (typeof _memorySurface !== 'function' || typeof _renderPulseLine !== 'function' || m._memorySurface !== _memorySurface || m._renderPulseLine !== _renderPulseLine) return false; const ms = _memorySurface({ tasks: 1, decisions: 2, rules: 3, milestones: 4, lessons: 5 }) === 'T1/D2/R3/P4/L5' && _memorySurface({}) === 'T0/D0/R0/P0/L0'; const base = _renderPulseLine({ version: '1.0.0', roundCount: 7, mcpTools: 85, memorySurface: 'T0/D1/R0/P2/L0' }); const ln = base.includes('v1.0.0') && base.includes('R7') && base.includes('MCP 85') && base.includes('T0/D1/R0/P2/L0') && !base.includes('🎯') && !base.includes('abnormal'); const full = _renderPulseLine({ version: '1.0.0', roundCount: 7, mcpTools: 85, memorySurface: 'x', nextMilestone: 400, etaDays: 6, abnormalShutdown: 'high' }); const ln2 = full.includes('🎯 R400 (6d)') && full.includes('abnormal:high'); const wired = read(__filename).includes('const line = _renderPulseLine(data)') && read(__filename).includes('data.memorySurface = _memorySurface('); return ms && ln && ln2 && wired; } },
|
|
3019
|
+
{ name: 'UR-0025: REQUIRED_WORKSPACE_FILES 단일출처 — verify/migrate audit·apply 3중 중복 제거 (1.9.380)', run: () => { const c = require('../lib/catalogs'); if (REQUIRED_WORKSPACE_FILES !== c.REQUIRED_WORKSPACE_FILES) return false; const listOk = Array.isArray(c.REQUIRED_WORKSPACE_FILES) && c.REQUIRED_WORKSPACE_FILES.length === 9 && c.REQUIRED_WORKSPACE_FILES.includes('AGENTS.md') && c.REQUIRED_WORKSPACE_FILES.includes('.harness/plan.md'); const usesConst = (read(__filename).match(/const required = REQUIRED_WORKSPACE_FILES;/g) || []).length >= 3; return listOk && usesConst; } },
|
|
3018
3020
|
{ name: 'VERSION 형식 (x.y.z)', run: () => /^\d+\.\d+\.\d+$/.test(VERSION) }
|
|
3019
3021
|
];
|
|
3020
3022
|
}
|
|
@@ -3501,7 +3503,7 @@ function pulseCmd(root) {
|
|
|
3501
3503
|
const planText = exists(planPath(root)) ? read(planPath(root)) : '';
|
|
3502
3504
|
const milestonesCnt = (planText.match(/^### M-\d{4}\./gm) || []).length;
|
|
3503
3505
|
const lessonsCount = _loadLessons(root).length;
|
|
3504
|
-
data.memorySurface =
|
|
3506
|
+
data.memorySurface = _memorySurface({ tasks: tasksInProgress, decisions: decisionCount, rules: rulesActive, milestones: milestonesCnt, lessons: lessonsCount });
|
|
3505
3507
|
} catch {}
|
|
3506
3508
|
// 마일스톤 + ETA
|
|
3507
3509
|
try {
|
|
@@ -3522,14 +3524,7 @@ function pulseCmd(root) {
|
|
|
3522
3524
|
}
|
|
3523
3525
|
if (has('--json')) { log(JSON.stringify(data, null, 2)); return; }
|
|
3524
3526
|
// 한 줄 출력
|
|
3525
|
-
|
|
3526
|
-
if (data.nextMilestone) {
|
|
3527
|
-
const eta = data.etaDays != null ? ` (${data.etaDays}d)` : '';
|
|
3528
|
-
line += ` · 🎯 R${data.nextMilestone}${eta}`;
|
|
3529
|
-
}
|
|
3530
|
-
if (data.abnormalShutdown !== 'none') {
|
|
3531
|
-
line += ` · 🔌 abnormal:${data.abnormalShutdown}`;
|
|
3532
|
-
}
|
|
3527
|
+
const line = _renderPulseLine(data);
|
|
3533
3528
|
log(cy(`# leerness pulse (1.9.231/1.9.232) — 한 줄 종합 요약`));
|
|
3534
3529
|
log('');
|
|
3535
3530
|
log(` ${line}`);
|
|
@@ -6789,7 +6784,7 @@ function status(root) {
|
|
|
6789
6784
|
function verify(root) {
|
|
6790
6785
|
root = absRoot(root);
|
|
6791
6786
|
let bad = 0;
|
|
6792
|
-
const required =
|
|
6787
|
+
const required = REQUIRED_WORKSPACE_FILES; // 1.9.380 (UR-0025): lib/catalogs 단일출처
|
|
6793
6788
|
for (const f of required) { if (!exists(path.join(root,f))) { bad++; fail(`missing: ${f}`); } }
|
|
6794
6789
|
const g = exists(path.join(root,'.harness/guideline.md')) ? read(path.join(root,'.harness/guideline.md')) : '';
|
|
6795
6790
|
if (!g.includes('plan.md') || !g.includes('progress-tracker.md')) { bad++; fail('guideline.md must reference plan.md and progress-tracker.md'); }
|
|
@@ -6810,7 +6805,7 @@ function migrateAuditCmd(root, opts = {}) {
|
|
|
6810
6805
|
if (exists(decisionsPath(root)) && !exists(decisionsJsonPath(root)) && _loadDecisions(root).length > 0) findings.push({ kind: 'canonical-pending', detail: 'decisions.md → decisions.json 백필 예정', action: 'decision add/drop 또는 migrate 시 자동' });
|
|
6811
6806
|
if (exists(lessonsPath(root)) && !exists(lessonsJsonPath(root)) && _loadLessons(root).length > 0) findings.push({ kind: 'canonical-pending', detail: 'lessons.md → lessons.json 백필 예정', action: 'lesson save/drop 또는 migrate 시 자동' });
|
|
6812
6807
|
// 누락 예상 파일 (현재 버전 required set 기준)
|
|
6813
|
-
const required =
|
|
6808
|
+
const required = REQUIRED_WORKSPACE_FILES; // 1.9.380 (UR-0025): lib/catalogs 단일출처
|
|
6814
6809
|
for (const f of required) if (!exists(path.join(root, f))) findings.push({ kind: 'missing-file', detail: f, action: 'migrate 가 생성' });
|
|
6815
6810
|
if (opts.json) { log(JSON.stringify({ version: VERSION, root, projectVersion: projVer, willChange: findings.length, findings }, null, 2)); return; }
|
|
6816
6811
|
log(`# leerness migrate audit (1.9.356, UR-0075 dry-run) — 실제 변경 없음`);
|
|
@@ -6842,7 +6837,7 @@ function migrateApplyCmd(root, opts = {}) {
|
|
|
6842
6837
|
const projVer = exists(hvPath) ? read(hvPath).trim() : null;
|
|
6843
6838
|
if (!projVer) skipped.push({ kind: 'no-version', detail: 'HARNESS_VERSION 없음', reason: `leerness migrate --path ${root}` });
|
|
6844
6839
|
else if (compareVer(projVer, VERSION) < 0) skipped.push({ kind: 'version-drift', detail: `${projVer} → ${VERSION}`, reason: `leerness update --yes --path ${root}` });
|
|
6845
|
-
const required =
|
|
6840
|
+
const required = REQUIRED_WORKSPACE_FILES; // 1.9.380 (UR-0025): lib/catalogs 단일출처
|
|
6846
6841
|
for (const f of required) if (!exists(path.join(root, f))) skipped.push({ kind: 'missing-file', detail: f, reason: 'leerness migrate / init' });
|
|
6847
6842
|
if (opts.json) { log(JSON.stringify({ version: VERSION, root, dryRun: !apply, appliedCount: apply ? applied.length : 0, applied, skipped }, null, 2)); return; }
|
|
6848
6843
|
log(`# leerness migrate apply (1.9.357, UR-0075 Phase C)${apply ? '' : ' — dry-run (변경 없음 · --yes 로 적용)'}`);
|
package/lib/catalogs.js
CHANGED
|
@@ -398,6 +398,9 @@ const MERGE_OVERWRITE_FILES = new Set([
|
|
|
398
398
|
'.harness/context-routing.md'
|
|
399
399
|
]);
|
|
400
400
|
|
|
401
|
+
// 1.9.380 (UR-0025): 워크스페이스 필수 파일 — verify / migrate audit / migrate apply 단일출처 (harness 3중 중복 제거).
|
|
402
|
+
const REQUIRED_WORKSPACE_FILES = ['.harness/plan.md', '.harness/progress-tracker.md', '.harness/guideline.md', '.harness/protected-files.md', '.harness/design-system.md', '.harness/anti-lazy-work-policy.md', '.harness/session-handoff.md', '.harness/current-state.md', 'AGENTS.md'];
|
|
403
|
+
|
|
401
404
|
// 1.9.369 (UR-0025): init --minimal 시 제외하는 키 — 코어 워크플로(handoff/verify/audit/session close)가 요구하지 않는 파일만. harness 에서 분리.
|
|
402
405
|
const MINIMAL_SKIP_KEYS = new Set([
|
|
403
406
|
'.cursor/rules/leerness.mdc', '.github/copilot-instructions.md',
|
|
@@ -419,4 +422,4 @@ const SKILL_CATALOG_PRESETS = {
|
|
|
419
422
|
homepage: 'https://github.com/anthropics/skills' }
|
|
420
423
|
};
|
|
421
424
|
|
|
422
|
-
module.exports = { 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, SKILL_CATALOG_PRESETS };
|
|
425
|
+
module.exports = { 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, SKILL_CATALOG_PRESETS };
|
package/lib/pure-utils.js
CHANGED
|
@@ -855,11 +855,30 @@ function _renderWorkspaceReferenceGuide(dirName, version, generatedAt) {
|
|
|
855
855
|
return lines.join('\n');
|
|
856
856
|
}
|
|
857
857
|
|
|
858
|
+
// 1.9.379 (UR-0025 심화): Memory Surface 포맷 (순수) — T/D/R/P/L 카운트 → 문자열. pulse/memory-status 단일출처.
|
|
859
|
+
function _memorySurface(counts) {
|
|
860
|
+
const c = counts || {};
|
|
861
|
+
return `T${c.tasks || 0}/D${c.decisions || 0}/R${c.rules || 0}/P${c.milestones || 0}/L${c.lessons || 0}`;
|
|
862
|
+
}
|
|
863
|
+
// 1.9.379 (UR-0025 심화): pulse 한 줄 요약 조합 (순수) — gather(I/O)된 data → 한 줄 문자열. pulse 핸들러 렌더 코어.
|
|
864
|
+
function _renderPulseLine(data) {
|
|
865
|
+
const d = data || {};
|
|
866
|
+
let line = `📍 v${d.version} · 🔄 R${d.roundCount} · 🔌 MCP ${d.mcpTools} · 🧠 ${d.memorySurface}`;
|
|
867
|
+
if (d.nextMilestone) {
|
|
868
|
+
const eta = d.etaDays != null ? ` (${d.etaDays}d)` : '';
|
|
869
|
+
line += ` · 🎯 R${d.nextMilestone}${eta}`;
|
|
870
|
+
}
|
|
871
|
+
if (d.abnormalShutdown && d.abnormalShutdown !== 'none') {
|
|
872
|
+
line += ` · 🔌 abnormal:${d.abnormalShutdown}`;
|
|
873
|
+
}
|
|
874
|
+
return line;
|
|
875
|
+
}
|
|
876
|
+
|
|
858
877
|
module.exports = {
|
|
859
878
|
_isSecretKey, compareVer, parseHarnessVersion,
|
|
860
879
|
_isPlaceholderSecret, _looksSecretLike,
|
|
861
880
|
_mergeLines, _mergeEnvLines, _mergeReadmeSection, _managedMerge, _parseSkillsValue,
|
|
862
|
-
_parseArchiveBlocks, _parseSkillCatalog, _renderTeamsMd, _composeTeamPlan, _teamHandoffReminders, _cadenceAssessment, _teamDeployGate, _renderWorkspaceReferenceGuide,
|
|
881
|
+
_parseArchiveBlocks, _parseSkillCatalog, _renderTeamsMd, _composeTeamPlan, _teamHandoffReminders, _cadenceAssessment, _teamDeployGate, _renderWorkspaceReferenceGuide, _memorySurface, _renderPulseLine,
|
|
863
882
|
_classifyCJK, _riskLabel, _detectSystemLang, _parseSlashFromHelp,
|
|
864
883
|
// 1.9.283 (UR-0025 2단계)
|
|
865
884
|
PERMISSION_TIERS, _tierRank, _requiredTier, _policyAllows, _resolveNpmTag, _mcpJsonContent, _newRunRecord,
|
package/package.json
CHANGED
package/scripts/e2e.js
CHANGED
|
@@ -5232,5 +5232,46 @@ total++;
|
|
|
5232
5232
|
if (!ok) failed++;
|
|
5233
5233
|
}
|
|
5234
5234
|
|
|
5235
|
+
// 1.9.379 회귀 (UR-0025 심화): pulse 렌더 코어(_memorySurface/_renderPulseLine) 분리 — 빌더 동작 + pulse CLI 출력 유지
|
|
5236
|
+
total++;
|
|
5237
|
+
{
|
|
5238
|
+
let ok = false;
|
|
5239
|
+
try {
|
|
5240
|
+
const pu = require(path.resolve(__dirname, '..', 'lib', 'pure-utils'));
|
|
5241
|
+
const msOk = pu._memorySurface({ tasks: 1, decisions: 2, rules: 3, milestones: 4, lessons: 5 }) === 'T1/D2/R3/P4/L5';
|
|
5242
|
+
const lnOk = pu._renderPulseLine({ version: '1.0.0', roundCount: 7, mcpTools: 9, memorySurface: 'T0/D0/R0/P0/L0', nextMilestone: 400, etaDays: 6 }).includes('🎯 R400 (6d)');
|
|
5243
|
+
// pulse CLI 가 한 줄 출력 유지
|
|
5244
|
+
const d = fs.mkdtempSync(path.join(os.tmpdir(), 'leerness-pulse-'));
|
|
5245
|
+
cp.spawnSync(process.execPath, [CLI, 'init', d, '--yes', '--language', 'ko'], { encoding: 'utf8', timeout: 30000 });
|
|
5246
|
+
const r = cp.spawnSync(process.execPath, [CLI, 'pulse', d], { encoding: 'utf8', timeout: 15000 });
|
|
5247
|
+
const cliOk = /📍 v[\d.]+ · 🔄 R\d+ · 🔌 MCP \d+ · 🧠 T\d+\/D\d+\/R\d+\/P\d+\/L\d+/.test(r.stdout || '');
|
|
5248
|
+
fs.rmSync(d, { recursive: true, force: true });
|
|
5249
|
+
ok = msOk && lnOk && cliOk;
|
|
5250
|
+
} catch {}
|
|
5251
|
+
console.log(ok ? '✓ B(1.9.379) UR-0025 심화: pulse 렌더 코어 분리 (_memorySurface/_renderPulseLine + CLI 출력 유지)' : '✗ pulse 렌더 코어 실패');
|
|
5252
|
+
if (!ok) failed++;
|
|
5253
|
+
}
|
|
5254
|
+
|
|
5255
|
+
// 1.9.380 회귀 (UR-0025): REQUIRED_WORKSPACE_FILES 단일출처 — verify 가 catalog 리스트로 init통과/누락실패
|
|
5256
|
+
total++;
|
|
5257
|
+
{
|
|
5258
|
+
let ok = false;
|
|
5259
|
+
try {
|
|
5260
|
+
const c = require(path.resolve(__dirname, '..', 'lib', 'catalogs'));
|
|
5261
|
+
const catOk = Array.isArray(c.REQUIRED_WORKSPACE_FILES) && c.REQUIRED_WORKSPACE_FILES.length === 9 && c.REQUIRED_WORKSPACE_FILES.includes('AGENTS.md');
|
|
5262
|
+
const d = fs.mkdtempSync(path.join(os.tmpdir(), 'leerness-req-'));
|
|
5263
|
+
cp.spawnSync(process.execPath, [CLI, 'init', d, '--yes', '--language', 'ko'], { encoding: 'utf8', timeout: 30000 });
|
|
5264
|
+
const r1 = cp.spawnSync(process.execPath, [CLI, 'verify', d], { encoding: 'utf8', timeout: 15000 });
|
|
5265
|
+
const passOk = r1.status === 0;
|
|
5266
|
+
fs.rmSync(path.join(d, 'AGENTS.md'), { force: true });
|
|
5267
|
+
const r2 = cp.spawnSync(process.execPath, [CLI, 'verify', d], { encoding: 'utf8', timeout: 15000 });
|
|
5268
|
+
const failOk = r2.status === 1 && /missing: AGENTS\.md/.test((r2.stdout || '') + (r2.stderr || ''));
|
|
5269
|
+
fs.rmSync(d, { recursive: true, force: true });
|
|
5270
|
+
ok = catOk && passOk && failOk;
|
|
5271
|
+
} catch {}
|
|
5272
|
+
console.log(ok ? '✓ B(1.9.380) UR-0025: REQUIRED_WORKSPACE_FILES 단일출처 (verify init통과/누락실패)' : '✗ required files 단일출처 실패');
|
|
5273
|
+
if (!ok) failed++;
|
|
5274
|
+
}
|
|
5275
|
+
|
|
5235
5276
|
console.log(`\nE2E result: ${total - failed}/${total} passed · ${((Date.now() - _e2eStart) / 1000).toFixed(0)}s`);
|
|
5236
5277
|
if (failed > 0) process.exit(1);
|