@tienne/gestalt 0.5.1 → 0.6.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/README.backup.md +442 -0
- package/README.ko.md +466 -0
- package/README.md +310 -293
- package/dist/package.json +9 -3
- package/dist/review-agents/performance-reviewer/AGENT.md +31 -0
- package/dist/review-agents/quality-reviewer/AGENT.md +31 -0
- package/dist/review-agents/security-reviewer/AGENT.md +32 -0
- package/dist/role-agents/architect/AGENT.md +30 -0
- package/dist/role-agents/backend-developer/AGENT.md +30 -0
- package/dist/role-agents/designer/AGENT.md +30 -0
- package/dist/role-agents/devops-engineer/AGENT.md +30 -0
- package/dist/role-agents/frontend-developer/AGENT.md +30 -0
- package/dist/role-agents/product-planner/AGENT.md +30 -0
- package/dist/role-agents/qa-engineer/AGENT.md +30 -0
- package/dist/role-agents/researcher/AGENT.md +30 -0
- package/dist/role-agents/technical-writer/AGENT.md +212 -0
- package/dist/skills/agent/SKILL.md +102 -0
- package/dist/skills/execute/SKILL.md +274 -6
- package/dist/src/agent/role-agent-registry.d.ts +4 -2
- package/dist/src/agent/role-agent-registry.d.ts.map +1 -1
- package/dist/src/agent/role-agent-registry.js +12 -3
- package/dist/src/agent/role-agent-registry.js.map +1 -1
- package/dist/src/cli/commands/interview.d.ts +4 -1
- package/dist/src/cli/commands/interview.d.ts.map +1 -1
- package/dist/src/cli/commands/interview.js +55 -2
- package/dist/src/cli/commands/interview.js.map +1 -1
- package/dist/src/cli/index.d.ts.map +1 -1
- package/dist/src/cli/index.js +3 -2
- package/dist/src/cli/index.js.map +1 -1
- package/dist/src/core/config.d.ts +3 -0
- package/dist/src/core/config.d.ts.map +1 -1
- package/dist/src/core/config.js +4 -0
- package/dist/src/core/config.js.map +1 -1
- package/dist/src/core/types.d.ts +28 -0
- package/dist/src/core/types.d.ts.map +1 -1
- package/dist/src/mcp/server.d.ts.map +1 -1
- package/dist/src/mcp/server.js +12 -1
- package/dist/src/mcp/server.js.map +1 -1
- package/dist/src/mcp/tools/agent-passthrough.d.ts +7 -0
- package/dist/src/mcp/tools/agent-passthrough.d.ts.map +1 -0
- package/dist/src/mcp/tools/agent-passthrough.js +49 -0
- package/dist/src/mcp/tools/agent-passthrough.js.map +1 -0
- package/dist/src/recording/filename-generator.d.ts +18 -0
- package/dist/src/recording/filename-generator.d.ts.map +1 -0
- package/dist/src/recording/filename-generator.js +60 -0
- package/dist/src/recording/filename-generator.js.map +1 -0
- package/dist/src/recording/gif-generator.d.ts +21 -0
- package/dist/src/recording/gif-generator.d.ts.map +1 -0
- package/dist/src/recording/gif-generator.js +121 -0
- package/dist/src/recording/gif-generator.js.map +1 -0
- package/dist/src/recording/recording-dir.d.ts +5 -0
- package/dist/src/recording/recording-dir.d.ts.map +1 -0
- package/dist/src/recording/recording-dir.js +13 -0
- package/dist/src/recording/recording-dir.js.map +1 -0
- package/dist/src/recording/resume-detector.d.ts +10 -0
- package/dist/src/recording/resume-detector.d.ts.map +1 -0
- package/dist/src/recording/resume-detector.js +14 -0
- package/dist/src/recording/resume-detector.js.map +1 -0
- package/dist/src/recording/segment-merger.d.ts +27 -0
- package/dist/src/recording/segment-merger.d.ts.map +1 -0
- package/dist/src/recording/segment-merger.js +65 -0
- package/dist/src/recording/segment-merger.js.map +1 -0
- package/dist/src/recording/terminal-recorder.d.ts +31 -0
- package/dist/src/recording/terminal-recorder.d.ts.map +1 -0
- package/dist/src/recording/terminal-recorder.js +111 -0
- package/dist/src/recording/terminal-recorder.js.map +1 -0
- package/package.json +9 -3
- package/review-agents/performance-reviewer/AGENT.md +31 -0
- package/review-agents/quality-reviewer/AGENT.md +31 -0
- package/review-agents/security-reviewer/AGENT.md +32 -0
- package/role-agents/architect/AGENT.md +30 -0
- package/role-agents/backend-developer/AGENT.md +30 -0
- package/role-agents/designer/AGENT.md +30 -0
- package/role-agents/devops-engineer/AGENT.md +30 -0
- package/role-agents/frontend-developer/AGENT.md +30 -0
- package/role-agents/product-planner/AGENT.md +30 -0
- package/role-agents/qa-engineer/AGENT.md +30 -0
- package/role-agents/researcher/AGENT.md +30 -0
- package/role-agents/technical-writer/AGENT.md +212 -0
- package/skills/agent/SKILL.md +102 -0
- package/skills/execute/SKILL.md +274 -6
package/README.md
CHANGED
|
@@ -3,349 +3,381 @@
|
|
|
3
3
|
</p>
|
|
4
4
|
|
|
5
5
|
<p align="center">
|
|
6
|
-
<strong>Gestalt
|
|
7
|
-
|
|
6
|
+
<strong>Gestalt — AI Development Harness</strong><br/>
|
|
7
|
+
Turn vague requirements into structured, executable plans — right inside Claude Code.
|
|
8
8
|
</p>
|
|
9
9
|
|
|
10
10
|
<p align="center">
|
|
11
|
-
<a href="https://github.com/tienne/gestalt/actions/workflows/ci.yml"><img src="https://github.com/tienne/gestalt/actions/workflows/ci.yml/badge.svg" alt="CI" /></a>
|
|
12
11
|
<a href="https://www.npmjs.com/package/@tienne/gestalt"><img src="https://img.shields.io/npm/v/@tienne/gestalt" alt="npm version" /></a>
|
|
12
|
+
<a href="LICENSE"><img src="https://img.shields.io/badge/license-MIT-blue.svg" alt="MIT License" /></a>
|
|
13
|
+
<a href="https://github.com/tienne/gestalt/actions/workflows/ci.yml"><img src="https://github.com/tienne/gestalt/actions/workflows/ci.yml/badge.svg" alt="CI" /></a>
|
|
14
|
+
</p>
|
|
15
|
+
|
|
16
|
+
<p align="center">
|
|
17
|
+
<a href="./README.ko.md">한국어</a>
|
|
13
18
|
</p>
|
|
14
19
|
|
|
15
20
|
---
|
|
16
21
|
|
|
17
|
-
##
|
|
22
|
+
## What is Gestalt?
|
|
18
23
|
|
|
19
|
-
|
|
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 — all without a separate API key.
|
|
20
25
|
|
|
21
|
-
|
|
22
|
-
node --version # v20.x.x 이상이어야 합니다
|
|
23
|
-
```
|
|
26
|
+
> **Prerequisites:** Node.js >= 20.0.0. Use `nvm install 22 && nvm use 22` if needed.
|
|
24
27
|
|
|
25
|
-
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
## See it in action
|
|
31
|
+
|
|
32
|
+
> **30 seconds to a structured execution plan** — no API key needed.
|
|
26
33
|
|
|
27
34
|
```bash
|
|
28
|
-
|
|
29
|
-
|
|
35
|
+
# Start a Gestalt-driven requirements interview
|
|
36
|
+
/interview "user authentication system"
|
|
37
|
+
|
|
38
|
+
# Once the interview is done, generate a structured Spec
|
|
39
|
+
/spec
|
|
40
|
+
|
|
41
|
+
# Transform the Spec into a validated execution plan and run it
|
|
42
|
+
/execute
|
|
30
43
|
```
|
|
31
44
|
|
|
32
|
-
|
|
45
|
+
_(Demo coming soon.)_
|
|
33
46
|
|
|
34
|
-
|
|
47
|
+
---
|
|
35
48
|
|
|
36
|
-
|
|
49
|
+
## Why Gestalt?
|
|
37
50
|
|
|
38
|
-
|
|
39
|
-
# 1. 마켓플레이스 등록 (최초 1회)
|
|
40
|
-
/plugin marketplace add tienne/gestalt
|
|
51
|
+
Vague requirements are the primary source of implementation drift. When the goal isn't precise, Claude fills in gaps with assumptions — and those assumptions diverge from intent as the project grows.
|
|
41
52
|
|
|
42
|
-
|
|
43
|
-
/plugin install gestalt@gestalt
|
|
44
|
-
```
|
|
53
|
+
Gestalt addresses this at the source. Before any code is written, it runs a structured interview guided by **Gestalt psychology principles** to reduce ambiguity to a measurable threshold (≤ 0.2). The result is a **Spec**: a validated JSON document that serves as the single source of truth for planning and execution.
|
|
45
54
|
|
|
46
|
-
|
|
55
|
+
### The Five Gestalt Principles
|
|
47
56
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
| **CLAUDE.md** | 프로젝트 컨텍스트 및 MCP 사용 가이드 자동 주입 |
|
|
57
|
+
- **Closure** — Finds what's missing; fills in implicit requirements
|
|
58
|
+
- **Proximity** — Groups related features and tasks by domain
|
|
59
|
+
- **Similarity** — Identifies repeating patterns across requirements
|
|
60
|
+
- **Figure-Ground** — Separates MVP (figure) from nice-to-have (ground)
|
|
61
|
+
- **Continuity** — Validates dependency chains; detects contradictions
|
|
54
62
|
|
|
55
|
-
|
|
63
|
+
> "The whole is greater than the sum of its parts." — Aristotle
|
|
56
64
|
|
|
57
|
-
|
|
58
|
-
/interview "사용자 인증 시스템" # 요구사항 인터뷰 시작
|
|
59
|
-
/spec # 인터뷰 완료 후 Spec 생성
|
|
60
|
-
/execute # Spec 기반 실행 계획 수립 및 실행
|
|
61
|
-
```
|
|
65
|
+
### How does Passthrough Mode work?
|
|
62
66
|
|
|
63
|
-
|
|
67
|
+
Gestalt runs as an **MCP server**. Claude Code acts as the LLM: Gestalt returns prompts and context, and Claude Code does the reasoning. The server makes no API calls.
|
|
64
68
|
|
|
65
|
-
```
|
|
66
|
-
|
|
69
|
+
```
|
|
70
|
+
You (in Claude Code)
|
|
71
|
+
│
|
|
72
|
+
▼ /interview "topic"
|
|
73
|
+
Gestalt MCP Server
|
|
74
|
+
(returns context + prompts)
|
|
75
|
+
│
|
|
76
|
+
▼
|
|
77
|
+
Claude Code executes the prompts
|
|
78
|
+
(generates questions, scores, plans)
|
|
79
|
+
│
|
|
80
|
+
▼
|
|
81
|
+
Gestalt MCP Server
|
|
82
|
+
(validates, stores state, advances)
|
|
83
|
+
│
|
|
84
|
+
▼ repeat until ambiguity ≤ 0.2
|
|
85
|
+
Final Spec → Execution Plan
|
|
67
86
|
```
|
|
68
87
|
|
|
69
|
-
|
|
88
|
+
`ANTHROPIC_API_KEY` is not required. All LLM work is handled by Claude Code.
|
|
70
89
|
|
|
71
|
-
|
|
72
|
-
npx -y @tienne/gestalt
|
|
73
|
-
```
|
|
90
|
+
---
|
|
74
91
|
|
|
75
|
-
|
|
92
|
+
## Installation
|
|
76
93
|
|
|
77
|
-
|
|
78
|
-
npm install -g @tienne/gestalt
|
|
79
|
-
gestalt
|
|
80
|
-
```
|
|
94
|
+
### Option 1: Claude Code Plugin (Recommended)
|
|
81
95
|
|
|
82
|
-
|
|
96
|
+
Bundles the MCP server, slash-command skills, Gestalt agents, and project context — pre-configured in a single install.
|
|
83
97
|
|
|
98
|
+
```bash
|
|
99
|
+
# Step 1: Add to marketplace (one-time setup)
|
|
100
|
+
/plugin marketplace add tienne/gestalt
|
|
101
|
+
|
|
102
|
+
# Step 2: Install the plugin
|
|
103
|
+
/plugin install gestalt@gestalt
|
|
84
104
|
```
|
|
85
|
-
Interview → Spec → Execute → Evaluate → Evolve
|
|
86
|
-
↓
|
|
87
|
-
Lateral Thinking (resilience)
|
|
88
|
-
↓
|
|
89
|
-
Human Escalation (if exhausted)
|
|
90
|
-
```
|
|
91
105
|
|
|
92
|
-
|
|
106
|
+
What you get out of the box:
|
|
107
|
+
|
|
108
|
+
| Item | Details |
|
|
109
|
+
|------|---------|
|
|
110
|
+
| **MCP Tools** | `ges_interview`, `ges_generate_spec`, `ges_execute`, `ges_create_agent`, `ges_agent`, `ges_status` |
|
|
111
|
+
| **Slash Commands** | `/interview`, `/spec`, `/execute`, `/agent` |
|
|
112
|
+
| **Agents** | 5 Gestalt pipeline agents + 9 Role agents + 3 Review agents |
|
|
113
|
+
| **CLAUDE.md** | Project context and MCP usage guide auto-injected |
|
|
93
114
|
|
|
94
|
-
|
|
115
|
+
> **Requires Node.js >= 20.0.0** — use [nvm](https://github.com/nvm-sh/nvm) if needed: `nvm install 22 && nvm use 22`
|
|
95
116
|
|
|
96
|
-
|
|
97
|
-
- 5가지 Gestalt 원리 기반 동적 질문 선택 알고리즘
|
|
98
|
-
- 차원별 가중치 기반 모호성 점수 산출
|
|
99
|
-
- 모순 감지 시 Continuity 원리 자동 개입 + 페널티 부여
|
|
117
|
+
---
|
|
100
118
|
|
|
101
|
-
### 2
|
|
119
|
+
### Option 2: Claude Code Desktop
|
|
102
120
|
|
|
103
|
-
|
|
121
|
+
Open your Claude Code Desktop settings and add to `settings.json` (or `claude_desktop_config.json`):
|
|
104
122
|
|
|
105
|
-
```
|
|
106
|
-
|
|
107
|
-
|
|
123
|
+
```json
|
|
124
|
+
{
|
|
125
|
+
"mcpServers": {
|
|
126
|
+
"gestalt": {
|
|
127
|
+
"command": "npx",
|
|
128
|
+
"args": ["-y", "@tienne/gestalt"]
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
}
|
|
108
132
|
```
|
|
109
133
|
|
|
110
|
-
|
|
134
|
+
Restart Claude Code Desktop. The MCP tools become available immediately. Slash commands require the plugin or manual skills setup.
|
|
111
135
|
|
|
112
|
-
|
|
136
|
+
---
|
|
113
137
|
|
|
114
|
-
|
|
138
|
+
### Option 3: Claude Code CLI
|
|
115
139
|
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
| 3 | **Proximity** | 관련 태스크를 도메인/기능 영역별로 그룹핑 |
|
|
121
|
-
| 4 | **Continuity** | DAG 검증 — 순환 의존, 그룹 간 충돌 확인, 위상 정렬 |
|
|
140
|
+
```bash
|
|
141
|
+
# Via the claude CLI
|
|
142
|
+
claude mcp add gestalt -- npx -y @tienne/gestalt
|
|
143
|
+
```
|
|
122
144
|
|
|
123
|
-
|
|
145
|
+
Or edit `~/.claude/settings.json` directly:
|
|
124
146
|
|
|
125
|
-
|
|
147
|
+
```json
|
|
148
|
+
{
|
|
149
|
+
"mcpServers": {
|
|
150
|
+
"gestalt": {
|
|
151
|
+
"command": "npx",
|
|
152
|
+
"args": ["-y", "@tienne/gestalt"]
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
```
|
|
126
157
|
|
|
127
|
-
|
|
158
|
+
---
|
|
128
159
|
|
|
129
|
-
|
|
160
|
+
## Usage: Full Pipeline
|
|
130
161
|
|
|
131
|
-
|
|
132
|
-
- Jaccard 기반 키워드 유사도 측정
|
|
133
|
-
- Threshold(기본 0.3) 초과 시 `retrospectiveContext` 반환
|
|
162
|
+
### Step 1 — Interview
|
|
134
163
|
|
|
135
|
-
|
|
164
|
+
Start with any topic. A single rough sentence is enough.
|
|
136
165
|
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
| 2 | **Contextual** | LLM 기반 완료 조건(AC) 검증 + goalAlignment | Evolution Loop 진입 |
|
|
166
|
+
```bash
|
|
167
|
+
/interview "I want to build a checkout flow with Stripe"
|
|
168
|
+
```
|
|
141
169
|
|
|
142
|
-
|
|
170
|
+
Gestalt conducts a multi-round interview. Each round targets a specific ambiguity dimension:
|
|
143
171
|
|
|
144
|
-
|
|
172
|
+
- **Closure** — What's missing? What did you assume but not say?
|
|
173
|
+
- **Proximity** — Which features belong together?
|
|
174
|
+
- **Similarity** — Are there repeating patterns across requirements?
|
|
175
|
+
- **Figure-Ground** — What's the core MVP vs. what's optional?
|
|
176
|
+
- **Continuity** — Any contradictions or conflicts?
|
|
145
177
|
|
|
146
|
-
|
|
178
|
+
The interview continues until the **ambiguity score reaches ≤ 0.2**:
|
|
147
179
|
|
|
148
|
-
**Flow A — Structural Fix** (structural 실패 시)
|
|
149
180
|
```
|
|
150
|
-
|
|
181
|
+
Round 1 → ambiguity: 0.72 (lots of unknowns)
|
|
182
|
+
Round 4 → ambiguity: 0.45 (getting clearer)
|
|
183
|
+
Round 8 → ambiguity: 0.19 ✓ ready for Spec
|
|
151
184
|
```
|
|
152
185
|
|
|
153
|
-
|
|
154
|
-
```
|
|
155
|
-
evolve → evolve_patch(specPatch) → evolve_re_execute(impacted tasks) → re-evaluate
|
|
156
|
-
```
|
|
186
|
+
---
|
|
157
187
|
|
|
158
|
-
|
|
188
|
+
### Step 2 — Spec Generation
|
|
159
189
|
|
|
160
|
-
|
|
190
|
+
When the ambiguity score reaches ≤ 0.2, run:
|
|
161
191
|
|
|
162
|
-
|
|
192
|
+
```bash
|
|
193
|
+
/spec
|
|
194
|
+
```
|
|
163
195
|
|
|
164
|
-
|
|
196
|
+
Generates a structured **Spec** — a validated JSON document that drives the rest of the pipeline:
|
|
165
197
|
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
| `human_escalation` | Lateral Thinking 4개 persona 모두 실패 |
|
|
198
|
+
```
|
|
199
|
+
goal → Clear, unambiguous project objective
|
|
200
|
+
constraints → Technical and business constraints
|
|
201
|
+
acceptanceCriteria → Measurable, verifiable success conditions
|
|
202
|
+
ontologySchema → Entity-relationship model (entities + relations)
|
|
203
|
+
gestaltAnalysis → Key findings per Gestalt principle
|
|
204
|
+
```
|
|
174
205
|
|
|
175
|
-
|
|
206
|
+
---
|
|
176
207
|
|
|
177
|
-
|
|
208
|
+
### Step 3 — Execute (Planning + Execution)
|
|
178
209
|
|
|
179
|
-
|
|
180
|
-
|-----------|----------------|
|
|
181
|
-
| **Closure** | Finds implicit requirements that aren't explicitly stated |
|
|
182
|
-
| **Proximity** | Groups related requirements and tasks by domain |
|
|
183
|
-
| **Continuation** | Validates dependency chains and execution order (DAG) |
|
|
184
|
-
| **Similarity** | Identifies repeating patterns across requirements |
|
|
185
|
-
| **Figure & Ground** | Separates core (figure) from supporting (ground) requirements |
|
|
210
|
+
Transforms the Spec into a dependency-aware execution plan and runs it:
|
|
186
211
|
|
|
187
|
-
|
|
212
|
+
```bash
|
|
213
|
+
/execute
|
|
214
|
+
```
|
|
188
215
|
|
|
189
|
-
|
|
216
|
+
**Planning phase** applies 4 Gestalt principles in a fixed sequence:
|
|
190
217
|
|
|
191
|
-
|
|
218
|
+
| Step | Principle | What it does |
|
|
219
|
+
|:---:|-----------|-------------|
|
|
220
|
+
| 1 | **Figure-Ground** | Classifies acceptance criteria (ACs) as critical (figure) vs. supplementary (ground) |
|
|
221
|
+
| 2 | **Closure** | Decomposes ACs into atomic tasks, including implicit ones |
|
|
222
|
+
| 3 | **Proximity** | Groups related tasks by domain into logical task groups |
|
|
223
|
+
| 4 | **Continuity** | Validates the dependency DAG — no cycles, clear topological order |
|
|
192
224
|
|
|
193
|
-
|
|
194
|
-
|--------------------|---------|----------|
|
|
195
|
-
| Spinning (hard cap) | **Multistability** | See from a different angle |
|
|
196
|
-
| Oscillation | **Simplicity** | Simplify and converge |
|
|
197
|
-
| No drift | **Reification** | Fill in missing pieces |
|
|
198
|
-
| Diminishing returns | **Invariance** | Replicate success patterns |
|
|
225
|
+
**Execution phase** runs tasks in topological order. After each task, **drift detection** checks alignment with the Spec:
|
|
199
226
|
|
|
200
|
-
|
|
227
|
+
- 3-dimensional score: Goal (50%) + Constraint (30%) + Ontology (20%)
|
|
228
|
+
- Jaccard similarity-based measurement
|
|
229
|
+
- Auto-triggers a retrospective when drift exceeds threshold
|
|
201
230
|
|
|
202
|
-
|
|
231
|
+
---
|
|
203
232
|
|
|
204
|
-
|
|
233
|
+
### Step 4 — Evaluate
|
|
205
234
|
|
|
206
|
-
|
|
207
|
-
|---|---|---|
|
|
208
|
-
| `architect` | system design, scalability | 시스템 아키텍처 전문가 |
|
|
209
|
-
| `backend-developer` | api, database, server | 백엔드 개발 전문가 |
|
|
210
|
-
| `frontend-developer` | ui, react, css, accessibility | 프론트엔드 개발 전문가 |
|
|
211
|
-
| `designer` | ux, ui, design system | UX/UI 디자인 전문가 |
|
|
212
|
-
| `devops-engineer` | ci/cd, infra, monitoring | DevOps/인프라 전문가 |
|
|
213
|
-
| `product-planner` | roadmap, user story, metrics | 제품 기획 전문가 |
|
|
214
|
-
| `qa-engineer` | testing, quality, automation | QA/테스트 전문가 |
|
|
215
|
-
| `researcher` | analysis, data, benchmarks | 리서치 및 분석 전문가 |
|
|
235
|
+
Execution triggers a 2-stage evaluation:
|
|
216
236
|
|
|
217
|
-
|
|
237
|
+
| Stage | Method | On failure |
|
|
238
|
+
|:---:|-------|-----------|
|
|
239
|
+
| 1 | **Structural** — runs lint → build → test | Short-circuits; skips Stage 2 |
|
|
240
|
+
| 2 | **Contextual** — LLM validates each AC + goal alignment | Enters Evolution Loop |
|
|
218
241
|
|
|
219
|
-
|
|
242
|
+
**Success condition:** `score ≥ 0.85` AND `goalAlignment ≥ 0.80`
|
|
220
243
|
|
|
221
|
-
|
|
222
|
-
2. **Role Consensus** — 선택된 Agent들의 관점을 수집하고, 충돌을 해소하여 통합 가이던스 생성
|
|
244
|
+
---
|
|
223
245
|
|
|
224
|
-
###
|
|
246
|
+
### Step 5 — Evolve
|
|
225
247
|
|
|
226
|
-
|
|
248
|
+
When evaluation fails, the Evolution Loop engages. Three recovery flows are available:
|
|
227
249
|
|
|
250
|
+
**Flow A — Structural Fix** (when lint/build/test fails)
|
|
251
|
+
```
|
|
252
|
+
evolve_fix → submit fix tasks → re-evaluate
|
|
228
253
|
```
|
|
229
|
-
# 1. 인터뷰 완료 후 agent creation context 요청
|
|
230
|
-
ges_create_agent({ action: "start", sessionId: "<id>" })
|
|
231
|
-
→ systemPrompt + creationPrompt + agentMdSchema 반환
|
|
232
254
|
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
→
|
|
255
|
+
**Flow B — Contextual Evolution** (when AC score is too low)
|
|
256
|
+
```
|
|
257
|
+
evolve → patch Spec (ACs/constraints) → re-execute impacted tasks → re-evaluate
|
|
236
258
|
```
|
|
237
259
|
|
|
238
|
-
|
|
260
|
+
Spec patch scope: ACs and constraints are freely editable; ontology can be extended; **goal is immutable**.
|
|
239
261
|
|
|
240
|
-
|
|
262
|
+
**Flow C — Lateral Thinking** (when stagnation is detected)
|
|
241
263
|
|
|
242
|
-
|
|
243
|
-
---
|
|
244
|
-
name: security-expert # 에이전트 이름 (kebab-case)
|
|
245
|
-
tier: standard # frugal | standard | frontier
|
|
246
|
-
pipeline: execute # interview | spec | execute | evaluate
|
|
247
|
-
role: true # Role Agent 필수
|
|
248
|
-
domain: ["oauth", "jwt"] # 도메인 키워드 목록
|
|
249
|
-
description: "보안 전문가" # 한줄 설명
|
|
250
|
-
---
|
|
264
|
+
Gestalt rotates through lateral thinking personas rather than terminating:
|
|
251
265
|
|
|
252
|
-
|
|
253
|
-
|
|
266
|
+
| Stagnation Pattern | Persona | Strategy |
|
|
267
|
+
|--------------------|---------|---------|
|
|
268
|
+
| Hard cap hit | **Multistability** | See from a different angle |
|
|
269
|
+
| Oscillating scores | **Simplicity** | Strip down and converge |
|
|
270
|
+
| No progress (no drift) | **Reification** | Fill in what's missing |
|
|
271
|
+
| Diminishing returns | **Invariance** | Replicate what worked |
|
|
254
272
|
|
|
255
|
-
|
|
273
|
+
When all 4 personas are exhausted, the session terminates with **Human Escalation** — a structured list of actionable suggestions for manual resolution.
|
|
256
274
|
|
|
257
|
-
|
|
275
|
+
**Termination conditions:**
|
|
258
276
|
|
|
259
|
-
|
|
|
260
|
-
|
|
261
|
-
| `
|
|
262
|
-
| `
|
|
263
|
-
| `
|
|
264
|
-
| `
|
|
265
|
-
| `
|
|
277
|
+
| Condition | Trigger |
|
|
278
|
+
|-----------|---------|
|
|
279
|
+
| `success` | score ≥ 0.85 AND goalAlignment ≥ 0.80 |
|
|
280
|
+
| `stagnation` | 2 consecutive rounds with delta < 0.05 |
|
|
281
|
+
| `oscillation` | 2 consecutive score reversals |
|
|
282
|
+
| `hard_cap` | 3 structural + 3 contextual failures |
|
|
283
|
+
| `caller` | Manual termination |
|
|
284
|
+
| `human_escalation` | All 4 lateral personas exhausted |
|
|
266
285
|
|
|
267
|
-
|
|
286
|
+
---
|
|
268
287
|
|
|
269
|
-
|
|
288
|
+
### Step 6 — Code Review
|
|
270
289
|
|
|
271
|
-
|
|
272
|
-
|---|---|
|
|
273
|
-
| `interview` | 인터뷰 프로세스 — 4단계 (start → iterate → score → complete) |
|
|
274
|
-
| `spec` | Spec 생성 프로세스 — 2-Call Passthrough 패턴 |
|
|
275
|
-
| `execute` | 실행 계획 수립 — 4단계 Planning + Execution + Evaluation |
|
|
290
|
+
When evolution finishes, code review starts automatically:
|
|
276
291
|
|
|
277
|
-
|
|
292
|
+
```
|
|
293
|
+
review_start → agents submit perspectives → consensus → auto-fix
|
|
294
|
+
```
|
|
278
295
|
|
|
279
|
-
|
|
280
|
-
---
|
|
281
|
-
name: interview
|
|
282
|
-
version: "1.0.0"
|
|
283
|
-
description: "Gestalt-driven interview"
|
|
284
|
-
triggers: ["interview", "clarify requirements"]
|
|
285
|
-
inputs:
|
|
286
|
-
topic: { type: string, required: true }
|
|
287
|
-
outputs: [session, ambiguityScore]
|
|
288
|
-
---
|
|
296
|
+
9 built-in **Role Agents** provide multi-perspective review:
|
|
289
297
|
|
|
290
|
-
|
|
291
|
-
|
|
298
|
+
| Agent | Domain |
|
|
299
|
+
|-------|--------|
|
|
300
|
+
| `architect` | System design, scalability |
|
|
301
|
+
| `frontend-developer` | UI, React, accessibility |
|
|
302
|
+
| `backend-developer` | API, database, server |
|
|
303
|
+
| `devops-engineer` | CI/CD, infrastructure, monitoring |
|
|
304
|
+
| `qa-engineer` | Testing, quality, automation |
|
|
305
|
+
| `designer` | UX/UI, design systems |
|
|
306
|
+
| `product-planner` | Roadmap, user stories, metrics |
|
|
307
|
+
| `researcher` | Analysis, data, benchmarks |
|
|
308
|
+
| `technical-writer` | Documentation, API docs, guides, README |
|
|
292
309
|
|
|
293
|
-
|
|
310
|
+
3 built-in **Review Agents** run focused code analysis:
|
|
294
311
|
|
|
295
|
-
|
|
312
|
+
| Agent | Focus |
|
|
313
|
+
|-------|-------|
|
|
314
|
+
| `security-reviewer` | Injection, XSS, auth vulnerabilities, secrets |
|
|
315
|
+
| `performance-reviewer` | Memory leaks, N+1 queries, bundle size, async |
|
|
316
|
+
| `quality-reviewer` | Readability, SOLID, error handling, DRY |
|
|
296
317
|
|
|
297
|
-
|
|
318
|
+
Use any agent outside the pipeline with `/agent`:
|
|
298
319
|
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
| `standard` | Anthropic | claude-sonnet | 일반 태스크 (closure-completer, ground-mapper) |
|
|
303
|
-
| `frontier` | Anthropic | claude-opus | 고품질 판단 (continuity-judge) |
|
|
320
|
+
```bash
|
|
321
|
+
# List all available agents
|
|
322
|
+
/agent
|
|
304
323
|
|
|
305
|
-
|
|
324
|
+
# Run a specific agent on any task
|
|
325
|
+
/agent architect "review the module boundaries in this codebase"
|
|
326
|
+
/agent security-reviewer "check this authentication code for vulnerabilities"
|
|
327
|
+
/agent technical-writer "write a README for this module"
|
|
328
|
+
```
|
|
306
329
|
|
|
307
|
-
|
|
330
|
+
Generate custom Role Agents from interview results:
|
|
308
331
|
|
|
309
|
-
|
|
332
|
+
```
|
|
333
|
+
# Step 1: Get agent creation context
|
|
334
|
+
ges_create_agent → action: "start", sessionId: "<id>"
|
|
335
|
+
→ returns agentContext (systemPrompt, creationPrompt, schema)
|
|
310
336
|
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
- Agent 이벤트: role match/consensus, agent created
|
|
337
|
+
# Step 2: Submit the generated AGENT.md content
|
|
338
|
+
ges_create_agent → action: "submit", sessionId: "<id>", agentContent: "..."
|
|
339
|
+
→ creates agents/{name}/AGENT.md
|
|
340
|
+
```
|
|
316
341
|
|
|
317
|
-
|
|
342
|
+
---
|
|
318
343
|
|
|
319
|
-
|
|
344
|
+
### Alternative: CLI Direct Mode
|
|
345
|
+
|
|
346
|
+
Requires `ANTHROPIC_API_KEY`. Runs Gestalt directly from the terminal without Claude Code:
|
|
320
347
|
|
|
321
348
|
```bash
|
|
322
|
-
|
|
323
|
-
gestalt
|
|
324
|
-
gestalt interview "topic" # Interactive interview
|
|
325
|
-
gestalt spec <session-id> # Generate Spec from interview
|
|
326
|
-
gestalt status # List all sessions
|
|
327
|
-
gestalt setup # Generate gestalt.json config file
|
|
328
|
-
gestalt monitor # TUI dashboard (real-time session monitoring)
|
|
329
|
-
```
|
|
349
|
+
# Start an interactive interview
|
|
350
|
+
npx @tienne/gestalt interview "my topic"
|
|
330
351
|
|
|
331
|
-
|
|
352
|
+
# Generate Spec from a completed session
|
|
353
|
+
npx @tienne/gestalt spec <session-id>
|
|
332
354
|
|
|
333
|
-
|
|
355
|
+
# List all sessions
|
|
356
|
+
npx @tienne/gestalt status
|
|
334
357
|
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
358
|
+
# Generate gestalt.json config
|
|
359
|
+
npx @tienne/gestalt setup
|
|
360
|
+
|
|
361
|
+
# Start the MCP server manually
|
|
362
|
+
npx @tienne/gestalt serve
|
|
363
|
+
```
|
|
364
|
+
|
|
365
|
+
---
|
|
341
366
|
|
|
342
367
|
## Configuration
|
|
343
368
|
|
|
344
|
-
|
|
369
|
+
Generate a `gestalt.json` with IDE autocompletion support:
|
|
370
|
+
|
|
371
|
+
```bash
|
|
372
|
+
npx @tienne/gestalt setup
|
|
373
|
+
```
|
|
345
374
|
|
|
346
375
|
```json
|
|
347
376
|
{
|
|
348
377
|
"$schema": "./node_modules/@tienne/gestalt/schemas/gestalt.schema.json",
|
|
378
|
+
"llm": {
|
|
379
|
+
"model": "claude-sonnet-4-20250514"
|
|
380
|
+
},
|
|
349
381
|
"interview": {
|
|
350
382
|
"ambiguityThreshold": 0.2,
|
|
351
383
|
"maxRounds": 10
|
|
@@ -358,85 +390,70 @@ Run `gestalt setup` to generate a `gestalt.json` configuration file with IDE aut
|
|
|
358
390
|
}
|
|
359
391
|
```
|
|
360
392
|
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
1. Code overrides (`loadConfig(overrides)`)
|
|
364
|
-
2. Shell environment variables (`GESTALT_*`)
|
|
365
|
-
3. `.env` file
|
|
366
|
-
4. `gestalt.json`
|
|
367
|
-
5. Built-in defaults
|
|
393
|
+
**Config priority** (highest → lowest): code overrides → shell env vars → `.env` → `gestalt.json` → built-in defaults
|
|
368
394
|
|
|
369
|
-
Invalid values
|
|
395
|
+
Invalid values emit a warning and fall back to defaults.
|
|
370
396
|
|
|
371
397
|
### Environment Variables
|
|
372
398
|
|
|
373
|
-
| Variable | Config Path | Default |
|
|
374
|
-
|
|
375
|
-
| `ANTHROPIC_API_KEY` | `llm.apiKey` | `""` |
|
|
376
|
-
| `GESTALT_MODEL` | `llm.model` | `claude-sonnet-4-20250514` |
|
|
377
|
-
| `GESTALT_AMBIGUITY_THRESHOLD` | `interview.ambiguityThreshold` | `0.2` |
|
|
378
|
-
| `GESTALT_MAX_ROUNDS` | `interview.maxRounds` | `10` |
|
|
379
|
-
| `GESTALT_DRIFT_THRESHOLD` | `execute.driftThreshold` | `0.3` |
|
|
380
|
-
| `GESTALT_EVOLVE_SUCCESS_THRESHOLD` | `execute.successThreshold` | `0.85` |
|
|
381
|
-
| `GESTALT_EVOLVE_GOAL_ALIGNMENT_THRESHOLD` | `execute.goalAlignmentThreshold` | `0.80` |
|
|
382
|
-
| `GESTALT_DB_PATH` | `dbPath` | `~/.gestalt/events.db` |
|
|
383
|
-
| `GESTALT_SKILLS_DIR` | `skillsDir` | `skills` |
|
|
384
|
-
| `GESTALT_AGENTS_DIR` | `agentsDir` | `agents` |
|
|
385
|
-
| `GESTALT_LOG_LEVEL` | `logLevel` | `info` |
|
|
386
|
-
|
|
387
|
-
## Operating Modes
|
|
388
|
-
|
|
389
|
-
Gestalt supports two operating modes:
|
|
390
|
-
|
|
391
|
-
| Mode | API Key | LLM Calls | Use Case |
|
|
392
|
-
|---|---|---|---|
|
|
393
|
-
| **Passthrough** (default) | Not needed | Caller (e.g., Claude Code) | MCP 통합 환경에서 권장 |
|
|
394
|
-
| **Provider-backed** | `ANTHROPIC_API_KEY` 필요 | Gestalt가 직접 호출 | 독립 실행 (CLI 등) |
|
|
399
|
+
| Variable | Config Path | Default | Description |
|
|
400
|
+
|----------|-------------|---------|-------------|
|
|
401
|
+
| `ANTHROPIC_API_KEY` | `llm.apiKey` | `""` | Required only for CLI direct mode |
|
|
402
|
+
| `GESTALT_MODEL` | `llm.model` | `claude-sonnet-4-20250514` | LLM model (provider-backed mode) |
|
|
403
|
+
| `GESTALT_AMBIGUITY_THRESHOLD` | `interview.ambiguityThreshold` | `0.2` | Interview completion threshold |
|
|
404
|
+
| `GESTALT_MAX_ROUNDS` | `interview.maxRounds` | `10` | Max interview rounds |
|
|
405
|
+
| `GESTALT_DRIFT_THRESHOLD` | `execute.driftThreshold` | `0.3` | Task drift detection threshold |
|
|
406
|
+
| `GESTALT_EVOLVE_SUCCESS_THRESHOLD` | `execute.successThreshold` | `0.85` | Evolution success score |
|
|
407
|
+
| `GESTALT_EVOLVE_GOAL_ALIGNMENT_THRESHOLD` | `execute.goalAlignmentThreshold` | `0.80` | Goal alignment threshold |
|
|
408
|
+
| `GESTALT_DB_PATH` | `dbPath` | `~/.gestalt/events.db` | SQLite event store path |
|
|
409
|
+
| `GESTALT_SKILLS_DIR` | `skillsDir` | `skills` | Custom skills directory |
|
|
410
|
+
| `GESTALT_AGENTS_DIR` | `agentsDir` | `agents` | Custom agents directory |
|
|
411
|
+
| `GESTALT_LOG_LEVEL` | `logLevel` | `info` | Log level (`debug`/`info`/`warn`/`error`) |
|
|
395
412
|
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
Gestalt runs in passthrough mode by default: it returns prompts and context to the calling LLM (e.g., Claude Code) instead of making its own API calls. No `ANTHROPIC_API_KEY` needed.
|
|
399
|
-
|
|
400
|
-
### Provider-backed Mode
|
|
401
|
-
|
|
402
|
-
`ANTHROPIC_API_KEY`를 설정하면 Gestalt가 직접 LLM 호출을 수행한다. CLI 명령어(`gestalt interview`, `gestalt spec`)는 이 모드에서 동작한다.
|
|
413
|
+
---
|
|
403
414
|
|
|
404
|
-
|
|
415
|
+
## Architecture
|
|
405
416
|
|
|
406
|
-
|
|
417
|
+

|
|
418
|
+
_(Diagram coming soon.)_
|
|
407
419
|
|
|
408
420
|
```
|
|
409
|
-
|
|
410
|
-
|
|
421
|
+
Claude Code (you)
|
|
422
|
+
│
|
|
423
|
+
▼ MCP / stdio transport
|
|
424
|
+
┌──────────────────────────────────┐
|
|
425
|
+
│ Gestalt MCP Server │
|
|
426
|
+
│ │
|
|
427
|
+
│ Interview Engine │
|
|
428
|
+
│ ├─ GestaltPrincipleSelector │
|
|
429
|
+
│ ├─ AmbiguityScorer │
|
|
430
|
+
│ └─ SessionManager │
|
|
431
|
+
│ │
|
|
432
|
+
│ Spec Generator │
|
|
433
|
+
│ └─ PassthroughSpecGenerator │
|
|
434
|
+
│ │
|
|
435
|
+
│ Execute Engine │
|
|
436
|
+
│ ├─ DAG Validator │
|
|
437
|
+
│ ├─ DriftDetector │
|
|
438
|
+
│ ├─ EvaluationEngine │
|
|
439
|
+
│ └─ ExecuteSessionManager │
|
|
440
|
+
│ │
|
|
441
|
+
│ Resilience Engine │
|
|
442
|
+
│ ├─ StagnationDetector │
|
|
443
|
+
│ ├─ LateralThinkingPersonas │
|
|
444
|
+
│ └─ HumanEscalation │
|
|
445
|
+
│ │
|
|
446
|
+
│ Agent System │
|
|
447
|
+
│ ├─ RoleAgentRegistry │
|
|
448
|
+
│ ├─ RoleMatchEngine │
|
|
449
|
+
│ └─ RoleConsensusEngine │
|
|
450
|
+
│ │
|
|
451
|
+
│ EventStore (SQLite WAL) │
|
|
452
|
+
└──────────────────────────────────┘
|
|
411
453
|
```
|
|
412
454
|
|
|
413
|
-
|
|
414
|
-
|---|---|---|
|
|
415
|
-
| `ges_interview` | Multi-Call | start → (respond + score) × N → complete |
|
|
416
|
-
| `ges_generate_spec` | 2-Call | specContext 요청 → spec JSON 제출 |
|
|
417
|
-
| `ges_execute` | Multi-Call | plan (4-step) → execute → evaluate (2-stage) → evolve |
|
|
418
|
-
| `ges_create_agent` | 2-Call | agentContext 요청 → agentContent 제출 |
|
|
419
|
-
|
|
420
|
-
## Benchmarks
|
|
421
|
-
|
|
422
|
-
`pnpm bench`로 파이프라인 벤치마크를 실행할 수 있다. 3개의 시나리오가 Interview → Spec → Execute → Evaluate 전체 파이프라인을 통과한다.
|
|
423
|
-
|
|
424
|
-
```bash
|
|
425
|
-
pnpm bench # 전체 시나리오 실행
|
|
426
|
-
pnpm bench -s auth-system # 특정 시나리오만 실행
|
|
427
|
-
pnpm bench -o benchmarks/results # 결과 출력 디렉토리 지정
|
|
428
|
-
```
|
|
429
|
-
|
|
430
|
-
### Latest Results
|
|
431
|
-
|
|
432
|
-
| Scenario | Tasks | Completion | Score | Goal Alignment | ACs |
|
|
433
|
-
|----------|-------|------------|-------|----------------|-----|
|
|
434
|
-
| auth-system | 7 | 100% | 0.92 | 0.90 | 5/5 |
|
|
435
|
-
| dashboard | 6 | 100% | 0.88 | 0.85 | 4/4 |
|
|
436
|
-
| api-gateway | 8 | 100% | 0.95 | 0.92 | 5/5 |
|
|
437
|
-
|
|
438
|
-
**Average Score: 0.92 | Average Goal Alignment: 0.89**
|
|
455
|
+
---
|
|
439
456
|
|
|
440
457
|
## License
|
|
441
458
|
|
|
442
|
-
MIT
|
|
459
|
+
MIT © [tienne](https://github.com/tienne)
|