@tienne/gestalt 0.26.0 → 0.27.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.
Files changed (44) hide show
  1. package/README.md +110 -58
  2. package/dist/package.json +2 -1
  3. package/dist/src/code-graph/providers/local-embedding.d.ts +1 -1
  4. package/dist/src/code-graph/providers/local-embedding.d.ts.map +1 -1
  5. package/dist/src/code-graph/providers/local-embedding.js +11 -5
  6. package/dist/src/code-graph/providers/local-embedding.js.map +1 -1
  7. package/dist/src/gestalt/analyzer.d.ts.map +1 -1
  8. package/dist/src/gestalt/analyzer.js +10 -10
  9. package/dist/src/gestalt/analyzer.js.map +1 -1
  10. package/dist/src/graph-viz/evolution-html-generator.d.ts +7 -0
  11. package/dist/src/graph-viz/evolution-html-generator.d.ts.map +1 -0
  12. package/dist/src/graph-viz/evolution-html-generator.js +360 -0
  13. package/dist/src/graph-viz/evolution-html-generator.js.map +1 -0
  14. package/dist/src/knowledge-base/embedding.d.ts +4 -3
  15. package/dist/src/knowledge-base/embedding.d.ts.map +1 -1
  16. package/dist/src/knowledge-base/embedding.js +17 -9
  17. package/dist/src/knowledge-base/embedding.js.map +1 -1
  18. package/dist/src/llm/factory.d.ts +6 -0
  19. package/dist/src/llm/factory.d.ts.map +1 -1
  20. package/dist/src/llm/factory.js +19 -4
  21. package/dist/src/llm/factory.js.map +1 -1
  22. package/dist/src/llm/fallback-adapter.d.ts +7 -0
  23. package/dist/src/llm/fallback-adapter.d.ts.map +1 -0
  24. package/dist/src/llm/fallback-adapter.js +23 -0
  25. package/dist/src/llm/fallback-adapter.js.map +1 -0
  26. package/dist/src/llm/retry-adapter.d.ts +9 -0
  27. package/dist/src/llm/retry-adapter.d.ts.map +1 -0
  28. package/dist/src/llm/retry-adapter.js +43 -0
  29. package/dist/src/llm/retry-adapter.js.map +1 -0
  30. package/dist/src/mcp/schemas.d.ts +4 -4
  31. package/dist/src/mcp/schemas.d.ts.map +1 -1
  32. package/dist/src/mcp/schemas.js +1 -0
  33. package/dist/src/mcp/schemas.js.map +1 -1
  34. package/dist/src/mcp/tools/execute/utility.d.ts +1 -0
  35. package/dist/src/mcp/tools/execute/utility.d.ts.map +1 -1
  36. package/dist/src/mcp/tools/execute/utility.js +30 -1
  37. package/dist/src/mcp/tools/execute/utility.js.map +1 -1
  38. package/dist/src/mcp/tools/execute-passthrough.d.ts.map +1 -1
  39. package/dist/src/mcp/tools/execute-passthrough.js +2 -1
  40. package/dist/src/mcp/tools/execute-passthrough.js.map +1 -1
  41. package/dist/src/mcp/tools/generate-kb.d.ts.map +1 -1
  42. package/dist/src/mcp/tools/generate-kb.js +5 -3
  43. package/dist/src/mcp/tools/generate-kb.js.map +1 -1
  44. package/package.json +2 -1
package/README.md CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  <p align="center">
6
6
  <strong>Gestalt — AI Development Harness</strong><br/>
7
- Turn vague requirements into structured, executable plans right inside Claude Code.
7
+ When requirements are vague, AI becomes the interviewer.
8
8
  </p>
9
9
 
10
10
  <p align="center">
@@ -17,16 +17,16 @@
17
17
  <a href="./README.ko.md">한국어</a>
18
18
  </p>
19
19
 
20
- ---
21
-
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.
20
+ <p align="center">
21
+ <strong>📊 Benchmark:</strong> Resolution 0.8 specs reduce rework rate by <strong>27%</strong> vs. 0.5 specs — <a href="./benchmarks/run-resolution-benchmark.ts">verified by LLM-as-judge on 20-item golden set</a>
22
+ </p>
23
23
 
24
- Claude Code acts as the LLM throughout. Gestalt manages state, validates results, and advances the pipeline. No API key required.
24
+ ---
25
25
 
26
- **In two lines:** describe what you want in plain language, and Gestalt interviews you until the requirement is sharp, then turns it into a validated Spec and a dependency-ordered execution plan. Everything runs inside Claude Code no extra services, no API key.
26
+ The hardest part of building software isn't writing code it's knowing what to build. Gestalt is an MCP server that runs inside Claude Code and acts as a structured interviewer: it applies five Gestalt psychology principles to raise requirement resolution from vague intent to a measurable score of ≥ 0.8, then crystallizes that into a validated **Spec** that drives the rest of your pipeline. No API key required.
27
27
 
28
28
  ```bash
29
- /interview "user authentication system" # clarify requirements (resolution ≥ 0.8)
29
+ /interview "user authentication system" # AI interviews you until resolution ≥ 0.8
30
30
  /spec # crystallize into a validated Spec
31
31
  /execute # plan → execute → evaluate → evolve
32
32
  ```
@@ -37,24 +37,40 @@ Claude Code acts as the LLM throughout. Gestalt manages state, validates results
37
37
 
38
38
  ## Contents
39
39
 
40
+ - [Built with Gestalt, for Gestalt](#built-with-gestalt-for-gestalt)
40
41
  - [Quick Start](#quick-start)
41
42
  - [Installation](#installation)
42
- - [The Pipeline](#the-pipeline)
43
+ - [Interview + Spec: The Core Differentiator](#interview--spec-the-core-differentiator)
43
44
  - [1. Interview](#1-interview)
44
45
  - [2. Spec Generation](#2-spec-generation)
46
+ - [Memory: The Feedback Loop](#memory-the-feedback-loop)
47
+ - [Code Knowledge Graph](#code-knowledge-graph)
48
+ - [Execute → Evaluate → Evolve](#execute--evaluate--evolve)
45
49
  - [3. Execute](#3-execute)
46
50
  - [4. Evaluate](#4-evaluate)
47
51
  - [5. Evolve](#5-evolve)
48
- - [6. Code Review](#6-code-review)
52
+ - [Code Review](#code-review)
49
53
  - [Agents](#agents)
50
54
  - [CLI Mode](#cli-mode)
51
- - [Project Memory](#project-memory)
52
55
  - [Configuration](#configuration)
53
56
  - [How It Works](#how-it-works)
54
57
  - [Architecture](#architecture)
55
58
 
56
59
  ---
57
60
 
61
+ ## Built with Gestalt, for Gestalt
62
+
63
+ This repository is developed using the `gestalt-develop` skill — the same pipeline you get when you install Gestalt. Every significant feature in [v0.26.0](#changelog) was implemented through the Interview → Spec → Execute → Evolve loop:
64
+
65
+ - Memory → Interview feedback loop (prior specs auto-injected into new sessions)
66
+ - `execute-passthrough.ts` 1,296-line God File decomposed into 8 focused modules
67
+ - Code review `context-collector` migrated from regex to `blastRadius()` graph analysis
68
+ - ESLint flat config + CI 3-gate pipeline (typecheck → lint → format:check)
69
+
70
+ This self-referential proof is the strongest argument for Gestalt: an AI harness that improves itself through its own pipeline. When Gestalt interviews you about a Gestalt feature, it applies the same five principles to its own architecture.
71
+
72
+ ---
73
+
58
74
  ## Quick Start
59
75
 
60
76
  Install the plugin once, then use it in any Claude Code session.
@@ -207,7 +223,9 @@ Use the `/mcp` command inside a Gemini CLI session to verify the server is conne
207
223
 
208
224
  ---
209
225
 
210
- ## The Pipeline
226
+ ## Interview + Spec: The Core Differentiator
227
+
228
+ Claude Code and Cursor are excellent at executing tasks. Where they struggle is when the task itself is unclear. Gestalt fills that gap: before any code is written, it conducts a structured interview that surfaces assumptions, resolves contradictions, and captures acceptance criteria — producing a **Spec** precise enough to drive a dependency-aware execution plan.
211
229
 
212
230
  ### 1. Interview
213
231
 
@@ -217,22 +235,38 @@ Start with any topic. A rough sentence is enough.
217
235
  /interview "I want to build a checkout flow with Stripe"
218
236
  ```
219
237
 
220
- Gestalt conducts a multi-round interview. Each round targets a specific resolution dimension:
238
+ Gestalt conducts a multi-round interview. Each round targets the weakest resolution dimension using a weighted impact score `(1 - clarity) × weight`, so the interview always attacks the most critical gap first.
239
+
240
+ The five principles guide the process:
241
+
242
+ | Principle | Role |
243
+ |-----------|------|
244
+ | **Closure** | What's missing? Surfaces implicit requirements you haven't said yet |
245
+ | **Proximity** | Which features belong together? Groups by domain |
246
+ | **Similarity** | Are there repeating patterns across requirements? |
247
+ | **Figure-Ground** | What's the core MVP vs. what's optional? |
248
+ | **Continuity** | Any contradictions? Detected and penalized until resolved |
249
+
250
+ The resolution score rises across four dimensions:
221
251
 
222
- - **Closure** What's missing? What did you assume but not say?
223
- - **Proximity** — Which features belong together?
224
- - **Similarity** Are there repeating patterns across requirements?
225
- - **Figure-Ground** What's the core MVP vs. what's optional?
226
- - **Continuity** Any contradictions or conflicts?
252
+ | Dimension | Principle | Greenfield weight | Brownfield weight |
253
+ |-----------|-----------|:-----------------:|:-----------------:|
254
+ | goalClarity | Closure | 0.40 | 0.30 |
255
+ | constraintClarity | Proximity | 0.25 | 0.20 |
256
+ | successCriteria | Similarity | 0.20 | 0.15 |
257
+ | priorityClarity | Figure-Ground | 0.15 | 0.15 |
258
+ | contextClarity | Continuity | — | 0.20 |
227
259
 
228
- The interview continues until the resolution score reaches ≥ 0.8:
260
+ The interview continues until `overall ≥ 0.8`:
229
261
 
230
262
  ```
231
263
  Round 1 → resolution: 0.28 (lots of unknowns)
232
264
  Round 4 → resolution: 0.55 (getting clearer)
233
- Round 8 → resolution: 0.81 ready for Spec
265
+ Round 8 → resolution: 0.81 ready for Spec
234
266
  ```
235
267
 
268
+ Contradictions are penalized directly: unresolved contradictions subtract up to 0.15 from the overall score, making it structurally impossible to reach 0.8 without resolving them first.
269
+
236
270
  #### Context Compression
237
271
 
238
272
  When rounds exceed 5, Gestalt signals that compression is available. Use the `compress` action to summarize earlier rounds and keep the context window lean:
@@ -285,6 +319,60 @@ gestaltAnalysis → Key findings per Gestalt principle
285
319
 
286
320
  ---
287
321
 
322
+ ## Memory: The Feedback Loop
323
+
324
+ Every spec and execution result is automatically recorded in `.gestalt/memory.json` at your repo root.
325
+
326
+ ```json
327
+ {
328
+ "specHistory": [
329
+ { "specId": "...", "goal": "Build a user auth system", "sourceType": "text" }
330
+ ],
331
+ "executionHistory": [],
332
+ "architectureDecisions": []
333
+ }
334
+ ```
335
+
336
+ **The interview gets shorter over time.** When prior specs and execution history exist, Gestalt automatically injects that context into the `gestaltContext.systemPrompt` at the start of each new interview session. Prior goals, architecture decisions, and constraints become shared knowledge — the AI already knows what you've built and why.
337
+
338
+ **Commit it.** `.gestalt/memory.json` is plain JSON. Teammates inherit all prior decisions on `git pull`.
339
+
340
+ **User profile.** Personal preferences are stored in `~/.gestalt/profile.json` and are never committed.
341
+
342
+ ---
343
+
344
+ ## Code Knowledge Graph
345
+
346
+ Build a static dependency graph of your codebase and extract blast-radius impact files for any change — so Gestalt's review and evolution steps only process the files that actually matter.
347
+
348
+ ```bash
349
+ # Build or incrementally update the graph
350
+ ges_code_graph({ action: "build", repoRoot: "/path/to/repo" })
351
+
352
+ # Find all files impacted by a commit
353
+ ges_code_graph({ action: "blast_radius", repoRoot: "...", commitSha: "abc123" })
354
+
355
+ # Find files impacted by uncommitted changes
356
+ ges_code_graph({ action: "diff_radius", repoRoot: "..." })
357
+ ```
358
+
359
+ Stored at `.gestalt/code-graph.db` (WAL SQLite, separate from the event store). After `gestalt init`, a post-commit hook keeps it current automatically.
360
+
361
+ **Language support:**
362
+
363
+ | Language | Extensions | Support level |
364
+ |----------|-----------|--------------|
365
+ | TypeScript / JavaScript | `.ts`, `.tsx`, `.js`, `.jsx` | First-class — TypeScript Compiler API, full AST analysis |
366
+ | Python, Go, Java, Kotlin, Rust, Swift, Objective-C | various | Regex-based best-effort — basic function/class/import extraction; dynamic imports, macros, and metaprogramming may be missed |
367
+
368
+ See [Code Knowledge Graph docs](./docs/code-graph.md) for the full reference.
369
+
370
+ ---
371
+
372
+ ## Execute → Evaluate → Evolve
373
+
374
+ > These stages run in Passthrough mode — Claude Code performs the actual file edits and code execution through its tools (Bash, Edit, etc.). Execute carries out real work; Gestalt manages state and advances the pipeline. No API key is used in this stage.
375
+
288
376
  ### 3. Execute
289
377
 
290
378
  Transform the Spec into a dependency-aware execution plan and run it:
@@ -293,8 +381,6 @@ Transform the Spec into a dependency-aware execution plan and run it:
293
381
  /execute
294
382
  ```
295
383
 
296
- > Execute **always runs in Passthrough mode** — Claude Code performs the actual file edits and code execution through its tools (Bash, Edit, etc.). Configuring an API key does not switch Execute to a self-contained LLM mode; there is no such mode by design.
297
-
298
384
  **Planning** applies four Gestalt principles in a fixed sequence:
299
385
 
300
386
  | Step | Principle | What it does |
@@ -432,7 +518,7 @@ When all four personas are exhausted, the session ends with **Human Escalation**
432
518
 
433
519
  ---
434
520
 
435
- ### 6. Code Review
521
+ ## Code Review
436
522
 
437
523
  When evolution finishes, code review starts automatically:
438
524
 
@@ -440,7 +526,7 @@ When evolution finishes, code review starts automatically:
440
526
  review_start → agents submit perspectives → consensus → auto-fix
441
527
  ```
442
528
 
443
- See [Agents](#agents) for the full list of built-in reviewers.
529
+ The review `context-collector` uses `blastRadius()` from the Code Knowledge Graph to scope analysis to impacted files only — falling back gracefully if no graph DB exists. See [Agents](#agents) for the full list of built-in reviewers.
444
530
 
445
531
  ---
446
532
 
@@ -523,28 +609,6 @@ npx @tienne/gestalt serve
523
609
 
524
610
  ---
525
611
 
526
- ## Project Memory
527
-
528
- Every spec and execution result is automatically recorded in `.gestalt/memory.json` at your repo root.
529
-
530
- ```json
531
- {
532
- "specHistory": [
533
- { "specId": "...", "goal": "Build a user auth system", "sourceType": "text" }
534
- ],
535
- "executionHistory": [],
536
- "architectureDecisions": []
537
- }
538
- ```
539
-
540
- **Commit it.** `.gestalt/memory.json` is plain JSON. Teammates inherit all prior decisions on `git pull`.
541
-
542
- **Context injection.** Prior goals and architecture decisions are automatically injected into the next spec prompt.
543
-
544
- **User profile.** Personal preferences are stored in `~/.gestalt/profile.json` and are never committed.
545
-
546
- ---
547
-
548
612
  ## Configuration
549
613
 
550
614
  Generate a `gestalt.json` with IDE autocomplete support:
@@ -660,21 +724,9 @@ Vague requirements are the primary cause of implementation drift. When the goal
660
724
 
661
725
  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.
662
726
 
663
- ### The Five Gestalt Principles
664
-
665
- | Principle | Role |
666
- |-----------|------|
667
- | **Closure** | Finds what's missing; surfaces implicit requirements |
668
- | **Proximity** | Groups related features and tasks by domain |
669
- | **Similarity** | Identifies repeating patterns across requirements |
670
- | **Figure-Ground** | Separates MVP (figure) from nice-to-have (ground) |
671
- | **Continuity** | Validates dependency chains; detects contradictions |
672
-
673
727
  ### Passthrough Mode
674
728
 
675
- 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.
676
-
677
- > **Note:** The Execute stage **always runs in Passthrough mode**, regardless of whether an API key is configured. Execute carries out real file edits and code execution through Claude Code's tools (Bash, Edit, etc.), so Claude Code must be the LLM that drives it — this is by design, not a missing feature.
729
+ 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 in any stage.
678
730
 
679
731
  ```
680
732
  You (in Claude Code)
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tienne/gestalt",
3
- "version": "0.26.0",
3
+ "version": "0.27.0",
4
4
  "description": "TypeScript AI Development Harness - Gestalt psychology-driven requirement clarification",
5
5
  "type": "module",
6
6
  "main": "./dist/src/index.js",
@@ -29,6 +29,7 @@
29
29
  "test:watch": "vitest",
30
30
  "serve": "tsx bin/gestalt.ts serve",
31
31
  "bench": "tsx benchmarks/run.ts",
32
+ "resolution-bench": "tsx benchmarks/run-resolution-benchmark.ts",
32
33
  "lint": "eslint .",
33
34
  "typecheck": "tsc --noEmit",
34
35
  "format": "prettier --write \"src/**/*.ts\" \"tests/**/*.ts\"",
@@ -5,6 +5,6 @@ export declare class LocalEmbeddingProvider implements EmbeddingProvider {
5
5
  readonly dimensions = 384;
6
6
  private extractor;
7
7
  private getExtractor;
8
- embed(texts: string[]): Promise<number[][]>;
8
+ embed(texts: string[], batchSize?: number): Promise<number[][]>;
9
9
  }
10
10
  //# sourceMappingURL=local-embedding.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"local-embedding.d.ts","sourceRoot":"","sources":["../../../../src/code-graph/providers/local-embedding.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAElE,qBAAa,sBAAuB,YAAW,iBAAiB;IAC9D,QAAQ,CAAC,IAAI,EAAG,OAAO,CAAU;IACjC,QAAQ,CAAC,OAAO,6BAA6B;IAC7C,QAAQ,CAAC,UAAU,OAAO;IAE1B,OAAO,CAAC,SAAS,CAA0C;YAE7C,YAAY;IAOpB,KAAK,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC;CAUlD"}
1
+ {"version":3,"file":"local-embedding.d.ts","sourceRoot":"","sources":["../../../../src/code-graph/providers/local-embedding.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAElE,qBAAa,sBAAuB,YAAW,iBAAiB;IAC9D,QAAQ,CAAC,IAAI,EAAG,OAAO,CAAU;IACjC,QAAQ,CAAC,OAAO,6BAA6B;IAC7C,QAAQ,CAAC,UAAU,OAAO;IAE1B,OAAO,CAAC,SAAS,CAA0C;YAE7C,YAAY;IAOpB,KAAK,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,SAAS,SAAK,GAAG,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC;CAelE"}
@@ -10,13 +10,19 @@ export class LocalEmbeddingProvider {
10
10
  }
11
11
  return this.extractor;
12
12
  }
13
- async embed(texts) {
13
+ async embed(texts, batchSize = 32) {
14
+ if (texts.length === 0)
15
+ return [];
14
16
  const extractor = await this.getExtractor();
15
17
  const results = [];
16
- for (const text of texts) {
17
- const output = (await extractor(text, { pooling: 'mean', normalize: true }));
18
- // output.data is Float32Array or similar DataArray
19
- results.push(Array.from(output.data));
18
+ for (let i = 0; i < texts.length; i += batchSize) {
19
+ const chunk = texts.slice(i, i + batchSize);
20
+ const output = (await extractor(chunk, { pooling: 'mean', normalize: true }));
21
+ const flat = output.data;
22
+ const dim = flat.length / chunk.length;
23
+ for (let j = 0; j < chunk.length; j++) {
24
+ results.push(Array.from(flat.slice(j * dim, (j + 1) * dim)));
25
+ }
20
26
  }
21
27
  return results;
22
28
  }
@@ -1 +1 @@
1
- {"version":3,"file":"local-embedding.js","sourceRoot":"","sources":["../../../../src/code-graph/providers/local-embedding.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAqC,MAAM,sBAAsB,CAAC;AAGnF,MAAM,OAAO,sBAAsB;IACxB,IAAI,GAAG,OAAgB,CAAC;IACxB,OAAO,GAAG,yBAAyB,CAAC;IACpC,UAAU,GAAG,GAAG,CAAC;IAElB,SAAS,GAAqC,IAAI,CAAC;IAEnD,KAAK,CAAC,YAAY;QACxB,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,CAAC;YACpB,IAAI,CAAC,SAAS,GAAG,MAAM,QAAQ,CAAC,oBAAoB,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;QACtE,CAAC;QACD,OAAO,IAAI,CAAC,SAAS,CAAC;IACxB,CAAC;IAED,KAAK,CAAC,KAAK,CAAC,KAAe;QACzB,MAAM,SAAS,GAAG,MAAM,IAAI,CAAC,YAAY,EAAE,CAAC;QAC5C,MAAM,OAAO,GAAe,EAAE,CAAC;QAC/B,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;YACzB,MAAM,MAAM,GAAG,CAAC,MAAM,SAAS,CAAC,IAAI,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAW,CAAC;YACvF,mDAAmD;YACnD,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,IAAoB,CAAC,CAAC,CAAC;QACxD,CAAC;QACD,OAAO,OAAO,CAAC;IACjB,CAAC;CACF"}
1
+ {"version":3,"file":"local-embedding.js","sourceRoot":"","sources":["../../../../src/code-graph/providers/local-embedding.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAqC,MAAM,sBAAsB,CAAC;AAGnF,MAAM,OAAO,sBAAsB;IACxB,IAAI,GAAG,OAAgB,CAAC;IACxB,OAAO,GAAG,yBAAyB,CAAC;IACpC,UAAU,GAAG,GAAG,CAAC;IAElB,SAAS,GAAqC,IAAI,CAAC;IAEnD,KA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@@ -1 +1 @@
1
- {"version":3,"file":"analyzer.d.ts","sourceRoot":"","sources":["../../../src/gestalt/analyzer.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,eAAe,EAEpB,KAAK,WAAW,EACjB,MAAM,kBAAkB,CAAC;AAS1B,UAAU,gBAAgB;IACxB,kDAAkD;IAClD,WAAW,EAAE,MAAM,CAAC;IACpB,sDAAsD;IACtD,iBAAiB,EAAE,MAAM,CAAC;IAC1B,uDAAuD;IACvD,eAAe,EAAE,MAAM,CAAC;IACxB,qDAAqD;IACrD,eAAe,EAAE,MAAM,CAAC;IACxB,gEAAgE;IAChE,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,sBAAsB;IACtB,cAAc,EAAE,MAAM,EAAE,CAAC;CAC1B;AAED,wBAAgB,sBAAsB,CACpC,GAAG,EAAE,gBAAgB,EACrB,WAAW,EAAE,WAAW,GACvB,eAAe,CA6DjB"}
1
+ {"version":3,"file":"analyzer.d.ts","sourceRoot":"","sources":["../../../src/gestalt/analyzer.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,eAAe,EAEpB,KAAK,WAAW,EACjB,MAAM,kBAAkB,CAAC;AAS1B,UAAU,gBAAgB;IACxB,kDAAkD;IAClD,WAAW,EAAE,MAAM,CAAC;IACpB,sDAAsD;IACtD,iBAAiB,EAAE,MAAM,CAAC;IAC1B,uDAAuD;IACvD,eAAe,EAAE,MAAM,CAAC;IACxB,qDAAqD;IACrD,eAAe,EAAE,MAAM,CAAC;IACxB,gEAAgE;IAChE,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,sBAAsB;IACtB,cAAc,EAAE,MAAM,EAAE,CAAC;CAC1B;AAED,wBAAgB,sBAAsB,CACpC,GAAG,EAAE,gBAAgB,EACrB,WAAW,EAAE,WAAW,GACvB,eAAe,CA4DjB"}
@@ -8,32 +8,32 @@ export function computeResolutionScore(raw, projectType) {
8
8
  clarity: clamp(raw.goalClarity),
9
9
  weight: weights[GestaltPrinciple.CLOSURE],
10
10
  gestaltPrinciple: GestaltPrinciple.CLOSURE,
11
- label: '목표 명확성',
12
- improvementHint: '프로젝트의 최종 목표와 기대 결과물을 구체적으로 서술해 주세요.',
11
+ label: '목표 명확도',
12
+ improvementHint: '목표와 기대 결과를 구체적으로 설명해보세요',
13
13
  },
14
14
  {
15
15
  name: 'constraintClarity',
16
16
  clarity: clamp(raw.constraintClarity),
17
17
  weight: weights[GestaltPrinciple.PROXIMITY],
18
18
  gestaltPrinciple: GestaltPrinciple.PROXIMITY,
19
- label: '제약사항 명확성',
20
- improvementHint: '기술 스택, 예산, 기한, 팀 규모 등 구체적인 제약 조건을 명시해 주세요.',
19
+ label: '제약조건 명확도',
20
+ improvementHint: '기술적·비즈니스 제약조건을 명확히 설명해보세요',
21
21
  },
22
22
  {
23
23
  name: 'successCriteria',
24
24
  clarity: clamp(raw.successCriteria),
25
25
  weight: weights[GestaltPrinciple.SIMILARITY],
26
26
  gestaltPrinciple: GestaltPrinciple.SIMILARITY,
27
- label: '성공 기준 명확성',
28
- improvementHint: '측정 가능한 성공 지표(KPI, 수치 목표 등)를 추가해 주세요.',
27
+ label: '성공 기준 명확도',
28
+ improvementHint: '성공했을 어떤 상태인지 측정 가능한 기준으로 설명해보세요',
29
29
  },
30
30
  {
31
31
  name: 'priorityClarity',
32
32
  clarity: clamp(raw.priorityClarity),
33
33
  weight: weights[GestaltPrinciple.FIGURE_GROUND],
34
34
  gestaltPrinciple: GestaltPrinciple.FIGURE_GROUND,
35
- label: '우선순위 명확성',
36
- improvementHint: 'MVP 필수 기능과 추후 개선 사항을 명확히 구분해 주세요.',
35
+ label: '우선순위 명확도',
36
+ improvementHint: ' 필요한 기능과 선택적인 기능을 구분해서 설명해보세요',
37
37
  },
38
38
  ];
39
39
  if (projectType === 'brownfield' && raw.contextClarity !== undefined) {
@@ -42,8 +42,8 @@ export function computeResolutionScore(raw, projectType) {
42
42
  clarity: clamp(raw.contextClarity),
43
43
  weight: weights[GestaltPrinciple.CONTINUITY],
44
44
  gestaltPrinciple: GestaltPrinciple.CONTINUITY,
45
- label: '맥락 일관성',
46
- improvementHint: '기존 시스템과의 연계 방식, 마이그레이션 전략, 호환성 요구사항을 구체적으로 설명해 주세요.',
45
+ label: '컨텍스트 명확도',
46
+ improvementHint: '기존 시스템이나 제약사항 배경 정보를 알려주세요',
47
47
  });
48
48
  }
49
49
  const weightedSum = dimensions.reduce((sum, d) => sum + d.clarity * d.weight, 0);
@@ -1 +1 @@
1
- {"version":3,"file":"analyzer.js","sourceRoot":"","sources":["../../../src/gestalt/analyzer.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,GAIjB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,kBAAkB,EAClB,kBAAkB,EAClB,oBAAoB,EACpB,sBAAsB,EACtB,sBAAsB,GACvB,MAAM,sBAAsB,CAAC;AAiB9B,MAAM,UAAU,sBAAsB,CACpC,GAAqB,EACrB,WAAwB;IAExB,MAAM,OAAO,GAAG,WAAW,KAAK,YAAY,CAAC,CAAC,CAAC,kBAAkB,CAAC,CAAC,CAAC,kBAAkB,CAAC;IAEvF,MAAM,UAAU,GAA0B;QACxC;YACE,IAAI,EAAE,aAAa;YACnB,OAAO,EAAE,KAAK,CAAC,GAAG,CAAC,WAAW,CAAC;YAC/B,MAAM,EAAE,OAAO,CAAC,gBAAgB,CAAC,OAAO,CAAC;YACzC,gBAAgB,EAAE,gBAAgB,CAAC,OAAO;YAC1C,KAAK,EAAE,QAAQ;YACf,eAAe,EAAE,qCAAqC;SACvD;QACD;YACE,IAAI,EAAE,mBAAmB;YACzB,OAAO,EAAE,KAAK,CAAC,GAAG,CAAC,iBAAiB,CAAC;YACrC,MAAM,EAAE,OAAO,CAAC,gBAAgB,CAAC,SAAS,CAAC;YAC3C,gBAAgB,EAAE,gBAAgB,CAAC,SAAS;YAC5C,KAAK,EAAE,UAAU;YACjB,eAAe,EAAE,4CAA4C;SAC9D;QACD;YACE,IAAI,EAAE,iB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BAAwB,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;IAEvE,MAAM,OAAO,GAAG,KAAK,CAAC,WAAW,GAAG,iBAAiB,CAAC,CAAC;IAEvD,OAAO;QACL,OAAO;QACP,UAAU;QACV,OAAO,EAAE,OAAO,IAAI,oBAAoB;KACzC,CAAC;AACJ,CAAC;AAED,SAAS,wBAAwB,CAAC,cAAwB;IACxD,IAAI,cAAc,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,CAAC,CAAC;IAC1C,MAAM,OAAO,GACX,sBAAsB;QACtB,CAAC,sBAAsB,GAAG,sBAAsB,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,cAAc,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC;IAC7F,OAAO,OAAO,CAAC;AACjB,CAAC;AAED,SAAS,KAAK,CAAC,KAAa,EAAE,GAAG,GAAG,CAAC,EAAE,GAAG,GAAG,CAAC;IAC5C,OAAO,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC,CAAC;AAC7C,CAAC"}
@@ -0,0 +1,7 @@
1
+ import type { ExecuteSession } from '../core/types.js';
2
+ /**
3
+ * Generates a self-contained HTML page visualizing the evolution history of an execute session.
4
+ * Uses Chart.js CDN for line charts showing evaluationScore and goalAlignment per generation.
5
+ */
6
+ export declare function generateEvolutionHtml(session: ExecuteSession): string;
7
+ //# sourceMappingURL=evolution-html-generator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"evolution-html-generator.d.ts","sourceRoot":"","sources":["../../../src/graph-viz/evolution-html-generator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAEvD;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,cAAc,GAAG,MAAM,CA2WrE"}