@tienne/gestalt 0.7.0 → 0.9.0
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/CLAUDE.md +14 -3
- package/README.ko.md +154 -30
- package/README.md +134 -15
- package/dist/package.json +1 -1
- package/dist/role-agents/technical-writer/AGENT.md +39 -3
- package/dist/skills/execute/SKILL.md +66 -1
- package/dist/skills/interview/SKILL.md +36 -1
- package/dist/skills/spec/SKILL.md +33 -1
- package/dist/src/core/types.d.ts +85 -0
- package/dist/src/core/types.d.ts.map +1 -1
- package/dist/src/execute/audit-engine.d.ts +20 -0
- package/dist/src/execute/audit-engine.d.ts.map +1 -0
- package/dist/src/execute/audit-engine.js +49 -0
- package/dist/src/execute/audit-engine.js.map +1 -0
- package/dist/src/execute/parallel-groups.d.ts +9 -0
- package/dist/src/execute/parallel-groups.d.ts.map +1 -0
- package/dist/src/execute/parallel-groups.js +39 -0
- package/dist/src/execute/parallel-groups.js.map +1 -0
- package/dist/src/execute/passthrough-engine.d.ts +2 -0
- package/dist/src/execute/passthrough-engine.d.ts.map +1 -1
- package/dist/src/execute/passthrough-engine.js +6 -0
- package/dist/src/execute/passthrough-engine.js.map +1 -1
- package/dist/src/execute/repository.d.ts.map +1 -1
- package/dist/src/execute/repository.js +3 -0
- package/dist/src/execute/repository.js.map +1 -1
- package/dist/src/execute/rule-writer.d.ts +15 -0
- package/dist/src/execute/rule-writer.d.ts.map +1 -0
- package/dist/src/execute/rule-writer.js +57 -0
- package/dist/src/execute/rule-writer.js.map +1 -0
- package/dist/src/execute/session.d.ts +3 -1
- package/dist/src/execute/session.d.ts.map +1 -1
- package/dist/src/execute/session.js +31 -0
- package/dist/src/execute/session.js.map +1 -1
- package/dist/src/interview/context-compressor.d.ts +17 -0
- package/dist/src/interview/context-compressor.d.ts.map +1 -0
- package/dist/src/interview/context-compressor.js +40 -0
- package/dist/src/interview/context-compressor.js.map +1 -0
- package/dist/src/interview/mini-interview-engine.d.ts +33 -0
- package/dist/src/interview/mini-interview-engine.d.ts.map +1 -0
- package/dist/src/interview/mini-interview-engine.js +103 -0
- package/dist/src/interview/mini-interview-engine.js.map +1 -0
- package/dist/src/interview/passthrough-engine.d.ts +7 -0
- package/dist/src/interview/passthrough-engine.d.ts.map +1 -1
- package/dist/src/interview/passthrough-engine.js +15 -1
- package/dist/src/interview/passthrough-engine.js.map +1 -1
- package/dist/src/interview/session.d.ts +2 -1
- package/dist/src/interview/session.d.ts.map +1 -1
- package/dist/src/interview/session.js +5 -0
- package/dist/src/interview/session.js.map +1 -1
- package/dist/src/mcp/schemas.d.ts +78 -9
- package/dist/src/mcp/schemas.d.ts.map +1 -1
- package/dist/src/mcp/schemas.js +25 -2
- package/dist/src/mcp/schemas.js.map +1 -1
- package/dist/src/mcp/server.d.ts.map +1 -1
- package/dist/src/mcp/server.js +5 -2
- package/dist/src/mcp/server.js.map +1 -1
- package/dist/src/mcp/tools/execute-passthrough.d.ts.map +1 -1
- package/dist/src/mcp/tools/execute-passthrough.js +260 -4
- package/dist/src/mcp/tools/execute-passthrough.js.map +1 -1
- package/dist/src/mcp/tools/interview-passthrough.d.ts.map +1 -1
- package/dist/src/mcp/tools/interview-passthrough.js +45 -2
- package/dist/src/mcp/tools/interview-passthrough.js.map +1 -1
- package/dist/src/mcp/tools/interview.d.ts.map +1 -1
- package/dist/src/mcp/tools/interview.js +8 -0
- package/dist/src/mcp/tools/interview.js.map +1 -1
- package/dist/src/mcp/tools/review-passthrough.d.ts.map +1 -1
- package/dist/src/mcp/tools/review-passthrough.js +14 -0
- package/dist/src/mcp/tools/review-passthrough.js.map +1 -1
- package/dist/src/mcp/tools/spec-passthrough.d.ts +2 -1
- package/dist/src/mcp/tools/spec-passthrough.d.ts.map +1 -1
- package/dist/src/mcp/tools/spec-passthrough.js +54 -3
- package/dist/src/mcp/tools/spec-passthrough.js.map +1 -1
- package/dist/src/mcp/tools/spec.d.ts.map +1 -1
- package/dist/src/mcp/tools/spec.js +2 -0
- package/dist/src/mcp/tools/spec.js.map +1 -1
- package/dist/src/memory/memory-context-injector.d.ts +26 -0
- package/dist/src/memory/memory-context-injector.d.ts.map +1 -0
- package/dist/src/memory/memory-context-injector.js +67 -0
- package/dist/src/memory/memory-context-injector.js.map +1 -0
- package/dist/src/memory/project-memory-store.d.ts +14 -0
- package/dist/src/memory/project-memory-store.d.ts.map +1 -0
- package/dist/src/memory/project-memory-store.js +105 -0
- package/dist/src/memory/project-memory-store.js.map +1 -0
- package/dist/src/memory/user-profile-store.d.ts +13 -0
- package/dist/src/memory/user-profile-store.d.ts.map +1 -0
- package/dist/src/memory/user-profile-store.js +89 -0
- package/dist/src/memory/user-profile-store.js.map +1 -0
- package/dist/src/spec/passthrough-generator.d.ts +2 -0
- package/dist/src/spec/passthrough-generator.d.ts.map +1 -1
- package/dist/src/spec/passthrough-generator.js +34 -0
- package/dist/src/spec/passthrough-generator.js.map +1 -1
- package/dist/src/spec/templates.d.ts +12 -0
- package/dist/src/spec/templates.d.ts.map +1 -0
- package/dist/src/spec/templates.js +103 -0
- package/dist/src/spec/templates.js.map +1 -0
- package/dist/src/spec/text-based-spec-generator.d.ts +15 -0
- package/dist/src/spec/text-based-spec-generator.d.ts.map +1 -0
- package/dist/src/spec/text-based-spec-generator.js +63 -0
- package/dist/src/spec/text-based-spec-generator.js.map +1 -0
- package/package.json +1 -1
- package/role-agents/technical-writer/AGENT.md +39 -3
- package/skills/execute/SKILL.md +66 -1
- package/skills/interview/SKILL.md +36 -1
- package/skills/spec/SKILL.md +33 -1
- package/README.backup.md +0 -442
package/CLAUDE.md
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
- **Execute Engine**: 게슈탈트 5원리를 실행 전략으로 사용, Spec→ExecutionPlan 변환 (Figure-Ground→Closure→Proximity→Continuity)
|
|
11
11
|
- **Resilience Engine**: Stagnation 감지 → Lateral Thinking Personas → Human Escalation
|
|
12
12
|
- **MCP Server**: stdio transport로 Claude Code 등 AI 에이전트와 통합
|
|
13
|
-
- **Skill System**: SKILL.md 기반 확장, chokidar hot-reload
|
|
13
|
+
- **Skill System**: SKILL.md 기반 확장, chokidar hot-reload 지원. 각 스킬(`/interview`, `/spec`, `/execute`)은 실행 중 Claude Code Task 패널에 진행 상태를 `TaskCreate`/`TaskUpdate`로 실시간 표시 (공통 진행 패널)
|
|
14
14
|
- **Event Store**: better-sqlite3 WAL 모드 이벤트 소싱
|
|
15
15
|
|
|
16
16
|
## Tech Stack
|
|
@@ -84,7 +84,7 @@ interface GestaltConfig {
|
|
|
84
84
|
|
|
85
85
|
## MCP Tools
|
|
86
86
|
- `ges_interview`: action=[start|respond|score|complete]
|
|
87
|
-
- `ges_generate_spec`: sessionId, force?
|
|
87
|
+
- `ges_generate_spec`: sessionId? (optional), text? (optional), force?, spec? (passthrough)
|
|
88
88
|
- `ges_execute`: action=[start|plan_step|plan_complete|execute_start|execute_task|evaluate|status|evolve_fix|evolve|evolve_patch|evolve_re_execute|evolve_lateral|evolve_lateral_result|role_match|role_consensus]
|
|
89
89
|
- `ges_create_agent`: action=[start|submit] — 인터뷰 기반 커스텀 Role Agent 생성
|
|
90
90
|
- `ges_status`: sessionId?
|
|
@@ -159,8 +159,18 @@ ges_interview({ action: "complete", sessionId: "<id>" })
|
|
|
159
159
|
```
|
|
160
160
|
|
|
161
161
|
**Step 6: Spec 생성 (2단계)**
|
|
162
|
+
|
|
163
|
+
두 가지 입력 경로 중 하나를 선택한다.
|
|
164
|
+
|
|
162
165
|
```
|
|
163
|
-
//
|
|
166
|
+
// Text-based 경로 (인터뷰 불필요)
|
|
167
|
+
ges_generate_spec({ text: "..." })
|
|
168
|
+
→ specContext (systemPrompt, specPrompt) 반환
|
|
169
|
+
|
|
170
|
+
ges_generate_spec({ text: "...", spec: {...} })
|
|
171
|
+
→ Zod 검증 후 최종 Spec 반환 + .gestalt/memory.json 자동 업데이트
|
|
172
|
+
|
|
173
|
+
// Interview 기반 경로 (6a: specContext 요청)
|
|
164
174
|
ges_generate_spec({ sessionId: "<id>" })
|
|
165
175
|
→ specContext (systemPrompt, specPrompt, allRounds) 반환
|
|
166
176
|
|
|
@@ -346,6 +356,7 @@ ges_execute({ action: "role_consensus", sessionId: "<id>", consensus: {...} })
|
|
|
346
356
|
- Spec의 `gestaltAnalysis[].principle`은 enum: `closure | proximity | similarity | figure_ground | continuity`
|
|
347
357
|
- `ontologySchema.entities[]`: `{ name, description, attributes[] }`
|
|
348
358
|
- `ontologySchema.relations[]`: `{ from, to, type }`
|
|
359
|
+
- text-based 경로: `sessionId` 불필요, 생성된 spec의 `interviewSessionId`는 `"text-input"`으로 설정
|
|
349
360
|
|
|
350
361
|
## Project Structure
|
|
351
362
|
- `src/core/` — types, errors, Result monad, config, constants
|
package/README.ko.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
<p align="center">
|
|
6
6
|
<strong>Gestalt — AI 개발 하네스</strong><br/>
|
|
7
|
-
|
|
7
|
+
흩어진 막연함을 하나의 실행 계획으로
|
|
8
8
|
</p>
|
|
9
9
|
|
|
10
10
|
<p align="center">
|
|
@@ -21,24 +21,34 @@
|
|
|
21
21
|
|
|
22
22
|
## Gestalt는 무엇인가요?
|
|
23
23
|
|
|
24
|
-
Gestalt는 Claude Code 안에서 실행되는 MCP(Model Context Protocol) 서버예요.
|
|
24
|
+
Gestalt는 Claude Code 안에서 실행되는 MCP(Model Context Protocol) 서버예요. 요구사항을 인터뷰로 구체화해 **Spec**(목표·제약조건·완료 기준)을 만들고, 그 Spec을 바탕으로 실행 계획을 짜요.
|
|
25
25
|
|
|
26
26
|
> **시작 전 확인** — Node.js >= 20.0.0이 필요해요. `nvm install 22 && nvm use 22`로 설치할 수 있어요.
|
|
27
27
|
|
|
28
28
|
---
|
|
29
29
|
|
|
30
|
-
##
|
|
30
|
+
## 빠른 시작
|
|
31
31
|
|
|
32
|
-
|
|
32
|
+
플러그인을 설치하세요 (최초 1회):
|
|
33
33
|
|
|
34
34
|
```bash
|
|
35
|
-
#
|
|
35
|
+
# 1단계: 마켓플레이스 등록
|
|
36
|
+
/plugin marketplace add tienne/gestalt
|
|
37
|
+
|
|
38
|
+
# 2단계: 플러그인 설치
|
|
39
|
+
/plugin install gestalt@gestalt
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
설치가 끝나면 Claude Code에서 바로 사용할 수 있어요:
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
# 요구사항 인터뷰 시작
|
|
36
46
|
/interview "사용자 인증 시스템"
|
|
37
47
|
|
|
38
|
-
# 인터뷰 완료 후
|
|
48
|
+
# 인터뷰 완료 후 Spec 생성
|
|
39
49
|
/spec
|
|
40
50
|
|
|
41
|
-
# Spec을
|
|
51
|
+
# Spec을 실행 계획으로 만들고 실행
|
|
42
52
|
/execute
|
|
43
53
|
```
|
|
44
54
|
|
|
@@ -88,17 +98,35 @@ Claude Code
|
|
|
88
98
|
최종 Spec → 실행 계획
|
|
89
99
|
```
|
|
90
100
|
|
|
91
|
-
`ANTHROPIC_API_KEY`는 필요하지 않아요. 모든 LLM 작업은 Claude Code가 처리해요.
|
|
92
|
-
|
|
93
101
|
> **참고해 주세요** — CLI 직접 실행 모드에서는 `ANTHROPIC_API_KEY`가 필요해요. Claude Code 없이 터미널에서 바로 사용할 경우에만 해당돼요.
|
|
94
102
|
|
|
95
103
|
---
|
|
96
104
|
|
|
105
|
+
## 프로젝트 메모리
|
|
106
|
+
|
|
107
|
+
Spec과 실행 결과는 레포 루트의 `.gestalt/memory.json`에 자동으로 저장돼요.
|
|
108
|
+
|
|
109
|
+
```json
|
|
110
|
+
{
|
|
111
|
+
"specHistory": [
|
|
112
|
+
{ "specId": "...", "goal": "Build a user auth system", "sourceType": "text" }
|
|
113
|
+
],
|
|
114
|
+
"executionHistory": [],
|
|
115
|
+
"architectureDecisions": []
|
|
116
|
+
}
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
- **커밋하세요** — `.gestalt/memory.json`은 일반 JSON 파일이에요. 커밋하면 팀원도 `git pull` 후 이전 결정 사항을 그대로 이어받을 수 있어요.
|
|
120
|
+
- **컨텍스트 반영** — 다음 Spec을 생성할 때 이전 목표와 아키텍처 결정 사항이 프롬프트에 자동으로 반영돼요.
|
|
121
|
+
- **User Profile** — 개인 설정은 `~/.gestalt/profile.json`에 저장돼요. git에는 올라가지 않아요.
|
|
122
|
+
|
|
123
|
+
---
|
|
124
|
+
|
|
97
125
|
## 설치
|
|
98
126
|
|
|
99
127
|
### 옵션 1: Claude Code 플러그인 (권장)
|
|
100
128
|
|
|
101
|
-
MCP 서버, 슬래시
|
|
129
|
+
설치 한 번에 MCP 서버, 슬래시 커맨드, Gestalt 에이전트, 프로젝트 컨텍스트를 모두 사용할 수 있어요.
|
|
102
130
|
|
|
103
131
|
```bash
|
|
104
132
|
# 1단계: 마켓플레이스 등록 (최초 1회)
|
|
@@ -115,7 +143,7 @@ MCP 서버, 슬래시 커맨드 스킬, Gestalt 에이전트, 프로젝트 컨
|
|
|
115
143
|
| **MCP 도구** | `ges_interview`, `ges_generate_spec`, `ges_execute`, `ges_create_agent`, `ges_agent`, `ges_status` |
|
|
116
144
|
| **슬래시 커맨드** | `/interview`, `/spec`, `/execute`, `/agent` |
|
|
117
145
|
| **에이전트** | Gestalt 파이프라인 에이전트 5개 + Role 에이전트 9개 + Review 에이전트 3개 |
|
|
118
|
-
| **CLAUDE.md** | 프로젝트 컨텍스트 및 MCP 사용 가이드 자동
|
|
146
|
+
| **CLAUDE.md** | 프로젝트 컨텍스트 및 MCP 사용 가이드 자동 추가 |
|
|
119
147
|
|
|
120
148
|
> **Node.js >= 20.0.0** 필요 — [nvm](https://github.com/nvm-sh/nvm) 사용 시: `nvm install 22 && nvm use 22`
|
|
121
149
|
|
|
@@ -172,7 +200,7 @@ claude mcp add gestalt -- npx -y @tienne/gestalt
|
|
|
172
200
|
/interview "Stripe로 결제 플로우를 만들고 싶어"
|
|
173
201
|
```
|
|
174
202
|
|
|
175
|
-
각 라운드는
|
|
203
|
+
각 라운드는 모호한 부분을 집중해서 파악해요:
|
|
176
204
|
|
|
177
205
|
- **Closure** — 빠진 요구사항과 말하지 않고 가정한 것을 찾아요
|
|
178
206
|
- **Proximity** — 함께 묶여야 할 기능을 식별해요
|
|
@@ -188,17 +216,49 @@ claude mcp add gestalt -- npx -y @tienne/gestalt
|
|
|
188
216
|
8라운드 → 모호성: 0.19 ✓ Spec 생성 준비 완료
|
|
189
217
|
```
|
|
190
218
|
|
|
219
|
+
#### 인터뷰가 길어질 때 (Context Compression)
|
|
220
|
+
|
|
221
|
+
라운드가 5개를 초과하면 Gestalt가 자동으로 압축을 제안해요. `compress` action을 사용하면 이전 대화를 요약해 컨텍스트를 줄일 수 있어요:
|
|
222
|
+
|
|
223
|
+
```
|
|
224
|
+
1. respond 응답에 needsCompression: true + compressionContext 포함
|
|
225
|
+
2. ges_interview({ action: "compress", sessionId }) → compressionContext 반환
|
|
226
|
+
3. caller가 요약 생성 후 제출 → 세션에 저장
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
이후 라운드에서 압축된 요약이 자동으로 반영돼요.
|
|
230
|
+
|
|
191
231
|
---
|
|
192
232
|
|
|
193
233
|
### 2단계 — Spec 생성
|
|
194
234
|
|
|
195
|
-
|
|
235
|
+
**옵션 A — 텍스트로 바로 생성 (인터뷰 불필요):**
|
|
236
|
+
|
|
237
|
+
```bash
|
|
238
|
+
ges_generate_spec({ text: "Stripe로 결제 플로우 구현" })
|
|
239
|
+
```
|
|
240
|
+
|
|
241
|
+
**옵션 A-2 — 내장 템플릿 사용:**
|
|
242
|
+
|
|
243
|
+
3가지 내장 템플릿으로 빠르게 시작할 수 있어요:
|
|
244
|
+
|
|
245
|
+
| 템플릿 ID | 설명 |
|
|
246
|
+
|-----------|------|
|
|
247
|
+
| `rest-api` | REST API 서버 (인증, CRUD, OpenAPI) |
|
|
248
|
+
| `react-dashboard` | React 대시보드 앱 (차트, 필터, 반응형) |
|
|
249
|
+
| `cli-tool` | CLI 도구 (서브커맨드, 설정, 배포) |
|
|
250
|
+
|
|
251
|
+
```bash
|
|
252
|
+
ges_generate_spec({ text: "JWT 인증이 포함된 API", template: "rest-api" })
|
|
253
|
+
```
|
|
254
|
+
|
|
255
|
+
**옵션 B — 완료된 인터뷰에서 생성:**
|
|
196
256
|
|
|
197
257
|
```bash
|
|
198
258
|
/spec
|
|
199
259
|
```
|
|
200
260
|
|
|
201
|
-
|
|
261
|
+
이후 단계 전체의 기준이 되는 **Spec**을 생성해요:
|
|
202
262
|
|
|
203
263
|
```
|
|
204
264
|
goal → 명확하고 모호성 없는 프로젝트 목표
|
|
@@ -212,7 +272,7 @@ gestaltAnalysis → 게슈탈트 원리별 핵심 발견 사항
|
|
|
212
272
|
|
|
213
273
|
### 3단계 — Execute (계획 + 실행)
|
|
214
274
|
|
|
215
|
-
Spec
|
|
275
|
+
Spec에서 실행 계획을 만들어 실행해요:
|
|
216
276
|
|
|
217
277
|
```bash
|
|
218
278
|
/execute
|
|
@@ -227,11 +287,71 @@ Spec을 의존성 기반 실행 계획으로 변환하고 실행해요:
|
|
|
227
287
|
| 3 | **Proximity** | 관련 태스크를 도메인별 그룹으로 묶음 |
|
|
228
288
|
| 4 | **Continuity** | 의존성 DAG 검증 — 순환 없음, 위상 정렬 순서 확인 |
|
|
229
289
|
|
|
230
|
-
**Execution 단계**에서 위상 정렬 순서대로 태스크를 실행해요. 각 태스크 후 **Drift Detection**이 Spec
|
|
290
|
+
**Execution 단계**에서 위상 정렬 순서대로 태스크를 실행해요. 각 태스크 후 **Drift Detection**이 Spec과 얼마나 맞는지 확인해요:
|
|
231
291
|
|
|
232
292
|
- 3차원 점수: Goal (50%) + Constraint (30%) + Ontology (20%)
|
|
233
293
|
- Jaccard 유사도 기반 측정
|
|
234
|
-
-
|
|
294
|
+
- 임계값을 초과하면 회고(Retrospective)가 자동으로 시작돼요
|
|
295
|
+
|
|
296
|
+
#### 병렬 실행 (Parallel Groups)
|
|
297
|
+
|
|
298
|
+
`plan_complete` 응답에 `parallelGroups: string[][]`이 포함돼요. 의존성이 없는 태스크를 같은 그룹으로 묶어 동시에 실행해요:
|
|
299
|
+
|
|
300
|
+
```json
|
|
301
|
+
"parallelGroups": [
|
|
302
|
+
["setup-db", "setup-env"], // 동시 실행 가능
|
|
303
|
+
["create-schema"], // 위 그룹 완료 후 실행
|
|
304
|
+
["seed-data", "run-tests"] // 동시 실행 가능
|
|
305
|
+
]
|
|
306
|
+
```
|
|
307
|
+
|
|
308
|
+
#### 실행 이어하기 (Resume)
|
|
309
|
+
|
|
310
|
+
실행 중 세션이 중단되어도 이어서 계속할 수 있어요:
|
|
311
|
+
|
|
312
|
+
```bash
|
|
313
|
+
ges_execute({ action: "resume", sessionId: "<id>" })
|
|
314
|
+
```
|
|
315
|
+
|
|
316
|
+
`ResumeContext`를 반환해요: 완료된 태스크 목록, 다음 태스크, 진행률(%). `ges_status` 응답에도 `resumeContext`가 자동으로 포함돼요.
|
|
317
|
+
|
|
318
|
+
#### Brownfield 감사 (Audit)
|
|
319
|
+
|
|
320
|
+
기존 코드베이스가 있을 때 Spec 대비 구현 현황을 분석할 수 있어요:
|
|
321
|
+
|
|
322
|
+
```bash
|
|
323
|
+
# 1단계: 감사 컨텍스트 요청
|
|
324
|
+
ges_execute({ action: "audit", sessionId: "<id>" })
|
|
325
|
+
→ auditContext (systemPrompt, auditPrompt) 반환
|
|
326
|
+
|
|
327
|
+
# 2단계: 코드베이스 스냅샷 + 감사 결과 제출
|
|
328
|
+
ges_execute({
|
|
329
|
+
action: "audit",
|
|
330
|
+
sessionId: "<id>",
|
|
331
|
+
codebaseSnapshot: "...",
|
|
332
|
+
auditResult: { implementedACs: [0,2], partialACs: [1], missingACs: [3], gapAnalysis: "..." }
|
|
333
|
+
})
|
|
334
|
+
```
|
|
335
|
+
|
|
336
|
+
#### 실행 진행 패널
|
|
337
|
+
|
|
338
|
+
`/execute` 실행 중 Claude Code Task 패널에 진행 상태가 실시간으로 표시돼요. Planning 단계부터 Evaluate까지 각 완료 태스크 수, 현재 태스크 이름, 실패 수, 병렬 그룹 구조가 자동으로 갱신돼요.
|
|
339
|
+
|
|
340
|
+
#### 하위 에이전트 생성 (Spawn)
|
|
341
|
+
|
|
342
|
+
실행 중에 복잡한 태스크를 하위 태스크로 나눌 수 있어요:
|
|
343
|
+
|
|
344
|
+
```bash
|
|
345
|
+
ges_execute({
|
|
346
|
+
action: "spawn",
|
|
347
|
+
sessionId: "<id>",
|
|
348
|
+
parentTaskId: "task-3",
|
|
349
|
+
subTasks: [
|
|
350
|
+
{ title: "DB 스키마 작성", description: "..." },
|
|
351
|
+
{ title: "마이그레이션 실행", description: "...", dependsOn: ["spawned-<id>"] }
|
|
352
|
+
]
|
|
353
|
+
})
|
|
354
|
+
```
|
|
235
355
|
|
|
236
356
|
---
|
|
237
357
|
|
|
@@ -241,7 +361,7 @@ Spec을 의존성 기반 실행 계획으로 변환하고 실행해요:
|
|
|
241
361
|
|
|
242
362
|
| 단계 | 방식 | 실패 시 |
|
|
243
363
|
|:---:|-------|-----------|
|
|
244
|
-
| 1 | **Structural** — lint → build → test 실행 |
|
|
364
|
+
| 1 | **Structural** — lint → build → test 실행 | 조기 종료(short-circuit); 2단계 건너뜀 |
|
|
245
365
|
| 2 | **Contextual** — LLM이 각 AC + goal alignment 검증 | Evolution Loop 진입 |
|
|
246
366
|
|
|
247
367
|
**성공 조건:** `score ≥ 0.85` AND `goalAlignment ≥ 0.80`
|
|
@@ -264,18 +384,18 @@ evolve → Spec 패치 (AC/constraints) → 영향받은 태스크 재실행 →
|
|
|
264
384
|
|
|
265
385
|
Spec 패치 범위: AC와 constraints는 자유 수정; ontology는 추가/변경만; **goal은 변경 불가**.
|
|
266
386
|
|
|
267
|
-
**Flow C — Lateral Thinking** (
|
|
387
|
+
**Flow C — Lateral Thinking** (답보 상태 감지 시)
|
|
268
388
|
|
|
269
|
-
종료하는 대신 Lateral Thinking Persona를
|
|
389
|
+
종료하는 대신 Lateral Thinking Persona를 순서대로 적용하며 다른 접근을 시도해요:
|
|
270
390
|
|
|
271
|
-
|
|
|
391
|
+
| 답보 상태 패턴 | Persona | 전략 |
|
|
272
392
|
|--------------------|---------|---------|
|
|
273
393
|
| Hard cap 도달 | **Multistability** | 다른 각도로 보기 |
|
|
274
394
|
| 진동하는 점수 | **Simplicity** | 단순하게 줄이고 수렴 |
|
|
275
395
|
| 진전 없음 (no drift) | **Reification** | 빠진 것 채우기 |
|
|
276
|
-
|
|
|
396
|
+
| 효과 감소 | **Invariance** | 성공한 패턴 복제 |
|
|
277
397
|
|
|
278
|
-
4개 Persona를 모두 소진하면 세션이 **Human Escalation**으로
|
|
398
|
+
4개 Persona를 모두 소진하면 세션이 **Human Escalation**으로 종료돼요. 직접 해결할 수 있도록 구체적인 제안도 함께 제공해요.
|
|
279
399
|
|
|
280
400
|
**종료 조건:**
|
|
281
401
|
|
|
@@ -298,7 +418,7 @@ Evolution 완료 후 코드 리뷰 파이프라인이 자동으로 실행돼요:
|
|
|
298
418
|
review_start → 에이전트 관점 제출 → 합의 → 자동 수정
|
|
299
419
|
```
|
|
300
420
|
|
|
301
|
-
9개의 내장 **Role 에이전트**가
|
|
421
|
+
9개의 내장 **Role 에이전트**가 다양한 관점에서 리뷰해요:
|
|
302
422
|
|
|
303
423
|
| 에이전트 | 도메인 |
|
|
304
424
|
|-------|--------|
|
|
@@ -326,7 +446,7 @@ review_start → 에이전트 관점 제출 → 합의 → 자동 수정
|
|
|
326
446
|
# 사용 가능한 에이전트 목록 조회
|
|
327
447
|
/agent
|
|
328
448
|
|
|
329
|
-
# 특정 에이전트로
|
|
449
|
+
# 특정 에이전트로 원하는 태스크 실행
|
|
330
450
|
/agent architect "이 코드베이스의 모듈 경계를 리뷰해줘"
|
|
331
451
|
/agent security-reviewer "이 인증 코드의 취약점을 확인해줘"
|
|
332
452
|
/agent technical-writer "이 모듈의 README를 작성해줘"
|
|
@@ -348,9 +468,9 @@ ges_create_agent → action: "submit", sessionId: "<id>", agentContent: "..."
|
|
|
348
468
|
|
|
349
469
|
---
|
|
350
470
|
|
|
351
|
-
###
|
|
471
|
+
### CLI 모드 (Claude Code 없이 사용하기)
|
|
352
472
|
|
|
353
|
-
|
|
473
|
+
Claude Code 없이 터미널에서 바로 사용하고 싶다면 CLI 모드를 이용할 수 있어요. **`ANTHROPIC_API_KEY`가 필요해요.**
|
|
354
474
|
|
|
355
475
|
```bash
|
|
356
476
|
# 인터랙티브 인터뷰 시작
|
|
@@ -420,7 +540,7 @@ npx @tienne/gestalt setup
|
|
|
420
540
|
|
|
421
541
|
**설정 우선순위** (높음 → 낮음): 코드 override → 쉘 환경변수 → `.env` → `gestalt.json` → 기본값
|
|
422
542
|
|
|
423
|
-
잘못된 값은 경고를 출력하고
|
|
543
|
+
잘못된 값은 경고를 출력하고 기본값을 사용해요.
|
|
424
544
|
|
|
425
545
|
### 환경변수
|
|
426
546
|
|
|
@@ -455,15 +575,19 @@ Claude Code
|
|
|
455
575
|
│ Interview Engine │
|
|
456
576
|
│ ├─ GestaltPrincipleSelector │
|
|
457
577
|
│ ├─ AmbiguityScorer │
|
|
458
|
-
│
|
|
578
|
+
│ ├─ SessionManager │
|
|
579
|
+
│ └─ ContextCompressor │
|
|
459
580
|
│ │
|
|
460
581
|
│ Spec Generator │
|
|
461
|
-
│
|
|
582
|
+
│ ├─ PassthroughSpecGenerator │
|
|
583
|
+
│ └─ SpecTemplateRegistry │
|
|
462
584
|
│ │
|
|
463
585
|
│ Execute Engine │
|
|
464
586
|
│ ├─ DAG Validator │
|
|
587
|
+
│ ├─ ParallelGroupsCalculator │
|
|
465
588
|
│ ├─ DriftDetector │
|
|
466
589
|
│ ├─ EvaluationEngine │
|
|
590
|
+
│ ├─ AuditEngine │
|
|
467
591
|
│ └─ ExecuteSessionManager │
|
|
468
592
|
│ │
|
|
469
593
|
│ Resilience Engine │
|
package/README.md
CHANGED
|
@@ -21,28 +21,33 @@
|
|
|
21
21
|
|
|
22
22
|
## What is Gestalt?
|
|
23
23
|
|
|
24
|
-
Gestalt is an MCP (Model Context Protocol) server that runs inside Claude Code. It conducts structured requirement interviews, generates a validated **Spec** (a JSON document capturing your goal, constraints, and acceptance criteria), and transforms that Spec into a dependency-aware execution plan
|
|
24
|
+
Gestalt is an MCP (Model Context Protocol) server that runs inside Claude Code. It conducts structured requirement interviews, generates a validated **Spec** (a JSON document capturing your goal, constraints, and acceptance criteria), and transforms that Spec into a dependency-aware execution plan.
|
|
25
25
|
|
|
26
26
|
> **Prerequisites:** Node.js >= 20.0.0. Use `nvm install 22 && nvm use 22` if needed.
|
|
27
27
|
|
|
28
28
|
---
|
|
29
29
|
|
|
30
|
-
##
|
|
30
|
+
## Quick Start
|
|
31
31
|
|
|
32
|
-
|
|
32
|
+
Install the plugin once, then use it in any Claude Code session:
|
|
33
33
|
|
|
34
34
|
```bash
|
|
35
|
-
#
|
|
36
|
-
/
|
|
35
|
+
# Step 1: Add to marketplace (one-time setup)
|
|
36
|
+
/plugin marketplace add tienne/gestalt
|
|
37
37
|
|
|
38
|
-
#
|
|
39
|
-
/
|
|
38
|
+
# Step 2: Install the plugin
|
|
39
|
+
/plugin install gestalt@gestalt
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
Then in any Claude Code session:
|
|
40
43
|
|
|
41
|
-
|
|
44
|
+
```bash
|
|
45
|
+
/interview "user authentication system"
|
|
46
|
+
/spec
|
|
42
47
|
/execute
|
|
43
48
|
```
|
|
44
49
|
|
|
45
|
-
|
|
50
|
+
→ **[Full MCP Reference](./docs/mcp-reference.md)** — all tools, parameters, and examples
|
|
46
51
|
|
|
47
52
|
---
|
|
48
53
|
|
|
@@ -85,7 +90,25 @@ You (in Claude Code)
|
|
|
85
90
|
Final Spec → Execution Plan
|
|
86
91
|
```
|
|
87
92
|
|
|
88
|
-
|
|
93
|
+
---
|
|
94
|
+
|
|
95
|
+
## Project Memory
|
|
96
|
+
|
|
97
|
+
Every spec and execution result is automatically recorded in `.gestalt/memory.json` at your repo root.
|
|
98
|
+
|
|
99
|
+
```json
|
|
100
|
+
{
|
|
101
|
+
"specHistory": [
|
|
102
|
+
{ "specId": "...", "goal": "Build a user auth system", "sourceType": "text" }
|
|
103
|
+
],
|
|
104
|
+
"executionHistory": [],
|
|
105
|
+
"architectureDecisions": []
|
|
106
|
+
}
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
- **Commit it** — `.gestalt/memory.json` is plain JSON. Commit it and teammates inherit all prior decisions on `git pull`.
|
|
110
|
+
- **Context injection** — When generating the next spec, prior goals and architecture decisions are automatically injected into the prompt.
|
|
111
|
+
- **User profile** — Personal preferences are stored in `~/.gestalt/profile.json` and are never committed.
|
|
89
112
|
|
|
90
113
|
---
|
|
91
114
|
|
|
@@ -183,11 +206,43 @@ Round 4 → ambiguity: 0.45 (getting clearer)
|
|
|
183
206
|
Round 8 → ambiguity: 0.19 ✓ ready for Spec
|
|
184
207
|
```
|
|
185
208
|
|
|
209
|
+
#### Long interviews: Context Compression
|
|
210
|
+
|
|
211
|
+
When rounds exceed 5, Gestalt automatically signals that compression is available. Use the `compress` action to summarize earlier rounds and keep the context window lean:
|
|
212
|
+
|
|
213
|
+
```
|
|
214
|
+
1. respond returns needsCompression: true + compressionContext
|
|
215
|
+
2. ges_interview({ action: "compress", sessionId }) → compressionContext
|
|
216
|
+
3. Caller generates summary → submits it → stored in session
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
The compressed summary is automatically injected into all subsequent rounds.
|
|
220
|
+
|
|
186
221
|
---
|
|
187
222
|
|
|
188
223
|
### Step 2 — Spec Generation
|
|
189
224
|
|
|
190
|
-
|
|
225
|
+
**Option A — From text (no interview required):**
|
|
226
|
+
|
|
227
|
+
```bash
|
|
228
|
+
ges_generate_spec({ text: "Build a checkout flow with Stripe" })
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
**Option A-2 — With a built-in template:**
|
|
232
|
+
|
|
233
|
+
Three starter templates pre-fill common constraints and acceptance criteria:
|
|
234
|
+
|
|
235
|
+
| Template ID | Description |
|
|
236
|
+
|-------------|-------------|
|
|
237
|
+
| `rest-api` | REST API server with auth, CRUD, and OpenAPI |
|
|
238
|
+
| `react-dashboard` | React dashboard with charts, filters, and responsive layout |
|
|
239
|
+
| `cli-tool` | CLI tool with subcommands, config, and distribution |
|
|
240
|
+
|
|
241
|
+
```bash
|
|
242
|
+
ges_generate_spec({ text: "API with JWT authentication", template: "rest-api" })
|
|
243
|
+
```
|
|
244
|
+
|
|
245
|
+
**Option B — From a completed interview:**
|
|
191
246
|
|
|
192
247
|
```bash
|
|
193
248
|
/spec
|
|
@@ -228,6 +283,66 @@ Transforms the Spec into a dependency-aware execution plan and runs it:
|
|
|
228
283
|
- Jaccard similarity-based measurement
|
|
229
284
|
- Auto-triggers a retrospective when drift exceeds threshold
|
|
230
285
|
|
|
286
|
+
#### Parallel execution groups
|
|
287
|
+
|
|
288
|
+
The `plan_complete` response includes `parallelGroups: string[][]`. Tasks with no mutual dependencies land in the same group and can be executed concurrently:
|
|
289
|
+
|
|
290
|
+
```json
|
|
291
|
+
"parallelGroups": [
|
|
292
|
+
["setup-db", "setup-env"], // run in parallel
|
|
293
|
+
["create-schema"], // after group above
|
|
294
|
+
["seed-data", "run-tests"] // run in parallel
|
|
295
|
+
]
|
|
296
|
+
```
|
|
297
|
+
|
|
298
|
+
#### Resuming an interrupted execution
|
|
299
|
+
|
|
300
|
+
Pick up where you left off when a session is interrupted:
|
|
301
|
+
|
|
302
|
+
```bash
|
|
303
|
+
ges_execute({ action: "resume", sessionId: "<id>" })
|
|
304
|
+
```
|
|
305
|
+
|
|
306
|
+
Returns `ResumeContext`: completed task IDs, next task, and `progressPercent`. The `ges_status` response also includes `resumeContext` automatically for any executing session.
|
|
307
|
+
|
|
308
|
+
#### Brownfield audit
|
|
309
|
+
|
|
310
|
+
When a codebase already exists, audit it against the Spec before executing new tasks:
|
|
311
|
+
|
|
312
|
+
```bash
|
|
313
|
+
# Step 1: request audit context
|
|
314
|
+
ges_execute({ action: "audit", sessionId: "<id>" })
|
|
315
|
+
→ auditContext (systemPrompt, auditPrompt)
|
|
316
|
+
|
|
317
|
+
# Step 2: submit codebase snapshot + audit result
|
|
318
|
+
ges_execute({
|
|
319
|
+
action: "audit",
|
|
320
|
+
sessionId: "<id>",
|
|
321
|
+
codebaseSnapshot: "...",
|
|
322
|
+
auditResult: { implementedACs: [0,2], partialACs: [1], missingACs: [3], gapAnalysis: "..." }
|
|
323
|
+
})
|
|
324
|
+
```
|
|
325
|
+
|
|
326
|
+
#### Real-time progress panel
|
|
327
|
+
|
|
328
|
+
When using the `/execute` slash command, Gestalt displays live execution status in the Claude Code Task panel — showing completed/total tasks, current task name, failed task count, and parallel group progress. Updated automatically at each planning step, task completion, and evaluation stage.
|
|
329
|
+
|
|
330
|
+
#### Sub-agent spawning
|
|
331
|
+
|
|
332
|
+
Decompose a complex task into sub-tasks dynamically during execution:
|
|
333
|
+
|
|
334
|
+
```bash
|
|
335
|
+
ges_execute({
|
|
336
|
+
action: "spawn",
|
|
337
|
+
sessionId: "<id>",
|
|
338
|
+
parentTaskId: "task-3",
|
|
339
|
+
subTasks: [
|
|
340
|
+
{ title: "Write DB schema", description: "..." },
|
|
341
|
+
{ title: "Run migration", description: "...", dependsOn: ["spawned-<id>"] }
|
|
342
|
+
]
|
|
343
|
+
})
|
|
344
|
+
```
|
|
345
|
+
|
|
231
346
|
---
|
|
232
347
|
|
|
233
348
|
### Step 4 — Evaluate
|
|
@@ -341,9 +456,9 @@ ges_create_agent → action: "submit", sessionId: "<id>", agentContent: "..."
|
|
|
341
456
|
|
|
342
457
|
---
|
|
343
458
|
|
|
344
|
-
###
|
|
459
|
+
### CLI Mode (without Claude Code)
|
|
345
460
|
|
|
346
|
-
|
|
461
|
+
Want to run Gestalt without Claude Code? CLI mode runs interviews directly in your terminal. **Requires `ANTHROPIC_API_KEY`.**
|
|
347
462
|
|
|
348
463
|
```bash
|
|
349
464
|
# Start an interactive interview
|
|
@@ -448,15 +563,19 @@ Claude Code (you)
|
|
|
448
563
|
│ Interview Engine │
|
|
449
564
|
│ ├─ GestaltPrincipleSelector │
|
|
450
565
|
│ ├─ AmbiguityScorer │
|
|
451
|
-
│
|
|
566
|
+
│ ├─ SessionManager │
|
|
567
|
+
│ └─ ContextCompressor │
|
|
452
568
|
│ │
|
|
453
569
|
│ Spec Generator │
|
|
454
|
-
│
|
|
570
|
+
│ ├─ PassthroughSpecGenerator │
|
|
571
|
+
│ └─ SpecTemplateRegistry │
|
|
455
572
|
│ │
|
|
456
573
|
│ Execute Engine │
|
|
457
574
|
│ ├─ DAG Validator │
|
|
575
|
+
│ ├─ ParallelGroupsCalculator │
|
|
458
576
|
│ ├─ DriftDetector │
|
|
459
577
|
│ ├─ EvaluationEngine │
|
|
578
|
+
│ ├─ AuditEngine │
|
|
460
579
|
│ └─ ExecuteSessionManager │
|
|
461
580
|
│ │
|
|
462
581
|
│ Resilience Engine │
|
package/dist/package.json
CHANGED
|
@@ -32,8 +32,20 @@ When writing Korean developer documentation, follow these conventions observed i
|
|
|
32
32
|
**Formatting Patterns**
|
|
33
33
|
- Bold key terms on first use: **소모성 아이템**, **비소모성 아이템**
|
|
34
34
|
- Use bullet lists for features, options, and constraints — keep each item concise
|
|
35
|
+
- Use numbered lists when sequence matters — installation steps, API call order, migration procedures
|
|
36
|
+
— Don't: bullet a 3-step setup where step 2 depends on step 1
|
|
37
|
+
— Do: number any list where "do these in order" is part of the instruction
|
|
35
38
|
- Separate distinct concepts with `---` horizontal rules
|
|
36
|
-
-
|
|
39
|
+
- Use callout blocks to signal importance — choose the type based on consequence:
|
|
40
|
+
- 💡 **Tip**: better approach, shortcut, optional improvement
|
|
41
|
+
- 📝 **Note / 참고**: extra context, exception cases, policy notes — use at the end of conceptual sections
|
|
42
|
+
- ⚠️ **Warning / 주의**: incorrect usage causes problems (wrong output, wasted time)
|
|
43
|
+
- 🔴 **Danger / 경고**: data loss, security risk, service outage — reader must not skip this
|
|
44
|
+
— Don't use Note for Danger: "참고로 이 명령어는 데이터를 삭제해요" understates the risk
|
|
45
|
+
- Write descriptive link text — destination should be clear from the link text alone
|
|
46
|
+
— Don't: "자세한 내용은 [여기](...)를 참고하세요."
|
|
47
|
+
— Do: "자세한 내용은 [설치 가이드](...)를 참고하세요."
|
|
48
|
+
— Don't: "See [this](url)." → Do: "See [API authentication guide](url)."
|
|
37
49
|
|
|
38
50
|
**Content Principles**
|
|
39
51
|
- Lead with business value or user benefit, follow with technical detail
|
|
@@ -46,6 +58,26 @@ When writing Korean developer documentation, follow these conventions observed i
|
|
|
46
58
|
- Avoid listing terms inline in introductions if they are covered in a dedicated section below — redundant inline lists interrupt flow without adding value
|
|
47
59
|
|
|
48
60
|
**Korean Sentence Writing**
|
|
61
|
+
|
|
62
|
+
**핵심 원칙: 영어로 생각하고 번역하지 말 것**
|
|
63
|
+
한국어로 직접 작성한다. "dependency-based execution planning"을 머릿속에서 먼저 영어로 구성한 뒤 번역하면 번역체가 된다.
|
|
64
|
+
|
|
65
|
+
- ❌ 의존성 기반 실행 계획 수립 → ✅ 의존성에 따라 실행 순서를 정해요
|
|
66
|
+
- ❌ 스태그네이션 감지 메커니즘이 트리거됩니다 → ✅ 답보 상태를 감지하면 자동으로 분기해요
|
|
67
|
+
- ❌ 스포닝 → ✅ 하위 에이전트 생성
|
|
68
|
+
- ❌ 소급 검토 컨텍스트 → ✅ 회고 컨텍스트
|
|
69
|
+
- ❌ 임의 태스크에 적용 가능합니다 → ✅ 모든 태스크에 적용할 수 있어요
|
|
70
|
+
- ❌ 단락(short-circuit) 처리 → ✅ 조기 종료 처리
|
|
71
|
+
- ❌ 수익 체감 패턴 → ✅ 효과 감소 패턴
|
|
72
|
+
|
|
73
|
+
**기술 용어 3단계 처리**
|
|
74
|
+
|
|
75
|
+
| 단계 | 사용 기준 | 예시 |
|
|
76
|
+
|------|-----------|------|
|
|
77
|
+
| 영어 그대로 | 한국 개발자들이 영어로 통용하는 용어 | API, CLI, JSON, Git, PR, LLM, DAG |
|
|
78
|
+
| 한국어 + 영어 병기 (첫 등장) | 덜 일반적인 전문 용어의 첫 사용 | 이벤트 소싱(Event Sourcing), 단락 회로 실행(Short-circuit Evaluation) |
|
|
79
|
+
| 한국어만 | 자연스러운 한국어 표현이 있는 경우 | 버전 관리 (버저닝 ❌), 배포 (디플로이먼트 ❌) |
|
|
80
|
+
|
|
49
81
|
- Reader is the subject: write so the developer is the actor — use active constructions
|
|
50
82
|
— Don't: "설정이 완료되어야 합니다." → Do: "설정을 완료하세요."
|
|
51
83
|
— Don't: "이 라이브러리는 초기화를 수행해요." → Do: "이 명령어로 초기화하세요."
|
|
@@ -206,7 +238,11 @@ When writing documentation, produce:
|
|
|
206
238
|
- Callout blocks for important notes, warnings, or tips
|
|
207
239
|
|
|
208
240
|
When reviewing existing documentation, provide:
|
|
209
|
-
-
|
|
210
|
-
-
|
|
241
|
+
- Issues classified by severity:
|
|
242
|
+
- **Blocker**: reader can misunderstand, follow wrong steps, or miss a critical risk — must fix before publish
|
|
243
|
+
- **Fix**: clarity, consistency, or structural problem — fix when possible
|
|
244
|
+
- **Suggest**: improvement idea — optional, at author's discretion
|
|
245
|
+
- Specific location (section name or quoted passage) for each issue
|
|
246
|
+
- Rewrite suggestions for all Blocker and Fix items
|
|
211
247
|
- Missing content checklist
|
|
212
248
|
- Overall readability assessment
|