@tienne/gestalt 0.14.1 → 0.15.1

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.
Files changed (97) hide show
  1. package/README.ko.md +19 -32
  2. package/README.md +188 -164
  3. package/dist/package.json +1 -1
  4. package/dist/role-agents/harness-architect/AGENT.md +210 -0
  5. package/dist/role-agents/technical-writer/AGENT.md +46 -0
  6. package/dist/role-agents/technical-writer/references/ai-tell-quick-rules.md +134 -0
  7. package/dist/skills/agent/SKILL.md +2 -0
  8. package/package.json +1 -1
  9. package/role-agents/harness-architect/AGENT.md +210 -0
  10. package/role-agents/technical-writer/AGENT.md +46 -0
  11. package/role-agents/technical-writer/references/ai-tell-quick-rules.md +134 -0
  12. package/skills/agent/SKILL.md +2 -0
  13. package/dist/skills/seed/SKILL.md +0 -92
  14. package/dist/src/cli/commands/seed.d.ts +0 -4
  15. package/dist/src/cli/commands/seed.d.ts.map +0 -1
  16. package/dist/src/cli/commands/seed.js +0 -34
  17. package/dist/src/cli/commands/seed.js.map +0 -1
  18. package/dist/src/interview/ambiguity.d.ts +0 -8
  19. package/dist/src/interview/ambiguity.d.ts.map +0 -1
  20. package/dist/src/interview/ambiguity.js +0 -69
  21. package/dist/src/interview/ambiguity.js.map +0 -1
  22. package/dist/src/mcp/tools/seed-passthrough.d.ts +0 -5
  23. package/dist/src/mcp/tools/seed-passthrough.d.ts.map +0 -1
  24. package/dist/src/mcp/tools/seed-passthrough.js +0 -29
  25. package/dist/src/mcp/tools/seed-passthrough.js.map +0 -1
  26. package/dist/src/mcp/tools/seed.d.ts +0 -5
  27. package/dist/src/mcp/tools/seed.d.ts.map +0 -1
  28. package/dist/src/mcp/tools/seed.js +0 -19
  29. package/dist/src/mcp/tools/seed.js.map +0 -1
  30. package/dist/src/recording/agg-converter.d.ts +0 -25
  31. package/dist/src/recording/agg-converter.d.ts.map +0 -1
  32. package/dist/src/recording/agg-converter.js +0 -80
  33. package/dist/src/recording/agg-converter.js.map +0 -1
  34. package/dist/src/recording/agg-installer.d.ts +0 -6
  35. package/dist/src/recording/agg-installer.d.ts.map +0 -1
  36. package/dist/src/recording/agg-installer.js +0 -50
  37. package/dist/src/recording/agg-installer.js.map +0 -1
  38. package/dist/src/recording/asciinema-installer.d.ts +0 -6
  39. package/dist/src/recording/asciinema-installer.d.ts.map +0 -1
  40. package/dist/src/recording/asciinema-installer.js +0 -50
  41. package/dist/src/recording/asciinema-installer.js.map +0 -1
  42. package/dist/src/recording/asciinema-recorder.d.ts +0 -26
  43. package/dist/src/recording/asciinema-recorder.d.ts.map +0 -1
  44. package/dist/src/recording/asciinema-recorder.js +0 -52
  45. package/dist/src/recording/asciinema-recorder.js.map +0 -1
  46. package/dist/src/recording/cast-generator.d.ts +0 -7
  47. package/dist/src/recording/cast-generator.d.ts.map +0 -1
  48. package/dist/src/recording/cast-generator.js +0 -97
  49. package/dist/src/recording/cast-generator.js.map +0 -1
  50. package/dist/src/recording/filename-generator.d.ts +0 -19
  51. package/dist/src/recording/filename-generator.d.ts.map +0 -1
  52. package/dist/src/recording/filename-generator.js +0 -67
  53. package/dist/src/recording/filename-generator.js.map +0 -1
  54. package/dist/src/recording/gif-generator.d.ts +0 -21
  55. package/dist/src/recording/gif-generator.d.ts.map +0 -1
  56. package/dist/src/recording/gif-generator.js +0 -121
  57. package/dist/src/recording/gif-generator.js.map +0 -1
  58. package/dist/src/recording/recording-dir.d.ts +0 -5
  59. package/dist/src/recording/recording-dir.d.ts.map +0 -1
  60. package/dist/src/recording/recording-dir.js +0 -13
  61. package/dist/src/recording/recording-dir.js.map +0 -1
  62. package/dist/src/recording/recording-orchestrator.d.ts +0 -50
  63. package/dist/src/recording/recording-orchestrator.d.ts.map +0 -1
  64. package/dist/src/recording/recording-orchestrator.js +0 -98
  65. package/dist/src/recording/recording-orchestrator.js.map +0 -1
  66. package/dist/src/recording/resume-detector.d.ts +0 -10
  67. package/dist/src/recording/resume-detector.d.ts.map +0 -1
  68. package/dist/src/recording/resume-detector.js +0 -14
  69. package/dist/src/recording/resume-detector.js.map +0 -1
  70. package/dist/src/recording/segment-merger.d.ts +0 -27
  71. package/dist/src/recording/segment-merger.d.ts.map +0 -1
  72. package/dist/src/recording/segment-merger.js +0 -65
  73. package/dist/src/recording/segment-merger.js.map +0 -1
  74. package/dist/src/recording/terminal-recorder.d.ts +0 -31
  75. package/dist/src/recording/terminal-recorder.d.ts.map +0 -1
  76. package/dist/src/recording/terminal-recorder.js +0 -111
  77. package/dist/src/recording/terminal-recorder.js.map +0 -1
  78. package/dist/src/scripts/postinstall.d.ts +0 -2
  79. package/dist/src/scripts/postinstall.d.ts.map +0 -1
  80. package/dist/src/scripts/postinstall.js +0 -29
  81. package/dist/src/scripts/postinstall.js.map +0 -1
  82. package/dist/src/seed/extractor.d.ts +0 -15
  83. package/dist/src/seed/extractor.d.ts.map +0 -1
  84. package/dist/src/seed/extractor.js +0 -88
  85. package/dist/src/seed/extractor.js.map +0 -1
  86. package/dist/src/seed/generator.d.ts +0 -12
  87. package/dist/src/seed/generator.d.ts.map +0 -1
  88. package/dist/src/seed/generator.js +0 -66
  89. package/dist/src/seed/generator.js.map +0 -1
  90. package/dist/src/seed/passthrough-generator.d.ts +0 -31
  91. package/dist/src/seed/passthrough-generator.d.ts.map +0 -1
  92. package/dist/src/seed/passthrough-generator.js +0 -80
  93. package/dist/src/seed/passthrough-generator.js.map +0 -1
  94. package/dist/src/seed/schema.d.ts +0 -145
  95. package/dist/src/seed/schema.d.ts.map +0 -1
  96. package/dist/src/seed/schema.js +0 -37
  97. package/dist/src/seed/schema.js.map +0 -1
package/README.md CHANGED
@@ -19,27 +19,52 @@
19
19
 
20
20
  ---
21
21
 
22
- ## What is Gestalt?
22
+ Gestalt is an MCP (Model Context Protocol) server that runs inside Claude Code. It conducts a structured requirement interview, generates a validated **Spec** — a JSON document capturing your goal, constraints, and acceptance criteria — and transforms that Spec into a dependency-aware execution plan.
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
+ Claude Code acts as the LLM throughout. Gestalt manages state, validates results, and advances the pipeline. No API key required.
25
25
 
26
- > **Prerequisites:** Node.js >= 20.0.0. Use `nvm install 22 && nvm use 22` if needed.
26
+ > **Requires Node.js >= 20.0.0.** Use `nvm install 22 && nvm use 22` if needed.
27
+
28
+ ---
29
+
30
+ ## Contents
31
+
32
+ - [Quick Start](#quick-start)
33
+ - [How It Works](#how-it-works)
34
+ - [Installation](#installation)
35
+ - [The Pipeline](#the-pipeline)
36
+ - [1. Interview](#1-interview)
37
+ - [2. Spec Generation](#2-spec-generation)
38
+ - [3. Execute](#3-execute)
39
+ - [4. Evaluate](#4-evaluate)
40
+ - [5. Evolve](#5-evolve)
41
+ - [6. Code Review](#6-code-review)
42
+ - [Agents](#agents)
43
+ - [CLI Mode](#cli-mode)
44
+ - [Project Memory](#project-memory)
45
+ - [Configuration](#configuration)
46
+ - [Architecture](#architecture)
27
47
 
28
48
  ---
29
49
 
30
50
  ## Quick Start
31
51
 
32
- Install the plugin once, then use it in any Claude Code session:
52
+ Install the plugin once, then use it in any Claude Code session.
53
+
54
+ **From a terminal (outside a session):**
33
55
 
34
56
  ```bash
35
- # Step 1: Add to marketplace (one-time setup)
36
- /plugin marketplace add tienne/gestalt
57
+ claude plugin install gestalt@gestalt
58
+ ```
59
+
60
+ **Inside a Claude Code session:**
37
61
 
38
- # Step 2: Install the plugin
62
+ ```bash
63
+ /plugin marketplace add tienne/gestalt
39
64
  /plugin install gestalt@gestalt
40
65
  ```
41
66
 
42
- Then in any Claude Code session:
67
+ Then run the pipeline:
43
68
 
44
69
  ```bash
45
70
  /interview "user authentication system"
@@ -47,34 +72,34 @@ Then in any Claude Code session:
47
72
  /execute
48
73
  ```
49
74
 
50
- **[Full MCP Reference](./docs/mcp-reference.md)** — all tools, parameters, and examples
75
+ **[Full MCP Reference](./docs/mcp-reference.md)** — all tools, parameters, and examples
51
76
 
52
77
  ---
53
78
 
54
- ## Why Gestalt?
79
+ ## How It Works
55
80
 
56
- 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.
81
+ Vague requirements are the primary cause of implementation drift. When the goal isn't precise, Claude fills gaps with assumptions — and those assumptions diverge from intent as the project grows.
57
82
 
58
- Gestalt addresses this at the source. Before any code is written, it runs a structured interview guided by **Gestalt psychology principles** to raise resolution to a measurable threshold (≥ 0.8). The result is a **Spec**: a validated JSON document that serves as the single source of truth for planning and execution.
83
+ Gestalt addresses this before any code is written. It runs a structured interview guided by five **Gestalt psychology principles** to raise requirement resolution to a measurable threshold (≥ 0.8). The result is a **Spec**: a validated JSON document that drives every subsequent step.
59
84
 
60
85
  ### The Five Gestalt Principles
61
86
 
62
- - **Closure** Finds what's missing; fills in implicit requirements
63
- - **Proximity** — Groups related features and tasks by domain
64
- - **Similarity** Identifies repeating patterns across requirements
65
- - **Figure-Ground** Separates MVP (figure) from nice-to-have (ground)
66
- - **Continuity** Validates dependency chains; detects contradictions
67
-
68
- > "The whole is greater than the sum of its parts." — Aristotle
87
+ | Principle | Role |
88
+ |-----------|------|
89
+ | **Closure** | Finds what's missing; surfaces implicit requirements |
90
+ | **Proximity** | Groups related features and tasks by domain |
91
+ | **Similarity** | Identifies repeating patterns across requirements |
92
+ | **Figure-Ground** | Separates MVP (figure) from nice-to-have (ground) |
93
+ | **Continuity** | Validates dependency chains; detects contradictions |
69
94
 
70
- ### How does Passthrough Mode work?
95
+ ### Passthrough Mode
71
96
 
72
- 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.
97
+ 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.
73
98
 
74
99
  ```
75
100
  You (in Claude Code)
76
101
 
77
- /interview "topic"
102
+ /interview "topic"
78
103
  Gestalt MCP Server
79
104
  (returns context + prompts)
80
105
 
@@ -86,62 +111,45 @@ You (in Claude Code)
86
111
  Gestalt MCP Server
87
112
  (validates, stores state, advances)
88
113
 
89
- repeat until resolution ≥ 0.8
114
+ repeat until resolution ≥ 0.8
90
115
  Final Spec → Execution Plan
91
116
  ```
92
117
 
93
118
  ---
94
119
 
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.
112
-
113
- ---
114
-
115
120
  ## Installation
116
121
 
117
122
  ### Option 1: Claude Code Plugin (Recommended)
118
123
 
119
124
  Bundles the MCP server, slash-command skills, Gestalt agents, and project context — pre-configured in a single install.
120
125
 
126
+ **From a terminal:**
127
+
121
128
  ```bash
122
- # Step 1: Add to marketplace (one-time setup)
123
- /plugin marketplace add tienne/gestalt
129
+ claude plugin install gestalt@gestalt
130
+ ```
124
131
 
125
- # Step 2: Install the plugin
132
+ **Inside a Claude Code session:**
133
+
134
+ ```bash
135
+ /plugin marketplace add tienne/gestalt
126
136
  /plugin install gestalt@gestalt
127
137
  ```
128
138
 
129
- What you get out of the box:
139
+ What you get:
130
140
 
131
141
  | Item | Details |
132
142
  |------|---------|
133
- | **MCP Tools** | `ges_interview`, `ges_generate_spec`, `ges_execute`, `ges_create_agent`, `ges_agent`, `ges_status`, `ges_code_graph`, `ges_graph_visualize`, `ges_benchmark` |
143
+ | **MCP Tools** | `ges_interview`, `ges_generate_spec`, `ges_execute`, `ges_create_agent`, `ges_agent`, `ges_status`, `ges_code_graph`, `ges_graph_visualize`, `ges_benchmark`, `ges_generate_kb`, `ges_search`, `ges_sync` |
134
144
  | **Slash Commands** | `/interview`, `/spec`, `/execute`, `/agent` |
135
- | **Agents** | 5 Gestalt pipeline agents + 9 Role agents + 3 Review agents |
145
+ | **Agents** | 5 pipeline agents + 9 Role agents + 3 Review agents |
136
146
  | **CLAUDE.md** | Project context and MCP usage guide auto-injected |
137
147
 
138
- > **Requires Node.js >= 20.0.0** — use [nvm](https://github.com/nvm-sh/nvm) if needed: `nvm install 22 && nvm use 22`
139
-
140
148
  ---
141
149
 
142
150
  ### Option 2: Claude Code Desktop
143
151
 
144
- Open your Claude Code Desktop settings and add to `settings.json` (or `claude_desktop_config.json`):
152
+ Add this to your `settings.json` (or `claude_desktop_config.json`) and restart:
145
153
 
146
154
  ```json
147
155
  {
@@ -154,18 +162,17 @@ Open your Claude Code Desktop settings and add to `settings.json` (or `claude_de
154
162
  }
155
163
  ```
156
164
 
157
- Restart Claude Code Desktop. The MCP tools become available immediately. Slash commands require the plugin or manual skills setup.
165
+ MCP tools are available immediately after restart. Slash commands require the plugin or manual skills setup.
158
166
 
159
167
  ---
160
168
 
161
169
  ### Option 3: Claude Code CLI
162
170
 
163
171
  ```bash
164
- # Via the claude CLI
165
172
  claude mcp add gestalt -- npx -y @tienne/gestalt
166
173
  ```
167
174
 
168
- Or edit `~/.claude/settings.json` directly:
175
+ Or add directly to `~/.claude/settings.json`:
169
176
 
170
177
  ```json
171
178
  {
@@ -180,11 +187,11 @@ Or edit `~/.claude/settings.json` directly:
180
187
 
181
188
  ---
182
189
 
183
- ## Usage: Full Pipeline
190
+ ## The Pipeline
184
191
 
185
- ### Step 1 Interview
192
+ ### 1. Interview
186
193
 
187
- Start with any topic. A single rough sentence is enough.
194
+ Start with any topic. A rough sentence is enough.
188
195
 
189
196
  ```bash
190
197
  /interview "I want to build a checkout flow with Stripe"
@@ -198,7 +205,7 @@ Gestalt conducts a multi-round interview. Each round targets a specific resoluti
198
205
  - **Figure-Ground** — What's the core MVP vs. what's optional?
199
206
  - **Continuity** — Any contradictions or conflicts?
200
207
 
201
- The interview continues until the **resolution score reaches ≥ 0.8**:
208
+ The interview continues until the resolution score reaches ≥ 0.8:
202
209
 
203
210
  ```
204
211
  Round 1 → resolution: 0.28 (lots of unknowns)
@@ -206,9 +213,9 @@ Round 4 → resolution: 0.55 (getting clearer)
206
213
  Round 8 → resolution: 0.81 ✓ ready for Spec
207
214
  ```
208
215
 
209
- #### Long interviews: Context Compression
216
+ #### Context Compression
210
217
 
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:
218
+ When rounds exceed 5, Gestalt signals that compression is available. Use the `compress` action to summarize earlier rounds and keep the context window lean:
212
219
 
213
220
  ```
214
221
  1. respond returns needsCompression: true + compressionContext
@@ -220,114 +227,111 @@ The compressed summary is automatically injected into all subsequent rounds.
220
227
 
221
228
  ---
222
229
 
223
- ### Step 2 Spec Generation
230
+ ### 2. Spec Generation
224
231
 
225
- **Option A — From text (no interview required):**
232
+ **From a completed interview:**
226
233
 
227
234
  ```bash
228
- ges_generate_spec({ text: "Build a checkout flow with Stripe" })
235
+ /spec
229
236
  ```
230
237
 
231
- **Option A-2 With a built-in template:**
238
+ **From text (no interview required):**
239
+
240
+ ```bash
241
+ ges_generate_spec({ text: "Build a checkout flow with Stripe" })
242
+ ```
232
243
 
233
- Three starter templates pre-fill common constraints and acceptance criteria:
244
+ **With a built-in template:**
234
245
 
235
246
  | Template ID | Description |
236
247
  |-------------|-------------|
237
- | `rest-api` | REST API server with auth, CRUD, and OpenAPI |
248
+ | `rest-api` | REST API with auth, CRUD, and OpenAPI |
238
249
  | `react-dashboard` | React dashboard with charts, filters, and responsive layout |
239
- | `cli-tool` | CLI tool with subcommands, config, and distribution |
250
+ | `cli-tool` | CLI with subcommands, config file, and distribution |
240
251
 
241
252
  ```bash
242
253
  ges_generate_spec({ text: "API with JWT authentication", template: "rest-api" })
243
254
  ```
244
255
 
245
- **Option B From a completed interview:**
246
-
247
- ```bash
248
- /spec
249
- ```
250
-
251
- Generates a structured **Spec** — a validated JSON document that drives the rest of the pipeline:
256
+ The generated Spec includes:
252
257
 
253
258
  ```
254
259
  goal → Clear, precise project objective
255
260
  constraints → Technical and business constraints
256
261
  acceptanceCriteria → Measurable, verifiable success conditions
257
- ontologySchema → Entity-relationship model (entities + relations)
262
+ ontologySchema → Entity-relationship model
258
263
  gestaltAnalysis → Key findings per Gestalt principle
259
264
  ```
260
265
 
261
266
  ---
262
267
 
263
- ### Step 3 Execute (Planning + Execution)
268
+ ### 3. Execute
264
269
 
265
- Transforms the Spec into a dependency-aware execution plan and runs it:
270
+ Transform the Spec into a dependency-aware execution plan and run it:
266
271
 
267
272
  ```bash
268
273
  /execute
269
274
  ```
270
275
 
271
- **Planning phase** applies 4 Gestalt principles in a fixed sequence:
276
+ **Planning** applies four Gestalt principles in a fixed sequence:
272
277
 
273
278
  | Step | Principle | What it does |
274
279
  |:---:|-----------|-------------|
275
- | 1 | **Figure-Ground** | Classifies acceptance criteria (ACs) as critical (figure) vs. supplementary (ground) |
280
+ | 1 | **Figure-Ground** | Classifies acceptance criteria as critical vs. supplementary |
276
281
  | 2 | **Closure** | Decomposes ACs into atomic tasks, including implicit ones |
277
- | 3 | **Proximity** | Groups related tasks by domain into logical task groups |
278
- | 4 | **Continuity** | Validates the dependency DAG — no cycles, clear topological order |
282
+ | 3 | **Proximity** | Groups related tasks by domain |
283
+ | 4 | **Continuity** | Validates the dependency DAG — no cycles, topological order confirmed |
279
284
 
280
- **Execution phase** runs tasks in topological order. After each task, **drift detection** checks alignment with the Spec:
285
+ **Execution** runs tasks in topological order. After each task, drift detection checks alignment with the Spec:
281
286
 
282
287
  - 3-dimensional score: Goal (50%) + Constraint (30%) + Ontology (20%)
283
- - Jaccard similarity-based measurement
284
- - Auto-triggers a retrospective when drift exceeds threshold
288
+ - Jaccard similarity measurement
289
+ - Auto-triggers a retrospective when drift exceeds the threshold
285
290
 
286
- #### Parallel execution groups
291
+ #### Parallel Execution
287
292
 
288
- The `plan_complete` response includes `parallelGroups: string[][]`. Tasks with no mutual dependencies land in the same group and can be executed concurrently:
293
+ The `plan_complete` response includes `parallelGroups: string[][]`. Tasks with no mutual dependencies are placed in the same group and can run concurrently:
289
294
 
290
295
  ```json
291
296
  "parallelGroups": [
292
- ["setup-db", "setup-env"], // run in parallel
293
- ["create-schema"], // after group above
294
- ["seed-data", "run-tests"] // run in parallel
297
+ ["setup-db", "setup-env"],
298
+ ["create-schema"],
299
+ ["seed-data", "run-tests"]
295
300
  ]
296
301
  ```
297
302
 
298
- #### Resuming an interrupted execution
299
-
300
- Pick up where you left off when a session is interrupted:
303
+ #### Resuming an Interrupted Session
301
304
 
302
305
  ```bash
303
306
  ges_execute({ action: "resume", sessionId: "<id>" })
304
307
  ```
305
308
 
306
- Returns `ResumeContext`: completed task IDs, next task, and `progressPercent`. The `ges_status` response also includes `resumeContext` automatically for any executing session.
309
+ Returns `ResumeContext`: completed task IDs, next task, and `progressPercent`. The `ges_status` response also includes `resumeContext` automatically for any active session.
307
310
 
308
- #### Brownfield audit
311
+ #### Brownfield Audit
309
312
 
310
- When a codebase already exists, audit it against the Spec before executing new tasks:
313
+ When a codebase already exists, audit it against the Spec before running new tasks:
311
314
 
312
315
  ```bash
313
316
  # Step 1: request audit context
314
317
  ges_execute({ action: "audit", sessionId: "<id>" })
315
- → auditContext (systemPrompt, auditPrompt)
318
+ # returns auditContext (systemPrompt, auditPrompt)
316
319
 
317
320
  # Step 2: submit codebase snapshot + audit result
318
321
  ges_execute({
319
322
  action: "audit",
320
323
  sessionId: "<id>",
321
324
  codebaseSnapshot: "...",
322
- auditResult: { implementedACs: [0,2], partialACs: [1], missingACs: [3], gapAnalysis: "..." }
325
+ auditResult: {
326
+ implementedACs: [0, 2],
327
+ partialACs: [1],
328
+ missingACs: [3],
329
+ gapAnalysis: "..."
330
+ }
323
331
  })
324
332
  ```
325
333
 
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
334
+ #### Sub-Agent Spawning
331
335
 
332
336
  Decompose a complex task into sub-tasks dynamically during execution:
333
337
 
@@ -343,31 +347,37 @@ ges_execute({
343
347
  })
344
348
  ```
345
349
 
350
+ #### Real-Time Progress Panel
351
+
352
+ The `/execute` slash command displays live execution status in the Claude Code Task panel — completed/total tasks, current task name, failed count, and parallel group progress. Updated automatically at each planning step, task completion, and evaluation stage.
353
+
346
354
  ---
347
355
 
348
- ### Step 4 Evaluate
356
+ ### 4. Evaluate
349
357
 
350
- Execution triggers a 2-stage evaluation:
358
+ Execution triggers a two-stage evaluation automatically:
351
359
 
352
360
  | Stage | Method | On failure |
353
361
  |:---:|-------|-----------|
354
- | 1 | **Structural** — runs lint → build → test | Short-circuits; skips Stage 2 |
355
- | 2 | **Contextual** — LLM validates each AC + goal alignment | Enters Evolution Loop |
362
+ | 1 | **Structural** — runs lint → build → test | Short-circuits; Stage 2 is skipped |
363
+ | 2 | **Contextual** — LLM validates each AC and goal alignment | Enters the Evolution Loop |
356
364
 
357
365
  **Success condition:** `score ≥ 0.85` AND `goalAlignment ≥ 0.80`
358
366
 
359
367
  ---
360
368
 
361
- ### Step 5 Evolve
369
+ ### 5. Evolve
362
370
 
363
371
  When evaluation fails, the Evolution Loop engages. Three recovery flows are available:
364
372
 
365
373
  **Flow A — Structural Fix** (when lint/build/test fails)
374
+
366
375
  ```
367
376
  evolve_fix → submit fix tasks → re-evaluate
368
377
  ```
369
378
 
370
379
  **Flow B — Contextual Evolution** (when AC score is too low)
380
+
371
381
  ```
372
382
  evolve → patch Spec (ACs/constraints) → re-execute impacted tasks → re-evaluate
373
383
  ```
@@ -380,12 +390,12 @@ Gestalt rotates through lateral thinking personas rather than terminating:
380
390
 
381
391
  | Stagnation Pattern | Persona | Strategy |
382
392
  |--------------------|---------|---------|
383
- | Hard cap hit | **Multistability** | See from a different angle |
393
+ | Hard cap hit | **Multistability** | View from a different angle |
384
394
  | Oscillating scores | **Simplicity** | Strip down and converge |
385
395
  | No progress (no drift) | **Reification** | Fill in what's missing |
386
396
  | Diminishing returns | **Invariance** | Replicate what worked |
387
397
 
388
- When all 4 personas are exhausted, the session terminates with **Human Escalation** — a structured list of actionable suggestions for manual resolution.
398
+ When all four personas are exhausted, the session ends with **Human Escalation** — a structured list of actionable suggestions for manual resolution.
389
399
 
390
400
  **Termination conditions:**
391
401
 
@@ -400,7 +410,7 @@ When all 4 personas are exhausted, the session terminates with **Human Escalatio
400
410
 
401
411
  ---
402
412
 
403
- ### Step 6 Code Review
413
+ ### 6. Code Review
404
414
 
405
415
  When evolution finishes, code review starts automatically:
406
416
 
@@ -408,7 +418,27 @@ When evolution finishes, code review starts automatically:
408
418
  review_start → agents submit perspectives → consensus → auto-fix
409
419
  ```
410
420
 
411
- 9 built-in **Role Agents** provide multi-perspective review:
421
+ See [Agents](#agents) for the full list of built-in reviewers.
422
+
423
+ ---
424
+
425
+ ## Agents
426
+
427
+ Use any agent directly, outside the pipeline:
428
+
429
+ ```bash
430
+ # List all available agents
431
+ /agent
432
+
433
+ # Run a specific agent on any task
434
+ /agent architect "review the module boundaries in this codebase"
435
+ /agent security-reviewer "check this authentication code for vulnerabilities"
436
+ /agent technical-writer "write a README for this module"
437
+ ```
438
+
439
+ ### Role Agents
440
+
441
+ Nine built-in role agents provide multi-perspective review:
412
442
 
413
443
  | Agent | Domain |
414
444
  |-------|--------|
@@ -422,7 +452,9 @@ review_start → agents submit perspectives → consensus → auto-fix
422
452
  | `researcher` | Analysis, data, benchmarks |
423
453
  | `technical-writer` | Documentation, API docs, guides, README |
424
454
 
425
- 3 built-in **Review Agents** run focused code analysis:
455
+ ### Review Agents
456
+
457
+ Three built-in review agents run focused code analysis:
426
458
 
427
459
  | Agent | Focus |
428
460
  |-------|-------|
@@ -430,44 +462,31 @@ review_start → agents submit perspectives → consensus → auto-fix
430
462
  | `performance-reviewer` | Memory leaks, N+1 queries, bundle size, async |
431
463
  | `quality-reviewer` | Readability, SOLID, error handling, DRY |
432
464
 
433
- Use any agent outside the pipeline with `/agent`:
465
+ ### Custom Agents
434
466
 
435
- ```bash
436
- # List all available agents
437
- /agent
467
+ Generate a custom Role Agent from interview results:
438
468
 
439
- # Run a specific agent on any task
440
- /agent architect "review the module boundaries in this codebase"
441
- /agent security-reviewer "check this authentication code for vulnerabilities"
442
- /agent technical-writer "write a README for this module"
443
- ```
444
-
445
- Generate custom Role Agents from interview results:
446
-
447
- ```
448
- # Step 1: Get agent creation context
449
- ges_create_agent → action: "start", sessionId: "<id>"
450
- → returns agentContext (systemPrompt, creationPrompt, schema)
469
+ ```bash
470
+ # Step 1: get agent creation context
471
+ ges_create_agent({ action: "start", sessionId: "<id>" })
472
+ # returns agentContext (systemPrompt, creationPrompt, schema)
451
473
 
452
- # Step 2: Submit the generated AGENT.md content
453
- ges_create_agentaction: "submit", sessionId: "<id>", agentContent: "..."
454
- creates agents/{name}/AGENT.md
474
+ # Step 2: submit the generated AGENT.md content
475
+ ges_create_agent({ action: "submit", sessionId: "<id>", agentContent: "..." })
476
+ # creates agents/{name}/AGENT.md
455
477
  ```
456
478
 
457
479
  ---
458
480
 
459
- ### CLI Mode (without Claude Code)
481
+ ## CLI Mode
460
482
 
461
- Want to run Gestalt without Claude Code? CLI mode runs interviews directly in your terminal. **Requires `ANTHROPIC_API_KEY`.**
483
+ Run Gestalt without Claude Code. **Requires `ANTHROPIC_API_KEY`.**
462
484
 
463
485
  ```bash
464
486
  # Start an interactive interview
465
487
  npx @tienne/gestalt interview "my topic"
466
488
 
467
- # Record the session as a GIF
468
- npx @tienne/gestalt interview "my topic" --record
469
-
470
- # Generate Spec from a completed session
489
+ # Generate a Spec from a completed session
471
490
  npx @tienne/gestalt spec <session-id>
472
491
 
473
492
  # List all sessions
@@ -480,29 +499,33 @@ npx @tienne/gestalt setup
480
499
  npx @tienne/gestalt serve
481
500
  ```
482
501
 
483
- #### Recording an interview session
484
-
485
- Add `--record` (or `-r`) to capture the terminal session as a GIF:
502
+ ---
486
503
 
487
- ```bash
488
- npx @tienne/gestalt interview "my topic" --record
489
- ```
504
+ ## Project Memory
490
505
 
491
- When the interview completes, a GIF is written to the current directory:
506
+ Every spec and execution result is automatically recorded in `.gestalt/memory.json` at your repo root.
492
507
 
508
+ ```json
509
+ {
510
+ "specHistory": [
511
+ { "specId": "...", "goal": "Build a user auth system", "sourceType": "text" }
512
+ ],
513
+ "executionHistory": [],
514
+ "architectureDecisions": []
515
+ }
493
516
  ```
494
- user-auth-interview-20260327.gif
495
- ```
496
517
 
497
- The filename is generated by the LLM from the interview topic (kebab-case) plus a `YYYYMMDD` date stamp. No external binaries are required recording uses `gifencoder` and `jimp` only.
518
+ **Commit it.** `.gestalt/memory.json` is plain JSON. Teammates inherit all prior decisions on `git pull`.
519
+
520
+ **Context injection.** Prior goals and architecture decisions are automatically injected into the next spec prompt.
498
521
 
499
- **Resuming an interrupted session:** If a session is interrupted mid-recording, restarting the same session automatically detects the `.frames` file and continues where it left off. Temporary frame data is stored at `.gestalt/recordings/{sessionId}.frames` and deleted once the GIF is written.
522
+ **User profile.** Personal preferences are stored in `~/.gestalt/profile.json` and are never committed.
500
523
 
501
524
  ---
502
525
 
503
526
  ## Configuration
504
527
 
505
- Generate a `gestalt.json` with IDE autocompletion support:
528
+ Generate a `gestalt.json` with IDE autocomplete support:
506
529
 
507
530
  ```bash
508
531
  npx @tienne/gestalt setup
@@ -528,23 +551,22 @@ npx @tienne/gestalt setup
528
551
 
529
552
  **Config priority** (highest → lowest): code overrides → shell env vars → `.env` → `gestalt.json` → built-in defaults
530
553
 
531
- ### Multi-Provider Configuration (LLM Tiers)
554
+ ### Multi-Provider LLM Tiers
532
555
 
533
- Gestalt supports routing LLM calls by task complexity across three tiers: **frugal**, **standard**, and **frontier**.
556
+ Route LLM calls by task complexity across three tiers:
534
557
 
535
558
  | Tier | Purpose | Example models |
536
559
  |------|---------|---------------|
537
560
  | **frugal** | Lightweight tasks — scoring, classification, short responses | `llama3.2`, `claude-haiku` |
538
561
  | **standard** | General tasks — interviews, spec generation, execution | `claude-sonnet-4-20250514` |
539
- | **frontier** | High-complexity reasoning — architecture, code review, evolution loop | `claude-opus-4-20250514` |
562
+ | **frontier** | High-complexity reasoning — architecture, code review, evolution | `claude-opus-4-20250514` |
540
563
 
541
- Mix providers freely. The example below uses Anthropic for standard/frontier and a local Ollama model for frugal tasks:
564
+ Mix providers freely. This example uses Anthropic for standard/frontier and a local Ollama model for frugal tasks:
542
565
 
543
566
  ```json
544
567
  {
545
568
  "$schema": "./node_modules/@tienne/gestalt/schemas/gestalt.schema.json",
546
569
  "llm": {
547
- "apiKey": "",
548
570
  "model": "claude-sonnet-4-20250514",
549
571
  "frugal": {
550
572
  "provider": "openai",
@@ -564,16 +586,14 @@ Mix providers freely. The example below uses Anthropic for standard/frontier and
564
586
  }
565
587
  ```
566
588
 
567
- > If no tiers are configured, all tiers fall back to the top-level `llm.apiKey` + `llm.model` with the Anthropic adapter — fully backward-compatible.
568
-
569
- Invalid values emit a warning and fall back to defaults.
589
+ If no tiers are configured, all tiers fall back to the top-level `llm.model` with the Anthropic adapter — fully backward-compatible.
570
590
 
571
591
  ### Environment Variables
572
592
 
573
- | Variable | Config Path | Default | Description |
593
+ | Variable | Config path | Default | Description |
574
594
  |----------|-------------|---------|-------------|
575
595
  | `ANTHROPIC_API_KEY` | `llm.apiKey` | `""` | Required only for CLI direct mode |
576
- | `GESTALT_MODEL` | `llm.model` | `claude-sonnet-4-20250514` | LLM model (provider-backed mode) |
596
+ | `GESTALT_MODEL` | `llm.model` | `claude-sonnet-4-20250514` | LLM model |
577
597
  | `GESTALT_RESOLUTION_THRESHOLD` | `interview.resolutionThreshold` | `0.8` | Interview completion threshold |
578
598
  | `GESTALT_MAX_ROUNDS` | `interview.maxRounds` | `10` | Max interview rounds |
579
599
  | `GESTALT_DRIFT_THRESHOLD` | `execute.driftThreshold` | `0.3` | Task drift detection threshold |
@@ -600,9 +620,6 @@ Invalid values emit a warning and fall back to defaults.
600
620
 
601
621
  ## Architecture
602
622
 
603
- ![Gestalt Architecture](./docs/architecture.png)
604
- _(Diagram coming soon.)_
605
-
606
623
  ```
607
624
  Claude Code (you)
608
625
 
@@ -612,7 +629,7 @@ Claude Code (you)
612
629
  │ │
613
630
  │ Interview Engine │
614
631
  │ ├─ GestaltPrincipleSelector │
615
- │ ├─ ResolutionScorer
632
+ │ ├─ ResolutionScorer
616
633
  │ ├─ SessionManager │
617
634
  │ └─ ContextCompressor │
618
635
  │ │
@@ -642,6 +659,13 @@ Claude Code (you)
642
659
  └──────────────────────────────────┘
643
660
  ```
644
661
 
662
+ **Further reading:**
663
+
664
+ - [MCP Reference](./docs/mcp-reference.md) — all tools, parameters, and action schemas
665
+ - [Getting Started](./docs/getting-started.md) — 5-minute walkthrough
666
+ - [Configuration Reference](./docs/configuration.md) — full config options
667
+ - [Code Knowledge Graph](./docs/code-graph.md) — static analysis and blast-radius
668
+
645
669
  ---
646
670
 
647
671
  ## License