maskweaver 0.9.4 → 0.9.6
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/README.ko.md +638 -592
- package/README.md +671 -667
- package/dist/cli/doctor.js +5 -21
- package/dist/cli/install.d.ts +0 -8
- package/dist/cli/install.js +0 -39
- package/dist/context/config.d.ts +0 -22
- package/dist/context/config.js +0 -28
- package/dist/context/feature.d.ts +0 -39
- package/dist/context/feature.js +0 -77
- package/dist/context/files.d.ts +0 -13
- package/dist/context/files.js +1 -24
- package/dist/context/index.d.ts +0 -7
- package/dist/context/index.js +0 -12
- package/dist/context/project.d.ts +0 -21
- package/dist/context/project.js +0 -30
- package/dist/context/types.d.ts +0 -48
- package/dist/context/types.js +0 -12
- package/dist/context/utils.d.ts +0 -18
- package/dist/context/utils.js +0 -27
- package/dist/core/engine/promptBuilder.d.ts +0 -17
- package/dist/core/engine/promptBuilder.js +0 -28
- package/dist/core/index.d.ts +0 -6
- package/dist/core/index.js +0 -9
- package/dist/core/loader/MaskLoader.d.ts +0 -23
- package/dist/core/loader/MaskLoader.js +0 -29
- package/dist/core/schema/types.d.ts +0 -47
- package/dist/core/schema/types.js +0 -6
- package/dist/core/schema/validator.d.ts +0 -14
- package/dist/core/schema/validator.js +0 -18
- package/dist/i18n/index.d.ts +0 -18
- package/dist/i18n/index.js +4 -23
- package/dist/index.d.ts +0 -8
- package/dist/index.js +0 -8
- package/dist/lib.d.ts +0 -5
- package/dist/lib.js +0 -12
- package/dist/memory/chunking.d.ts +0 -22
- package/dist/memory/chunking.js +2 -37
- package/dist/memory/core.d.ts +0 -29
- package/dist/memory/core.js +1 -52
- package/dist/memory/index.d.ts +0 -5
- package/dist/memory/index.js +0 -10
- package/dist/memory/indexer.d.ts +0 -21
- package/dist/memory/indexer.js +0 -44
- package/dist/memory/providers/examples.d.ts +0 -5
- package/dist/memory/providers/examples.js +4 -64
- package/dist/memory/providers/factory.d.ts +0 -44
- package/dist/memory/providers/factory.js +0 -46
- package/dist/memory/providers/index.d.ts +0 -26
- package/dist/memory/providers/index.js +0 -28
- package/dist/memory/providers/ollama.d.ts +0 -6
- package/dist/memory/providers/ollama.js +1 -8
- package/dist/memory/providers/openai.d.ts +0 -6
- package/dist/memory/providers/openai.js +1 -8
- package/dist/memory/providers/openrouter.d.ts +0 -6
- package/dist/memory/providers/openrouter.js +0 -8
- package/dist/memory/providers/text-only.d.ts +0 -13
- package/dist/memory/providers/text-only.js +0 -17
- package/dist/memory/providers/types.d.ts +0 -39
- package/dist/memory/providers/types.js +0 -7
- package/dist/memory/providers/voyage.d.ts +0 -22
- package/dist/memory/providers/voyage.js +1 -24
- package/dist/memory/search/hybrid.d.ts +0 -12
- package/dist/memory/search/hybrid.js +1 -22
- package/dist/memory/store/sqlite.d.ts +0 -72
- package/dist/memory/store/sqlite.js +4 -127
- package/dist/plugin/config/index.d.ts +0 -112
- package/dist/plugin/config/index.js +0 -115
- package/dist/plugin/index.d.ts +0 -13
- package/dist/plugin/index.js +1 -123
- package/dist/plugin/tools/command-registry.d.ts +0 -6
- package/dist/plugin/tools/command-registry.js +0 -14
- package/dist/plugin/tools/context.d.ts +0 -12
- package/dist/plugin/tools/context.js +0 -58
- package/dist/plugin/tools/maskSave.d.ts +0 -3
- package/dist/plugin/tools/maskSave.js +0 -3
- package/dist/plugin/tools/memoryGet.d.ts +0 -3
- package/dist/plugin/tools/memoryGet.js +0 -3
- package/dist/plugin/tools/memoryIndexer.d.ts +0 -3
- package/dist/plugin/tools/memoryIndexer.js +0 -10
- package/dist/plugin/tools/memorySearch.d.ts +0 -31
- package/dist/plugin/tools/memorySearch.js +0 -79
- package/dist/plugin/tools/memoryWrite.d.ts +0 -8
- package/dist/plugin/tools/memoryWrite.js +0 -32
- package/dist/plugin/tools/retrospect.d.ts +0 -3
- package/dist/plugin/tools/retrospect.js +0 -3
- package/dist/plugin/tools/slashcommand.d.ts +0 -11
- package/dist/plugin/tools/slashcommand.js +0 -38
- package/dist/plugin/tools/squad.d.ts +0 -12
- package/dist/plugin/tools/squad.js +11 -83
- package/dist/plugin/tools/weave.d.ts +0 -6
- package/dist/plugin/tools/weave.js +0 -78
- package/dist/plugin/types.d.ts +0 -20
- package/dist/plugin/types.js +0 -7
- package/dist/retrospect/index.d.ts +0 -7
- package/dist/retrospect/index.js +0 -9
- package/dist/retrospect/mask-save.d.ts +0 -12
- package/dist/retrospect/mask-save.js +1 -80
- package/dist/retrospect/retrospect.d.ts +0 -18
- package/dist/retrospect/retrospect.js +0 -63
- package/dist/retrospect/strategies/base.d.ts +0 -15
- package/dist/retrospect/strategies/base.js +0 -7
- package/dist/retrospect/strategies/deep.d.ts +0 -12
- package/dist/retrospect/strategies/deep.js +0 -24
- package/dist/retrospect/strategies/index.d.ts +0 -12
- package/dist/retrospect/strategies/index.js +0 -12
- package/dist/retrospect/strategies/quick.d.ts +0 -12
- package/dist/retrospect/strategies/quick.js +0 -19
- package/dist/retrospect/strategies/standard.d.ts +0 -12
- package/dist/retrospect/strategies/standard.js +0 -15
- package/dist/retrospect/types.d.ts +0 -7
- package/dist/retrospect/types.js +0 -7
- package/dist/shared/config.d.ts +0 -105
- package/dist/shared/config.js +0 -33
- package/dist/shared/errors.d.ts +0 -18
- package/dist/shared/errors.js +0 -19
- package/dist/shared/generate-agents.d.ts +0 -69
- package/dist/shared/generate-agents.js +2 -86
- package/dist/shared/image.d.ts +0 -67
- package/dist/shared/image.js +6 -104
- package/dist/shared/index.d.ts +0 -5
- package/dist/shared/index.js +0 -7
- package/dist/shared/model-registry.d.ts +0 -72
- package/dist/shared/model-registry.js +5 -95
- package/dist/shared/types.d.ts +0 -15
- package/dist/shared/types.js +0 -3
- package/dist/shared-context/dag.d.ts +0 -105
- package/dist/shared-context/dag.js +3 -114
- package/dist/shared-context/index.d.ts +0 -5
- package/dist/shared-context/index.js +0 -15
- package/dist/shared-context/logger.d.ts +0 -37
- package/dist/shared-context/logger.js +0 -41
- package/dist/shared-context/parallel-executor.d.ts +0 -54
- package/dist/shared-context/parallel-executor.js +4 -56
- package/dist/shared-context/session.d.ts +0 -56
- package/dist/shared-context/session.js +0 -47
- package/dist/shared-context/squad.d.ts +0 -68
- package/dist/shared-context/squad.js +0 -63
- package/dist/shared-context/storage.d.ts +0 -132
- package/dist/shared-context/storage.js +0 -116
- package/dist/shared-context/task.d.ts +0 -120
- package/dist/shared-context/task.js +0 -152
- package/dist/shared-context/test/dag.test.js +9 -14
- package/dist/shared-context/test/logger.test.d.ts +0 -8
- package/dist/shared-context/test/logger.test.js +0 -52
- package/dist/shared-context/test/session.test.d.ts +0 -7
- package/dist/shared-context/test/session.test.js +0 -63
- package/dist/shared-context/test/squad.test.d.ts +0 -10
- package/dist/shared-context/test/squad.test.js +2 -68
- package/dist/shared-context/test/storage.test.d.ts +0 -8
- package/dist/shared-context/test/storage.test.js +0 -68
- package/dist/shared-context/test/task.test.d.ts +0 -7
- package/dist/shared-context/test/task.test.js +0 -54
- package/dist/shared-context/test/watchdog.test.d.ts +0 -7
- package/dist/shared-context/test/watchdog.test.js +3 -58
- package/dist/shared-context/types.d.ts +0 -215
- package/dist/shared-context/types.js +0 -125
- package/dist/shared-context/watchdog.d.ts +0 -127
- package/dist/shared-context/watchdog.js +0 -148
- package/dist/shared-context/worktree.d.ts +0 -68
- package/dist/shared-context/worktree.js +2 -34
- package/dist/verify/budget.d.ts +0 -29
- package/dist/verify/budget.js +0 -34
- package/dist/verify/critical-files.d.ts +0 -17
- package/dist/verify/critical-files.js +0 -37
- package/dist/verify/escalation.d.ts +0 -20
- package/dist/verify/escalation.js +0 -22
- package/dist/verify/index.d.ts +0 -5
- package/dist/verify/index.js +0 -11
- package/dist/verify/prompts.d.ts +0 -20
- package/dist/verify/prompts.js +0 -20
- package/dist/verify/types.d.ts +0 -26
- package/dist/verify/types.js +1 -12
- package/dist/verify/verifier.d.ts +0 -29
- package/dist/verify/verifier.js +0 -54
- package/dist/version.d.ts +1 -16
- package/dist/version.js +1 -16
- package/dist/weave/bridge.d.ts +0 -35
- package/dist/weave/bridge.js +0 -51
- package/dist/weave/environment/detector.d.ts +0 -6
- package/dist/weave/environment/detector.js +4 -45
- package/dist/weave/environment/index.d.ts +0 -19
- package/dist/weave/environment/index.js +1 -39
- package/dist/weave/environment/issues.d.ts +0 -35
- package/dist/weave/environment/issues.js +0 -59
- package/dist/weave/git.d.ts +0 -8
- package/dist/weave/git.js +0 -8
- package/dist/weave/index.d.ts +0 -13
- package/dist/weave/index.js +2 -28
- package/dist/weave/knowledge/global.d.ts +0 -39
- package/dist/weave/knowledge/global.js +2 -78
- package/dist/weave/loop.js +0 -3
- package/dist/weave/orchestrator.d.ts +0 -69
- package/dist/weave/orchestrator.js +1 -101
- package/dist/weave/phase-manager.d.ts +0 -64
- package/dist/weave/phase-manager.js +0 -89
- package/dist/weave/security/secret-scan.d.ts +0 -14
- package/dist/weave/security/secret-scan.js +0 -19
- package/dist/weave/stages/build.js +0 -15
- package/dist/weave/stages/execute.d.ts +0 -42
- package/dist/weave/stages/execute.js +4 -86
- package/dist/weave/stages/handoff.d.ts +0 -7
- package/dist/weave/stages/handoff.js +0 -43
- package/dist/weave/stages/index.d.ts +0 -3
- package/dist/weave/stages/index.js +0 -3
- package/dist/weave/stages/intake.d.ts +0 -8
- package/dist/weave/stages/intake.js +5 -65
- package/dist/weave/stages/map.d.ts +0 -1
- package/dist/weave/stages/openspec.d.ts +0 -1
- package/dist/weave/stages/plan.d.ts +0 -11
- package/dist/weave/stages/plan.js +1 -53
- package/dist/weave/stages/refine.d.ts +0 -7
- package/dist/weave/stages/refine.js +0 -7
- package/dist/weave/stages/research.d.ts +0 -6
- package/dist/weave/stages/research.js +0 -6
- package/dist/weave/stages/spec.d.ts +0 -12
- package/dist/weave/stages/spec.js +0 -17
- package/dist/weave/types.d.ts +0 -20
- package/dist/weave/types.js +0 -5
- package/dist/weave/verification/commands.d.ts +0 -12
- package/dist/weave/verification/commands.js +0 -19
- package/dist/weave/verification/index.d.ts +0 -6
- package/dist/weave/verification/index.js +1 -19
- package/dist/weave/verification/playwright.d.ts +0 -47
- package/dist/weave/verification/playwright.js +1 -90
- package/dist/weave/worktree.d.ts +0 -16
- package/dist/weave/worktree.js +0 -23
- package/dist/weave/yaml-repair.d.ts +0 -39
- package/dist/weave/yaml-repair.js +13 -116
- package/package.json +1 -1
|
@@ -1,42 +1,16 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Retrospect Core
|
|
3
|
-
*
|
|
4
|
-
* 회고 시스템의 메인 로직
|
|
5
|
-
*
|
|
6
|
-
* "Each function has one clear purpose" - Kent Beck
|
|
7
|
-
*/
|
|
8
1
|
import { join } from 'path';
|
|
9
2
|
import { existsSync, readFileSync, writeFileSync, mkdirSync } from 'fs';
|
|
10
3
|
import { selectStrategy } from './strategies/index.js';
|
|
11
|
-
// ============================================================================
|
|
12
|
-
// Constants
|
|
13
|
-
// ============================================================================
|
|
14
4
|
const RETROSPECT_SECTION_HEADER = '## 회고 기록';
|
|
15
|
-
// ============================================================================
|
|
16
|
-
// Path Utilities
|
|
17
|
-
// ============================================================================
|
|
18
|
-
/**
|
|
19
|
-
* 메모리 경로 반환
|
|
20
|
-
*/
|
|
21
5
|
function getMemoryPath(type, basePath) {
|
|
22
6
|
return join(basePath, '.opencode', 'memory', `${type.toUpperCase()}.md`);
|
|
23
7
|
}
|
|
24
|
-
/**
|
|
25
|
-
* DB 경로 반환
|
|
26
|
-
*/
|
|
27
8
|
function getDbPath(basePath) {
|
|
28
9
|
return join(basePath, '.opencode', 'memory', 'memory.db');
|
|
29
10
|
}
|
|
30
|
-
// ============================================================================
|
|
31
|
-
// File Operations
|
|
32
|
-
// ============================================================================
|
|
33
|
-
/**
|
|
34
|
-
* RETROSPECT.md 파일 읽기
|
|
35
|
-
*/
|
|
36
11
|
function readRetrospectFile(basePath) {
|
|
37
12
|
const retrospectPath = getMemoryPath('retrospect', basePath);
|
|
38
13
|
if (!existsSync(retrospectPath)) {
|
|
39
|
-
// 기본 템플릿 반환
|
|
40
14
|
return `# 회고록 (Retrospective Journal)
|
|
41
15
|
|
|
42
16
|
이 파일은 가면술사의 회고와 성찰을 기록합니다.
|
|
@@ -50,9 +24,6 @@ ${RETROSPECT_SECTION_HEADER}
|
|
|
50
24
|
}
|
|
51
25
|
return readFileSync(retrospectPath, 'utf-8');
|
|
52
26
|
}
|
|
53
|
-
/**
|
|
54
|
-
* RETROSPECT.md 파일 쓰기
|
|
55
|
-
*/
|
|
56
27
|
function writeRetrospectFile(basePath, content) {
|
|
57
28
|
const retrospectPath = getMemoryPath('retrospect', basePath);
|
|
58
29
|
const dir = join(basePath, '.opencode', 'memory');
|
|
@@ -61,12 +32,6 @@ function writeRetrospectFile(basePath, content) {
|
|
|
61
32
|
}
|
|
62
33
|
writeFileSync(retrospectPath, content, 'utf-8');
|
|
63
34
|
}
|
|
64
|
-
/**
|
|
65
|
-
* 회고 내용을 파일에 추가
|
|
66
|
-
*
|
|
67
|
-
* 회고 기록 섹션 바로 다음에 새 회고를 추가합니다.
|
|
68
|
-
* (최신 회고가 위에 오도록)
|
|
69
|
-
*/
|
|
70
35
|
function appendRetrospect(content, retrospectContent) {
|
|
71
36
|
const sectionIndex = content.indexOf(RETROSPECT_SECTION_HEADER);
|
|
72
37
|
if (sectionIndex !== -1) {
|
|
@@ -75,30 +40,19 @@ function appendRetrospect(content, retrospectContent) {
|
|
|
75
40
|
const after = content.slice(insertPosition);
|
|
76
41
|
return `${before}\n\n${retrospectContent}${after}`;
|
|
77
42
|
}
|
|
78
|
-
// 섹션이 없으면 끝에 추가
|
|
79
43
|
return `${content}\n${RETROSPECT_SECTION_HEADER}\n\n${retrospectContent}`;
|
|
80
44
|
}
|
|
81
|
-
// ============================================================================
|
|
82
|
-
// Statistics
|
|
83
|
-
// ============================================================================
|
|
84
|
-
/**
|
|
85
|
-
* 평균 효과성 계산
|
|
86
|
-
*/
|
|
87
45
|
function calculateAverageEffectiveness(masks) {
|
|
88
46
|
if (masks.length === 0)
|
|
89
47
|
return 0;
|
|
90
48
|
const sum = masks.reduce((acc, mask) => acc + mask.effectiveness, 0);
|
|
91
49
|
return sum / masks.length;
|
|
92
50
|
}
|
|
93
|
-
/**
|
|
94
|
-
* 회고 요약 통계 계산
|
|
95
|
-
*/
|
|
96
51
|
function calculateSummaryStats(input) {
|
|
97
52
|
const masksUsed = input.masksUsed?.length ?? 0;
|
|
98
53
|
const avgEffectiveness = input.masksUsed && input.masksUsed.length > 0
|
|
99
54
|
? calculateAverageEffectiveness(input.masksUsed)
|
|
100
55
|
: 0;
|
|
101
|
-
// 작업 수는 요약에서 줄바꿈으로 대략 추정
|
|
102
56
|
const summaryText = input.summary ?? '';
|
|
103
57
|
const tasksCompleted = summaryText.split('\n').filter(l => l.trim().startsWith('-')).length || 1;
|
|
104
58
|
return {
|
|
@@ -107,29 +61,15 @@ function calculateSummaryStats(input) {
|
|
|
107
61
|
averageEffectiveness: Math.round(avgEffectiveness * 10) / 10
|
|
108
62
|
};
|
|
109
63
|
}
|
|
110
|
-
// ============================================================================
|
|
111
|
-
// Main Retrospect Function
|
|
112
|
-
// ============================================================================
|
|
113
|
-
/**
|
|
114
|
-
* 회고 수행
|
|
115
|
-
*
|
|
116
|
-
* "Make it work, make it right, make it fast" - Kent Beck
|
|
117
|
-
*/
|
|
118
64
|
export function performRetrospect(basePath, input) {
|
|
119
65
|
try {
|
|
120
66
|
const depth = input.depth ?? 'standard';
|
|
121
|
-
// 1. 전략 선택
|
|
122
67
|
const strategy = selectStrategy(depth);
|
|
123
|
-
// 2. 회고 내용 생성
|
|
124
68
|
const retrospectContent = strategy.generateContent(input);
|
|
125
|
-
// 3. RETROSPECT.md 읽기 및 업데이트
|
|
126
69
|
let content = readRetrospectFile(basePath);
|
|
127
70
|
content = appendRetrospect(content, retrospectContent);
|
|
128
|
-
// 4. 파일 저장
|
|
129
71
|
writeRetrospectFile(basePath, content);
|
|
130
|
-
// 5. 통계 계산
|
|
131
72
|
const summaryStats = calculateSummaryStats(input);
|
|
132
|
-
// 6. 결과 반환
|
|
133
73
|
const retrospectPath = getMemoryPath('retrospect', basePath);
|
|
134
74
|
const TRIGGER_LABELS = {
|
|
135
75
|
manual: '수동 요청',
|
|
@@ -158,7 +98,4 @@ export function performRetrospect(basePath, input) {
|
|
|
158
98
|
};
|
|
159
99
|
}
|
|
160
100
|
}
|
|
161
|
-
// ============================================================================
|
|
162
|
-
// Export Path Utilities (for mask-save)
|
|
163
|
-
// ============================================================================
|
|
164
101
|
export { getMemoryPath, getDbPath };
|
|
@@ -1,19 +1,4 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Retrospect Strategy Pattern
|
|
3
|
-
*
|
|
4
|
-
* 회고 깊이에 따른 전략 패턴
|
|
5
|
-
*
|
|
6
|
-
* "Use patterns when they make code clearer" - Kent Beck
|
|
7
|
-
*/
|
|
8
1
|
import type { RetrospectInput } from '../types.js';
|
|
9
|
-
/**
|
|
10
|
-
* 전략 패턴: 회고 깊이에 따른 마크다운 생성
|
|
11
|
-
*
|
|
12
|
-
* 이 패턴을 선택한 이유:
|
|
13
|
-
* - 각 깊이의 로직이 명확히 분리됨
|
|
14
|
-
* - 새로운 깊이 추가가 용이
|
|
15
|
-
* - 조건문 중첩 방지
|
|
16
|
-
*/
|
|
17
2
|
export interface RetrospectStrategy {
|
|
18
3
|
generateContent(input: RetrospectInput): string;
|
|
19
4
|
}
|
|
@@ -1,17 +1,5 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Deep Retrospect Strategy
|
|
3
|
-
*
|
|
4
|
-
* 심층 회고: 전체 정보 + 통계 + 교훈
|
|
5
|
-
*
|
|
6
|
-
* "Reflect deeply on what matters" - Kent Beck
|
|
7
|
-
*/
|
|
8
1
|
import type { RetrospectInput } from '../types.js';
|
|
9
2
|
import type { RetrospectStrategy } from './base.js';
|
|
10
|
-
/**
|
|
11
|
-
* Deep 회고 전략
|
|
12
|
-
*
|
|
13
|
-
* 가장 상세한 회고. 모든 정보와 통계, 교훈까지 기록합니다.
|
|
14
|
-
*/
|
|
15
3
|
export declare class DeepRetrospectStrategy implements RetrospectStrategy {
|
|
16
4
|
generateContent(input: RetrospectInput): string;
|
|
17
5
|
}
|
|
@@ -1,10 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Deep Retrospect Strategy
|
|
3
|
-
*
|
|
4
|
-
* 심층 회고: 전체 정보 + 통계 + 교훈
|
|
5
|
-
*
|
|
6
|
-
* "Reflect deeply on what matters" - Kent Beck
|
|
7
|
-
*/
|
|
8
1
|
function formatTimestamp() {
|
|
9
2
|
const now = new Date();
|
|
10
3
|
const year = now.getFullYear();
|
|
@@ -19,9 +12,6 @@ const TRIGGER_LABELS = {
|
|
|
19
12
|
session_end: '세션 종료',
|
|
20
13
|
periodic: '주기적 회고'
|
|
21
14
|
};
|
|
22
|
-
/**
|
|
23
|
-
* 효과성 점수에 따른 라벨 반환
|
|
24
|
-
*/
|
|
25
15
|
function getEffectivenessLabel(score) {
|
|
26
16
|
if (score >= 90)
|
|
27
17
|
return '매우 효과적';
|
|
@@ -33,20 +23,12 @@ function getEffectivenessLabel(score) {
|
|
|
33
23
|
return '개선 필요';
|
|
34
24
|
return '재고 필요';
|
|
35
25
|
}
|
|
36
|
-
/**
|
|
37
|
-
* 평균 효과성 계산
|
|
38
|
-
*/
|
|
39
26
|
function calculateAverageEffectiveness(masks) {
|
|
40
27
|
if (masks.length === 0)
|
|
41
28
|
return 0;
|
|
42
29
|
const sum = masks.reduce((acc, mask) => acc + mask.effectiveness, 0);
|
|
43
30
|
return sum / masks.length;
|
|
44
31
|
}
|
|
45
|
-
/**
|
|
46
|
-
* Deep 회고 전략
|
|
47
|
-
*
|
|
48
|
-
* 가장 상세한 회고. 모든 정보와 통계, 교훈까지 기록합니다.
|
|
49
|
-
*/
|
|
50
32
|
export class DeepRetrospectStrategy {
|
|
51
33
|
generateContent(input) {
|
|
52
34
|
const timestamp = formatTimestamp();
|
|
@@ -58,7 +40,6 @@ export class DeepRetrospectStrategy {
|
|
|
58
40
|
input.summary ?? '(요약 없음)',
|
|
59
41
|
''
|
|
60
42
|
];
|
|
61
|
-
// 가면 사용 정보 - 상세
|
|
62
43
|
if (input.masksUsed && input.masksUsed.length > 0) {
|
|
63
44
|
lines.push('#### 사용한 가면');
|
|
64
45
|
for (const mask of input.masksUsed) {
|
|
@@ -67,12 +48,10 @@ export class DeepRetrospectStrategy {
|
|
|
67
48
|
lines.push(` - 평가: ${getEffectivenessLabel(mask.effectiveness)}`);
|
|
68
49
|
}
|
|
69
50
|
lines.push('');
|
|
70
|
-
// 가면 사용 통계
|
|
71
51
|
const avgEffectiveness = calculateAverageEffectiveness(input.masksUsed);
|
|
72
52
|
lines.push(`> 가면 사용 통계: ${input.masksUsed.length}개 사용, 평균 효과성 ${avgEffectiveness.toFixed(1)}/100`);
|
|
73
53
|
lines.push('');
|
|
74
54
|
}
|
|
75
|
-
// 잘된 점
|
|
76
55
|
if (input.wellDone && input.wellDone.length > 0) {
|
|
77
56
|
lines.push('#### 잘된 점');
|
|
78
57
|
for (const item of input.wellDone) {
|
|
@@ -80,7 +59,6 @@ export class DeepRetrospectStrategy {
|
|
|
80
59
|
}
|
|
81
60
|
lines.push('');
|
|
82
61
|
}
|
|
83
|
-
// 개선할 점
|
|
84
62
|
if (input.improvements && input.improvements.length > 0) {
|
|
85
63
|
lines.push('#### 개선할 점');
|
|
86
64
|
for (const item of input.improvements) {
|
|
@@ -88,7 +66,6 @@ export class DeepRetrospectStrategy {
|
|
|
88
66
|
}
|
|
89
67
|
lines.push('');
|
|
90
68
|
}
|
|
91
|
-
// 배운 교훈 - 심층 회고에서만
|
|
92
69
|
if (input.lessons && input.lessons.length > 0) {
|
|
93
70
|
lines.push('#### 배운 교훈');
|
|
94
71
|
for (const lesson of input.lessons) {
|
|
@@ -96,7 +73,6 @@ export class DeepRetrospectStrategy {
|
|
|
96
73
|
}
|
|
97
74
|
lines.push('');
|
|
98
75
|
}
|
|
99
|
-
// 구분선
|
|
100
76
|
lines.push('---');
|
|
101
77
|
lines.push('');
|
|
102
78
|
return lines.join('\n');
|
|
@@ -1,17 +1,5 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Retrospect Strategies
|
|
3
|
-
*
|
|
4
|
-
* 전략 선택 및 export
|
|
5
|
-
*
|
|
6
|
-
* "Polymorphism beats switch statements" - Kent Beck
|
|
7
|
-
*/
|
|
8
1
|
import type { RetrospectDepth } from '../types.js';
|
|
9
2
|
import type { RetrospectStrategy } from './base.js';
|
|
10
|
-
/**
|
|
11
|
-
* 깊이에 따른 전략 선택
|
|
12
|
-
*
|
|
13
|
-
* "Choose the right tool for the job" - Kent Beck
|
|
14
|
-
*/
|
|
15
3
|
export declare function selectStrategy(depth: RetrospectDepth): RetrospectStrategy;
|
|
16
4
|
export type { RetrospectStrategy } from './base.js';
|
|
17
5
|
export { QuickRetrospectStrategy } from './quick.js';
|
|
@@ -1,18 +1,6 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Retrospect Strategies
|
|
3
|
-
*
|
|
4
|
-
* 전략 선택 및 export
|
|
5
|
-
*
|
|
6
|
-
* "Polymorphism beats switch statements" - Kent Beck
|
|
7
|
-
*/
|
|
8
1
|
import { QuickRetrospectStrategy } from './quick.js';
|
|
9
2
|
import { StandardRetrospectStrategy } from './standard.js';
|
|
10
3
|
import { DeepRetrospectStrategy } from './deep.js';
|
|
11
|
-
/**
|
|
12
|
-
* 깊이에 따른 전략 선택
|
|
13
|
-
*
|
|
14
|
-
* "Choose the right tool for the job" - Kent Beck
|
|
15
|
-
*/
|
|
16
4
|
export function selectStrategy(depth) {
|
|
17
5
|
const strategies = {
|
|
18
6
|
quick: new QuickRetrospectStrategy(),
|
|
@@ -1,17 +1,5 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Quick Retrospect Strategy
|
|
3
|
-
*
|
|
4
|
-
* 요약만 기록하는 빠른 회고
|
|
5
|
-
*
|
|
6
|
-
* "Do the simplest thing that could possibly work" - Kent Beck
|
|
7
|
-
*/
|
|
8
1
|
import type { RetrospectInput } from '../types.js';
|
|
9
2
|
import type { RetrospectStrategy } from './base.js';
|
|
10
|
-
/**
|
|
11
|
-
* Quick 회고 전략
|
|
12
|
-
*
|
|
13
|
-
* 가장 간단한 회고. 요약과 가면 사용 정보만 기록합니다.
|
|
14
|
-
*/
|
|
15
3
|
export declare class QuickRetrospectStrategy implements RetrospectStrategy {
|
|
16
4
|
generateContent(input: RetrospectInput): string;
|
|
17
5
|
}
|
|
@@ -1,13 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Quick Retrospect Strategy
|
|
3
|
-
*
|
|
4
|
-
* 요약만 기록하는 빠른 회고
|
|
5
|
-
*
|
|
6
|
-
* "Do the simplest thing that could possibly work" - Kent Beck
|
|
7
|
-
*/
|
|
8
|
-
/**
|
|
9
|
-
* 현재 시각을 포맷팅
|
|
10
|
-
*/
|
|
11
1
|
function formatTimestamp() {
|
|
12
2
|
const now = new Date();
|
|
13
3
|
const year = now.getFullYear();
|
|
@@ -17,19 +7,11 @@ function formatTimestamp() {
|
|
|
17
7
|
const minute = String(now.getMinutes()).padStart(2, '0');
|
|
18
8
|
return `${year}-${month}-${day} ${hour}:${minute}`;
|
|
19
9
|
}
|
|
20
|
-
/**
|
|
21
|
-
* 트리거 라벨
|
|
22
|
-
*/
|
|
23
10
|
const TRIGGER_LABELS = {
|
|
24
11
|
manual: '수동 요청',
|
|
25
12
|
session_end: '세션 종료',
|
|
26
13
|
periodic: '주기적 회고'
|
|
27
14
|
};
|
|
28
|
-
/**
|
|
29
|
-
* Quick 회고 전략
|
|
30
|
-
*
|
|
31
|
-
* 가장 간단한 회고. 요약과 가면 사용 정보만 기록합니다.
|
|
32
|
-
*/
|
|
33
15
|
export class QuickRetrospectStrategy {
|
|
34
16
|
generateContent(input) {
|
|
35
17
|
const timestamp = formatTimestamp();
|
|
@@ -41,7 +23,6 @@ export class QuickRetrospectStrategy {
|
|
|
41
23
|
input.summary ?? '(요약 없음)',
|
|
42
24
|
''
|
|
43
25
|
];
|
|
44
|
-
// 가면 사용 정보가 있으면 간략히 추가
|
|
45
26
|
if (input.masksUsed && input.masksUsed.length > 0) {
|
|
46
27
|
lines.push('#### 사용한 가면');
|
|
47
28
|
for (const mask of input.masksUsed) {
|
|
@@ -1,17 +1,5 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Standard Retrospect Strategy
|
|
3
|
-
*
|
|
4
|
-
* 표준 회고: 요약 + 가면 + 잘된 점/개선점
|
|
5
|
-
*
|
|
6
|
-
* "Make it work, make it right, make it fast" - Kent Beck
|
|
7
|
-
*/
|
|
8
1
|
import type { RetrospectInput } from '../types.js';
|
|
9
2
|
import type { RetrospectStrategy } from './base.js';
|
|
10
|
-
/**
|
|
11
|
-
* Standard 회고 전략
|
|
12
|
-
*
|
|
13
|
-
* 기본 회고. 작업 요약, 가면 사용, 잘된 점, 개선점을 기록합니다.
|
|
14
|
-
*/
|
|
15
3
|
export declare class StandardRetrospectStrategy implements RetrospectStrategy {
|
|
16
4
|
generateContent(input: RetrospectInput): string;
|
|
17
5
|
}
|
|
@@ -1,10 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Standard Retrospect Strategy
|
|
3
|
-
*
|
|
4
|
-
* 표준 회고: 요약 + 가면 + 잘된 점/개선점
|
|
5
|
-
*
|
|
6
|
-
* "Make it work, make it right, make it fast" - Kent Beck
|
|
7
|
-
*/
|
|
8
1
|
function formatTimestamp() {
|
|
9
2
|
const now = new Date();
|
|
10
3
|
const year = now.getFullYear();
|
|
@@ -19,11 +12,6 @@ const TRIGGER_LABELS = {
|
|
|
19
12
|
session_end: '세션 종료',
|
|
20
13
|
periodic: '주기적 회고'
|
|
21
14
|
};
|
|
22
|
-
/**
|
|
23
|
-
* Standard 회고 전략
|
|
24
|
-
*
|
|
25
|
-
* 기본 회고. 작업 요약, 가면 사용, 잘된 점, 개선점을 기록합니다.
|
|
26
|
-
*/
|
|
27
15
|
export class StandardRetrospectStrategy {
|
|
28
16
|
generateContent(input) {
|
|
29
17
|
const timestamp = formatTimestamp();
|
|
@@ -35,7 +23,6 @@ export class StandardRetrospectStrategy {
|
|
|
35
23
|
input.summary ?? '(요약 없음)',
|
|
36
24
|
''
|
|
37
25
|
];
|
|
38
|
-
// 가면 사용 정보
|
|
39
26
|
if (input.masksUsed && input.masksUsed.length > 0) {
|
|
40
27
|
lines.push('#### 사용한 가면');
|
|
41
28
|
for (const mask of input.masksUsed) {
|
|
@@ -44,7 +31,6 @@ export class StandardRetrospectStrategy {
|
|
|
44
31
|
}
|
|
45
32
|
lines.push('');
|
|
46
33
|
}
|
|
47
|
-
// 잘된 점
|
|
48
34
|
if (input.wellDone && input.wellDone.length > 0) {
|
|
49
35
|
lines.push('#### 잘된 점');
|
|
50
36
|
for (const item of input.wellDone) {
|
|
@@ -52,7 +38,6 @@ export class StandardRetrospectStrategy {
|
|
|
52
38
|
}
|
|
53
39
|
lines.push('');
|
|
54
40
|
}
|
|
55
|
-
// 개선할 점
|
|
56
41
|
if (input.improvements && input.improvements.length > 0) {
|
|
57
42
|
lines.push('#### 개선할 점');
|
|
58
43
|
for (const item of input.improvements) {
|
|
@@ -1,10 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Retrospect Type Definitions
|
|
3
|
-
*
|
|
4
|
-
* 회고 시스템의 타입 정의
|
|
5
|
-
*
|
|
6
|
-
* "Make the types express intent" - Kent Beck
|
|
7
|
-
*/
|
|
8
1
|
export type RetrospectTrigger = 'manual' | 'session_end' | 'periodic';
|
|
9
2
|
export type RetrospectDepth = 'quick' | 'standard' | 'deep';
|
|
10
3
|
export interface MaskUsageRecord {
|
package/dist/retrospect/types.js
CHANGED
package/dist/shared/config.d.ts
CHANGED
|
@@ -1,61 +1,27 @@
|
|
|
1
1
|
import type { LogLevel } from "./types.js";
|
|
2
|
-
/**
|
|
3
|
-
* Memory provider types
|
|
4
|
-
*/
|
|
5
2
|
export type MemoryProviderType = "ollama" | "openai" | "voyage" | "openrouter" | "text-only";
|
|
6
|
-
/**
|
|
7
|
-
* Verify mode
|
|
8
|
-
*/
|
|
9
3
|
export type VerifyMode = "auto" | "manual" | "off";
|
|
10
|
-
/**
|
|
11
|
-
* Reviewer types for verification
|
|
12
|
-
*/
|
|
13
4
|
export type ReviewerType = "dummy-flash" | "dummy-human" | "dummy-premium";
|
|
14
|
-
/**
|
|
15
|
-
* Retrospect depth levels
|
|
16
|
-
*/
|
|
17
5
|
export type RetrospectDepth = "quick" | "standard" | "deep";
|
|
18
|
-
/**
|
|
19
|
-
* Configuration for the Context feature (always enabled)
|
|
20
|
-
*/
|
|
21
6
|
export interface ContextConfig {
|
|
22
7
|
enabled: true;
|
|
23
8
|
}
|
|
24
|
-
/**
|
|
25
|
-
* Configuration for the Memory feature
|
|
26
|
-
*/
|
|
27
9
|
export interface MemoryConfig {
|
|
28
10
|
enabled: boolean;
|
|
29
11
|
provider: MemoryProviderType;
|
|
30
12
|
}
|
|
31
|
-
/**
|
|
32
|
-
* Configuration for the Retrospect feature
|
|
33
|
-
*/
|
|
34
13
|
export interface RetrospectConfig {
|
|
35
14
|
enabled: boolean;
|
|
36
15
|
}
|
|
37
|
-
/**
|
|
38
|
-
* Configuration for the Verify feature
|
|
39
|
-
*/
|
|
40
16
|
export interface VerifyConfig {
|
|
41
17
|
enabled: boolean;
|
|
42
18
|
}
|
|
43
|
-
/**
|
|
44
|
-
* Feature configuration map
|
|
45
|
-
*/
|
|
46
19
|
export interface FeaturesConfig {
|
|
47
|
-
/** Context is always enabled */
|
|
48
20
|
context: ContextConfig;
|
|
49
|
-
/** Memory is optional */
|
|
50
21
|
memory?: MemoryConfig;
|
|
51
|
-
/** Retrospect is optional */
|
|
52
22
|
retrospect?: RetrospectConfig;
|
|
53
|
-
/** Verify is optional */
|
|
54
23
|
verify?: VerifyConfig;
|
|
55
24
|
}
|
|
56
|
-
/**
|
|
57
|
-
* Memory provider-specific configurations
|
|
58
|
-
*/
|
|
59
25
|
export interface MemoryProviderConfigs {
|
|
60
26
|
provider: MemoryProviderType;
|
|
61
27
|
vectorStore?: {
|
|
@@ -86,9 +52,6 @@ export interface MemoryProviderConfigs {
|
|
|
86
52
|
keywordWeight: number;
|
|
87
53
|
};
|
|
88
54
|
}
|
|
89
|
-
/**
|
|
90
|
-
* Verification configuration
|
|
91
|
-
*/
|
|
92
55
|
export interface VerifyConfigOptions {
|
|
93
56
|
mode: VerifyMode;
|
|
94
57
|
reviewer: ReviewerType;
|
|
@@ -104,32 +67,16 @@ export interface VerifyConfigOptions {
|
|
|
104
67
|
onTestFail?: boolean;
|
|
105
68
|
};
|
|
106
69
|
}
|
|
107
|
-
/**
|
|
108
|
-
* Logging configuration
|
|
109
|
-
*/
|
|
110
70
|
export interface LoggingConfig {
|
|
111
71
|
level: LogLevel;
|
|
112
72
|
}
|
|
113
|
-
/**
|
|
114
|
-
* Main Maskweaver configuration
|
|
115
|
-
*/
|
|
116
73
|
export interface MaskweaverConfig {
|
|
117
|
-
/** Feature toggles */
|
|
118
74
|
features: FeaturesConfig;
|
|
119
|
-
/** Memory system configuration */
|
|
120
75
|
memory?: MemoryProviderConfigs;
|
|
121
|
-
/** Verification system configuration */
|
|
122
76
|
verify?: VerifyConfigOptions;
|
|
123
|
-
/** Logging configuration */
|
|
124
77
|
logging?: LoggingConfig;
|
|
125
78
|
}
|
|
126
|
-
/**
|
|
127
|
-
* Default configuration
|
|
128
|
-
*/
|
|
129
79
|
export declare const DEFAULT_CONFIG: MaskweaverConfig;
|
|
130
|
-
/**
|
|
131
|
-
* Runtime memory configuration from maskweaver.config.json
|
|
132
|
-
*/
|
|
133
80
|
export interface RuntimeMemoryConfig {
|
|
134
81
|
provider: MemoryProviderType;
|
|
135
82
|
model?: string;
|
|
@@ -137,9 +84,6 @@ export interface RuntimeMemoryConfig {
|
|
|
137
84
|
enabled?: boolean;
|
|
138
85
|
baseUrl?: string;
|
|
139
86
|
}
|
|
140
|
-
/**
|
|
141
|
-
* Runtime GDC integration configuration from maskweaver.config.json
|
|
142
|
-
*/
|
|
143
87
|
export interface RuntimeGdcConfig {
|
|
144
88
|
enabled?: boolean | 'auto';
|
|
145
89
|
strictVerify?: boolean;
|
|
@@ -163,82 +107,33 @@ export interface RuntimeConfig {
|
|
|
163
107
|
gdc?: RuntimeGdcConfig;
|
|
164
108
|
language?: string;
|
|
165
109
|
}
|
|
166
|
-
/** Cost tier for budget-aware scheduling */
|
|
167
110
|
export type ModelCostTier = 'low' | 'medium' | 'high';
|
|
168
|
-
/** Agent tier mapping */
|
|
169
111
|
export type ModelTier = 'flash' | 'human' | 'premium';
|
|
170
|
-
/** Known capability tags for task-model matching */
|
|
171
112
|
export type ModelCapability = 'search' | 'formatting' | 'simple-coding' | 'file-ops' | 'coding' | 'testing' | 'refactoring' | 'architecture' | 'debugging' | 'reasoning' | 'complex-coding' | 'frontend' | 'backend' | 'database' | 'devops' | 'ml' | string;
|
|
172
|
-
/**
|
|
173
|
-
* A single model entry in the pool.
|
|
174
|
-
* Each entry represents one AI model subscription the user has access to.
|
|
175
|
-
*/
|
|
176
113
|
export interface ModelPoolEntry {
|
|
177
|
-
/** Unique identifier for this model slot (e.g., "gemini-flash", "claude-opus") */
|
|
178
114
|
id: string;
|
|
179
|
-
/** Full model name as used by the provider (e.g., "google/antigravity-gemini-3-flash") */
|
|
180
115
|
model: string;
|
|
181
|
-
/** Which agent tier this model maps to */
|
|
182
116
|
tier: ModelTier;
|
|
183
|
-
/** Maximum concurrent uses allowed (API/subscription limit) */
|
|
184
117
|
maxConcurrent: number;
|
|
185
|
-
/** Task capabilities this model excels at */
|
|
186
118
|
capabilities: ModelCapability[];
|
|
187
|
-
/** Cost tier for budget-aware scheduling */
|
|
188
119
|
costTier: ModelCostTier;
|
|
189
|
-
/** Human-readable description */
|
|
190
120
|
description?: string;
|
|
191
121
|
}
|
|
192
|
-
/**
|
|
193
|
-
* DummyHumans configuration.
|
|
194
|
-
* Supports two formats:
|
|
195
|
-
* - Legacy: Record<string, string> mapping tier names to model IDs
|
|
196
|
-
* - Pool: { pool: ModelPoolEntry[] } with detailed model definitions
|
|
197
|
-
*/
|
|
198
122
|
export type DummyHumansConfig = Record<string, string> | {
|
|
199
123
|
pool: ModelPoolEntry[];
|
|
200
124
|
};
|
|
201
|
-
/** Type guard for pool format */
|
|
202
125
|
export declare function isPoolConfig(config: DummyHumansConfig): config is {
|
|
203
126
|
pool: ModelPoolEntry[];
|
|
204
127
|
};
|
|
205
|
-
/**
|
|
206
|
-
* Normalize legacy config to pool entries.
|
|
207
|
-
* Converts { flash: "model-a", human: "model-b", premium: "model-c" }
|
|
208
|
-
* into ModelPoolEntry[] with sensible defaults.
|
|
209
|
-
*/
|
|
210
128
|
export declare function normalizeDummyHumansConfig(config: DummyHumansConfig): ModelPoolEntry[];
|
|
211
|
-
/**
|
|
212
|
-
* Runtime configuration from maskweaver.config.json
|
|
213
|
-
*/
|
|
214
129
|
export interface RuntimeConfig {
|
|
215
130
|
dummyHumans?: DummyHumansConfig;
|
|
216
131
|
memory?: RuntimeMemoryConfig;
|
|
217
132
|
gdc?: RuntimeGdcConfig;
|
|
218
133
|
language?: string;
|
|
219
134
|
}
|
|
220
|
-
/**
|
|
221
|
-
* Load maskweaver.config.json from project root or global config
|
|
222
|
-
*
|
|
223
|
-
* Searches in order:
|
|
224
|
-
* 1. {basePath}/maskweaver.config.json
|
|
225
|
-
* 2. {basePath}/.opencode/maskweaver.config.json
|
|
226
|
-
* 3. ~/.config/opencode/maskweaver.config.json (global fallback)
|
|
227
|
-
*/
|
|
228
135
|
export declare function loadRuntimeConfig(basePath?: string): RuntimeConfig;
|
|
229
|
-
/**
|
|
230
|
-
* Get memory provider configuration from runtime config
|
|
231
|
-
*/
|
|
232
136
|
export declare function getMemoryProviderConfig(basePath?: string): RuntimeMemoryConfig | undefined;
|
|
233
|
-
/**
|
|
234
|
-
* Get GDC integration configuration from runtime config
|
|
235
|
-
*/
|
|
236
137
|
export declare function getGdcConfig(basePath?: string): RuntimeGdcConfig | undefined;
|
|
237
|
-
/**
|
|
238
|
-
* Get operator model configuration from runtime config
|
|
239
|
-
*/
|
|
240
138
|
export declare function getOperatorConfig(basePath?: string): RuntimeOperatorConfig | undefined;
|
|
241
|
-
/**
|
|
242
|
-
* Clear cached runtime config (for testing)
|
|
243
|
-
*/
|
|
244
139
|
export declare function clearRuntimeConfigCache(): void;
|