@tienne/gestalt 0.84.2 โ†’ 0.85.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 (204) hide show
  1. package/CLAUDE.md +4 -4
  2. package/README.ko.md +72 -22
  3. package/README.md +73 -23
  4. package/dist/benchmarks/runners/passthrough-benchmark-runner.d.ts.map +1 -1
  5. package/dist/benchmarks/runners/passthrough-benchmark-runner.js +8 -7
  6. package/dist/benchmarks/runners/passthrough-benchmark-runner.js.map +1 -1
  7. package/dist/bin/gestalt.js +2 -2
  8. package/dist/package.json +1 -1
  9. package/dist/plugin/skills/dispatch/SKILL.md +14 -2
  10. package/dist/plugin/skills/execute/SKILL.md +219 -52
  11. package/dist/plugin/skills/interview/SKILL.md +15 -2
  12. package/dist/plugin/skills/solve/SKILL.md +20 -5
  13. package/dist/plugin/skills/spec/SKILL.md +2 -0
  14. package/dist/src/cli/commands/interview.d.ts.map +1 -1
  15. package/dist/src/cli/commands/interview.js +16 -4
  16. package/dist/src/cli/commands/interview.js.map +1 -1
  17. package/dist/src/cli/commands/memory-merge.d.ts +2 -0
  18. package/dist/src/cli/commands/memory-merge.d.ts.map +1 -0
  19. package/dist/src/cli/commands/memory-merge.js +13 -0
  20. package/dist/src/cli/commands/memory-merge.js.map +1 -0
  21. package/dist/src/cli/index.d.ts.map +1 -1
  22. package/dist/src/cli/index.js +7 -0
  23. package/dist/src/cli/index.js.map +1 -1
  24. package/dist/src/core/constants.d.ts +4 -0
  25. package/dist/src/core/constants.d.ts.map +1 -1
  26. package/dist/src/core/constants.js +8 -0
  27. package/dist/src/core/constants.js.map +1 -1
  28. package/dist/src/core/errors.d.ts +3 -0
  29. package/dist/src/core/errors.d.ts.map +1 -1
  30. package/dist/src/core/errors.js +7 -0
  31. package/dist/src/core/errors.js.map +1 -1
  32. package/dist/src/core/file-lock.d.ts +37 -0
  33. package/dist/src/core/file-lock.d.ts.map +1 -0
  34. package/dist/src/core/file-lock.js +143 -0
  35. package/dist/src/core/file-lock.js.map +1 -0
  36. package/dist/src/core/json-file.d.ts +40 -0
  37. package/dist/src/core/json-file.d.ts.map +1 -0
  38. package/dist/src/core/json-file.js +82 -0
  39. package/dist/src/core/json-file.js.map +1 -0
  40. package/dist/src/core/types.d.ts +86 -9
  41. package/dist/src/core/types.d.ts.map +1 -1
  42. package/dist/src/events/store.d.ts +6 -0
  43. package/dist/src/events/store.d.ts.map +1 -1
  44. package/dist/src/events/store.js +12 -0
  45. package/dist/src/events/store.js.map +1 -1
  46. package/dist/src/events/types.d.ts +7 -0
  47. package/dist/src/events/types.d.ts.map +1 -1
  48. package/dist/src/events/types.js +7 -0
  49. package/dist/src/events/types.js.map +1 -1
  50. package/dist/src/execute/artifact-verifier.d.ts +12 -0
  51. package/dist/src/execute/artifact-verifier.d.ts.map +1 -0
  52. package/dist/src/execute/artifact-verifier.js +211 -0
  53. package/dist/src/execute/artifact-verifier.js.map +1 -0
  54. package/dist/src/execute/drift-detector.d.ts +2 -0
  55. package/dist/src/execute/drift-detector.d.ts.map +1 -1
  56. package/dist/src/execute/drift-detector.js +9 -13
  57. package/dist/src/execute/drift-detector.js.map +1 -1
  58. package/dist/src/execute/orchestrators/evaluation.d.ts +5 -1
  59. package/dist/src/execute/orchestrators/evaluation.d.ts.map +1 -1
  60. package/dist/src/execute/orchestrators/evaluation.js +48 -41
  61. package/dist/src/execute/orchestrators/evaluation.js.map +1 -1
  62. package/dist/src/execute/orchestrators/evolution.d.ts +17 -3
  63. package/dist/src/execute/orchestrators/evolution.d.ts.map +1 -1
  64. package/dist/src/execute/orchestrators/evolution.js +102 -53
  65. package/dist/src/execute/orchestrators/evolution.js.map +1 -1
  66. package/dist/src/execute/orchestrators/execution.d.ts +17 -2
  67. package/dist/src/execute/orchestrators/execution.d.ts.map +1 -1
  68. package/dist/src/execute/orchestrators/execution.js +99 -3
  69. package/dist/src/execute/orchestrators/execution.js.map +1 -1
  70. package/dist/src/execute/orchestrators/planning.d.ts +18 -4
  71. package/dist/src/execute/orchestrators/planning.d.ts.map +1 -1
  72. package/dist/src/execute/orchestrators/planning.js +62 -21
  73. package/dist/src/execute/orchestrators/planning.js.map +1 -1
  74. package/dist/src/execute/orchestrators/types.d.ts +12 -1
  75. package/dist/src/execute/orchestrators/types.d.ts.map +1 -1
  76. package/dist/src/execute/passthrough-engine.d.ts +12 -5
  77. package/dist/src/execute/passthrough-engine.d.ts.map +1 -1
  78. package/dist/src/execute/passthrough-engine.js +10 -4
  79. package/dist/src/execute/passthrough-engine.js.map +1 -1
  80. package/dist/src/execute/repository.d.ts +11 -1
  81. package/dist/src/execute/repository.d.ts.map +1 -1
  82. package/dist/src/execute/repository.js +138 -19
  83. package/dist/src/execute/repository.js.map +1 -1
  84. package/dist/src/execute/session.d.ts +26 -4
  85. package/dist/src/execute/session.d.ts.map +1 -1
  86. package/dist/src/execute/session.js +165 -48
  87. package/dist/src/execute/session.js.map +1 -1
  88. package/dist/src/execute/structural-commands.d.ts +23 -0
  89. package/dist/src/execute/structural-commands.d.ts.map +1 -0
  90. package/dist/src/execute/structural-commands.js +139 -0
  91. package/dist/src/execute/structural-commands.js.map +1 -0
  92. package/dist/src/interview/engine.d.ts +1 -1
  93. package/dist/src/interview/engine.d.ts.map +1 -1
  94. package/dist/src/interview/engine.js +3 -3
  95. package/dist/src/interview/engine.js.map +1 -1
  96. package/dist/src/interview/passthrough-engine.d.ts +1 -1
  97. package/dist/src/interview/passthrough-engine.d.ts.map +1 -1
  98. package/dist/src/interview/passthrough-engine.js +20 -3
  99. package/dist/src/interview/passthrough-engine.js.map +1 -1
  100. package/dist/src/interview/repository.d.ts +8 -0
  101. package/dist/src/interview/repository.d.ts.map +1 -1
  102. package/dist/src/interview/repository.js +16 -1
  103. package/dist/src/interview/repository.js.map +1 -1
  104. package/dist/src/interview/session.d.ts +15 -2
  105. package/dist/src/interview/session.d.ts.map +1 -1
  106. package/dist/src/interview/session.js +67 -23
  107. package/dist/src/interview/session.js.map +1 -1
  108. package/dist/src/knowledge-base/embedding.d.ts +6 -1
  109. package/dist/src/knowledge-base/embedding.d.ts.map +1 -1
  110. package/dist/src/knowledge-base/embedding.js +19 -6
  111. package/dist/src/knowledge-base/embedding.js.map +1 -1
  112. package/dist/src/local-pr/registry.d.ts +1 -21
  113. package/dist/src/local-pr/registry.d.ts.map +1 -1
  114. package/dist/src/local-pr/registry.js +7 -113
  115. package/dist/src/local-pr/registry.js.map +1 -1
  116. package/dist/src/mcp/input-guard.d.ts +17 -0
  117. package/dist/src/mcp/input-guard.d.ts.map +1 -1
  118. package/dist/src/mcp/input-guard.js +1 -1
  119. package/dist/src/mcp/input-guard.js.map +1 -1
  120. package/dist/src/mcp/schemas.d.ts +62 -7
  121. package/dist/src/mcp/schemas.d.ts.map +1 -1
  122. package/dist/src/mcp/schemas.js +28 -1
  123. package/dist/src/mcp/schemas.js.map +1 -1
  124. package/dist/src/mcp/server.d.ts.map +1 -1
  125. package/dist/src/mcp/server.js +26 -40
  126. package/dist/src/mcp/server.js.map +1 -1
  127. package/dist/src/mcp/tools/execute/evaluate.d.ts.map +1 -1
  128. package/dist/src/mcp/tools/execute/evaluate.js +15 -9
  129. package/dist/src/mcp/tools/execute/evaluate.js.map +1 -1
  130. package/dist/src/mcp/tools/execute/evolve.d.ts +1 -0
  131. package/dist/src/mcp/tools/execute/evolve.d.ts.map +1 -1
  132. package/dist/src/mcp/tools/execute/evolve.js +102 -37
  133. package/dist/src/mcp/tools/execute/evolve.js.map +1 -1
  134. package/dist/src/mcp/tools/execute/execution.d.ts.map +1 -1
  135. package/dist/src/mcp/tools/execute/execution.js +66 -7
  136. package/dist/src/mcp/tools/execute/execution.js.map +1 -1
  137. package/dist/src/mcp/tools/execute/planning.d.ts.map +1 -1
  138. package/dist/src/mcp/tools/execute/planning.js +34 -2
  139. package/dist/src/mcp/tools/execute/planning.js.map +1 -1
  140. package/dist/src/mcp/tools/execute/roles.d.ts.map +1 -1
  141. package/dist/src/mcp/tools/execute/roles.js +13 -5
  142. package/dist/src/mcp/tools/execute/roles.js.map +1 -1
  143. package/dist/src/mcp/tools/execute/utility.d.ts.map +1 -1
  144. package/dist/src/mcp/tools/execute/utility.js +26 -0
  145. package/dist/src/mcp/tools/execute/utility.js.map +1 -1
  146. package/dist/src/mcp/tools/execute/utils.d.ts +1 -0
  147. package/dist/src/mcp/tools/execute/utils.d.ts.map +1 -1
  148. package/dist/src/mcp/tools/execute/utils.js +15 -0
  149. package/dist/src/mcp/tools/execute/utils.js.map +1 -1
  150. package/dist/src/mcp/tools/execute-passthrough.d.ts.map +1 -1
  151. package/dist/src/mcp/tools/execute-passthrough.js +21 -1
  152. package/dist/src/mcp/tools/execute-passthrough.js.map +1 -1
  153. package/dist/src/mcp/tools/interview-passthrough.d.ts +2 -1
  154. package/dist/src/mcp/tools/interview-passthrough.d.ts.map +1 -1
  155. package/dist/src/mcp/tools/interview-passthrough.js +4 -3
  156. package/dist/src/mcp/tools/interview-passthrough.js.map +1 -1
  157. package/dist/src/mcp/tools/interview.d.ts.map +1 -1
  158. package/dist/src/mcp/tools/interview.js +2 -1
  159. package/dist/src/mcp/tools/interview.js.map +1 -1
  160. package/dist/src/mcp/tools/review-passthrough.js +15 -19
  161. package/dist/src/mcp/tools/review-passthrough.js.map +1 -1
  162. package/dist/src/mcp/tools/spec-passthrough.d.ts.map +1 -1
  163. package/dist/src/mcp/tools/spec-passthrough.js +16 -8
  164. package/dist/src/mcp/tools/spec-passthrough.js.map +1 -1
  165. package/dist/src/mcp/tools/status.d.ts.map +1 -1
  166. package/dist/src/mcp/tools/status.js +4 -0
  167. package/dist/src/mcp/tools/status.js.map +1 -1
  168. package/dist/src/memory/memory-context-injector.d.ts +22 -8
  169. package/dist/src/memory/memory-context-injector.d.ts.map +1 -1
  170. package/dist/src/memory/memory-context-injector.js +85 -13
  171. package/dist/src/memory/memory-context-injector.js.map +1 -1
  172. package/dist/src/memory/memory-merge.d.ts +19 -0
  173. package/dist/src/memory/memory-merge.d.ts.map +1 -0
  174. package/dist/src/memory/memory-merge.js +120 -0
  175. package/dist/src/memory/memory-merge.js.map +1 -0
  176. package/dist/src/memory/project-memory-store.d.ts +15 -11
  177. package/dist/src/memory/project-memory-store.d.ts.map +1 -1
  178. package/dist/src/memory/project-memory-store.js +97 -120
  179. package/dist/src/memory/project-memory-store.js.map +1 -1
  180. package/dist/src/memory/semantic-search.d.ts +4 -1
  181. package/dist/src/memory/semantic-search.d.ts.map +1 -1
  182. package/dist/src/memory/semantic-search.js +66 -19
  183. package/dist/src/memory/semantic-search.js.map +1 -1
  184. package/dist/src/resilience/lateral.d.ts +8 -1
  185. package/dist/src/resilience/lateral.d.ts.map +1 -1
  186. package/dist/src/resilience/lateral.js +52 -4
  187. package/dist/src/resilience/lateral.js.map +1 -1
  188. package/package.json +1 -1
  189. package/plugin/.codex-plugin/plugin.json +1 -1
  190. package/plugin/.mcp.json +1 -1
  191. package/plugin/mcp.json +1 -1
  192. package/plugin/skills/dispatch/SKILL.md +14 -2
  193. package/plugin/skills/execute/SKILL.md +219 -52
  194. package/plugin/skills/interview/SKILL.md +15 -2
  195. package/plugin/skills/solve/SKILL.md +20 -5
  196. package/plugin/skills/spec/SKILL.md +2 -0
  197. package/dist/src/interview/mini-interview-engine.d.ts +0 -33
  198. package/dist/src/interview/mini-interview-engine.d.ts.map +0 -1
  199. package/dist/src/interview/mini-interview-engine.js +0 -102
  200. package/dist/src/interview/mini-interview-engine.js.map +0 -1
  201. package/dist/src/memory/user-profile-store.d.ts +0 -13
  202. package/dist/src/memory/user-profile-store.d.ts.map +0 -1
  203. package/dist/src/memory/user-profile-store.js +0 -85
  204. package/dist/src/memory/user-profile-store.js.map +0 -1
@@ -1,16 +1,16 @@
1
1
  ---
2
2
  name: execute
3
- version: "1.3.0"
4
- description: "Gestalt-driven execution planner that transforms a Spec into a validated ExecutionPlan. Requires a Spec that already exists. Given only a problem statement, use solve instead โ€” it drives interview โ†’ spec โ†’ execute as one loop."
3
+ version: '1.3.0'
4
+ description: 'Gestalt-driven execution planner that transforms a Spec into a validated ExecutionPlan. Requires a Spec that already exists. Given only a problem statement, use solve instead โ€” it drives interview โ†’ spec โ†’ execute as one loop.'
5
5
  triggers:
6
- - "execute"
7
- - "plan execution"
8
- - "create execution plan"
6
+ - 'execute'
7
+ - 'plan execution'
8
+ - 'create execution plan'
9
9
  inputs:
10
10
  spec:
11
11
  type: object
12
12
  required: true
13
- description: "A validated Spec specification from the spec generation step"
13
+ description: 'A validated Spec specification from the spec generation step'
14
14
  outputs:
15
15
  - executionPlan
16
16
  ---
@@ -61,6 +61,7 @@ Success condition: `score โ‰ฅ 0.85` AND `goalAlignment โ‰ฅ 0.80`
61
61
  - **Flow A โ€” Structural Fix**: fix lint/build/test failures โ†’ re-evaluate
62
62
  - **Flow B โ€” Contextual Evolution**: patch Spec ACs/constraints โ†’ re-execute impacted tasks โ†’ re-evaluate
63
63
  - **Flow C โ€” Lateral Thinking**: when stagnation detected, rotate through Multistability / Simplicity / Reification / Invariance personas
64
+ - **Flow D โ€” Human Decision**: when all four personas are exhausted, the session pauses as `awaiting_human` โ€” ask the human, then `gate_resolve` and follow `nextAction`
64
65
 
65
66
  ## Phase 0 โ€” ๊ทœ์น™ ํ™•๋ณด (ํ•„์ˆ˜ โ€” ์Šคํ‚ต ๋ถˆ๊ฐ€)
66
67
 
@@ -109,16 +110,15 @@ ges_status() โ†’ {
109
110
 
110
111
  **`ruleSourceErrors`๊ฐ€ ๋น„์–ด ์žˆ์ง€ ์•Š์œผ๋ฉด ๋ฉˆ์ถ˜๋‹ค.** ํŒ์ •๊ณผ ์‚ฌ์šฉ์ž์—๊ฒŒ ์•Œ๋ฆด ๋ฌธ๊ตฌ๋Š” [`../_shared/rule-sources.md`](../_shared/rule-sources.md)์˜ "์„ ์–ธ์ด ๊นจ์กŒ์„ ๋•Œ" ์ ˆ์ด ์›๋ณธ์ด๋‹ค. **`ruleSources`๊ฐ€ ๋น„์–ด ์žˆ์ง€ ์•Š์•„๋„ ์ผ๋ถ€๊ฐ€ ๋น ์ง„ ์ƒํƒœ์ผ ์ˆ˜ ์žˆ์œผ๋‹ˆ ๋ฐฐ์—ด ๊ธธ์ด๋กœ ํŒ์ •ํ•˜์ง€ ์•Š๋Š”๋‹ค.**
111
112
 
112
-
113
113
  `scope`๊ฐ€ ๋น„์–ด ์žˆ์ง€ ์•Š์œผ๋ฉด **์ด๋ฒˆ Spec์— ํ•ด๋‹นํ•˜๋Š” ์†Œ์Šค๋งŒ** ์ฝ๋Š”๋‹ค. ๋ฐฑ์—”๋“œ ํƒœ์Šคํฌ๋งŒ ์žˆ๋Š” Spec์—์„œ ๋””์ž์ธ ํ† ํฐ์„ ๋ฌผ์–ด๋ณผ ์ด์œ ๊ฐ€ ์—†๋‹ค. ์—ฌ๊ธฐ๋Š” ๊ฑด๋“œ๋ฆด ํŒŒ์ผ์ด ์ •ํ•ด์ง„ ์ž๋ฆฌ๋ผ ํƒœ๊ทธ๋ฅผ ๊ทธ ํŒŒ์ผ์—์„œ ๋ฝ‘๋Š”๋‹ค.
114
114
 
115
115
  **`solve`๋กœ ๋“ค์–ด์™€ ์†Œ์Šค ์ฝ๊ธฐ๋ฅผ ๊ฑด๋„ˆ๋›ฐ๋Š” ๊ฒฝ์šฐ์—๋„ ์ด ํŒ์ •์€ ํ•œ๋‹ค.** ๊ฑด๋„ˆ๋›ฐ๋Š” ๊ฑด ์ฝ๊ธฐ์ง€ ํŒ์ •์ด ์•„๋‹ˆ๋‹ค. ์•ž ์Šคํ‚ฌ์€ ํŒŒ์ผ์„ ๋ชจ๋ฅธ ์ฑ„ ๋„˜๊ฒผ์œผ๋ฏ€๋กœ ์—ฌ๊ธฐ์„œ ์„ธ ๊ฐ€์ง€๊ฐ€ ์ •ํ•ด์ง„๋‹ค.
116
116
 
117
- | ์•ž์—์„œ ๋„˜์–ด์˜จ ๊ฒƒ | ์—ฌ๊ธฐ์„œ |
118
- |---|---|
117
+ | ์•ž์—์„œ ๋„˜์–ด์˜จ ๊ฒƒ | ์—ฌ๊ธฐ์„œ |
118
+ | -------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- |
119
119
  | ๋„“๊ฒŒ ์žก์•„ ์ฝ์–ด๋‘” `convention` ์†Œ์Šค ์ค‘ ํŒŒ์ผ์„ ๋ณด๋‹ˆ ์•ˆ ๊ฑธ๋ฆฌ๋Š” ๊ฒƒ | `repoRules.sources`์—์„œ ๋บ€๋‹ค. ๊ฑฐ๊ธฐ์„œ ๋น ์ง€๋ฉด ์„œ๋ธŒ์—์ด์ „ํŠธ ํ”„๋กฌํ”„ํŠธ์™€ ์™„๋ฃŒ ๋ณด๊ณ  ์–‘์ชฝ์—์„œ ํ•จ๊ป˜ ๋น ์ง„๋‹ค |
120
- | ํŒ์ •์„ ๋ฏธ๋ค„๋‘” `stop`๊ณผ `delegate` ์†Œ์Šค | ์—ฌ๊ธฐ์„œ ํŒ์ •ํ•œ๋‹ค. ๊ฑธ๋ฆฌ๋ฉด ์ฝ๊ฑฐ๋‚˜ ๋ฉˆ์ถ”๊ฑฐ๋‚˜ ๋„˜๊ธด๋‹ค |
121
- | ์ƒˆ๋กœ ๊ฑธ๋ฆฌ๋Š” ์†Œ์Šค | ๊ทธ๊ฒƒ๋งŒ ๋” ์ฝ๋Š”๋‹ค |
120
+ | ํŒ์ •์„ ๋ฏธ๋ค„๋‘” `stop`๊ณผ `delegate` ์†Œ์Šค | ์—ฌ๊ธฐ์„œ ํŒ์ •ํ•œ๋‹ค. ๊ฑธ๋ฆฌ๋ฉด ์ฝ๊ฑฐ๋‚˜ ๋ฉˆ์ถ”๊ฑฐ๋‚˜ ๋„˜๊ธด๋‹ค |
121
+ | ์ƒˆ๋กœ ๊ฑธ๋ฆฌ๋Š” ์†Œ์Šค | ๊ทธ๊ฒƒ๋งŒ ๋” ์ฝ๋Š”๋‹ค |
122
122
 
123
123
  `trust: "delegate"`์ธ ์†Œ์Šค๊ฐ€ ์ด๋ฒˆ ์ž‘์—… ๋ฒ”์œ„์— ๊ฑธ๋ฆฌ๋ฉด ๊ทธ ๋ถ€๋ถ„์€ ๊ฒŒ์ŠˆํƒˆํŠธ๊ฐ€ ์ง์ ‘ ๋งŒ๋“ค์ง€ ์•Š๊ณ  ๋„˜๊ธด๋‹ค. ์–ด๋””๊นŒ์ง€ ๋„˜๊ธฐ๋Š”์ง€ ์‚ฌ์šฉ์ž์—๊ฒŒ ์•Œ๋ฆฌ๊ณ  ์ง„ํ–‰ํ•œ๋‹ค.
124
124
 
@@ -145,41 +145,52 @@ API ํ‚ค ์—†์ด MCP ์„œ๋ฒ„ ์‹คํ–‰ ์‹œ ์ž๋™ ํ™œ์„ฑํ™”. LLM ์ž‘์—…์„ caller๊ฐ€
145
145
  ### Action๋ณ„ ์‚ฌ์šฉ๋ฒ•
146
146
 
147
147
  **`start`** โ€” ์‹คํ–‰ ๊ณ„ํš ์„ธ์…˜ ์‹œ์ž‘
148
+
148
149
  ```json
149
150
  { "action": "start", "spec": { ... } }
150
151
  ```
152
+
151
153
  โ†’ `{ status, sessionId, specId, executeContext, message }`
152
154
 
153
155
  **`plan_step`** โ€” ๊ฐ ๊ณ„ํš ๋‹จ๊ณ„ ๊ฒฐ๊ณผ ์ œ์ถœ
156
+
154
157
  ```json
155
158
  { "action": "plan_step", "sessionId": "...", "stepResult": { "principle": "figure_ground", "classifiedACs": [...] } }
156
159
  ```
160
+
157
161
  โ†’ `{ status, sessionId, stepsCompleted, isLastStep, executeContext?, message }`
158
162
 
163
+ continuity์—์„œ DAG๊ฐ€ ๋ฌดํšจ๋ฉด `error`๊ฐ€ ํ•จ๊ป˜ ์‹ค๋ฆฐ `status: "plan_rewound"` ์‘๋‹ต์ด ์˜จ๋‹ค. [DAG๊ฐ€ ๋ฌดํšจ์ผ ๋•Œ](#dag๊ฐ€-๋ฌดํšจ์ผ-๋•Œ--closure๋กœ-๋˜๊ฐ๊ธฐ)๋ฅผ ๋ณธ๋‹ค.
164
+
159
165
  **`plan_complete`** โ€” ์ตœ์ข… ์‹คํ–‰ ๊ณ„ํš ์กฐ๋ฆฝ
166
+
160
167
  ```json
161
168
  { "action": "plan_complete", "sessionId": "..." }
162
169
  ```
170
+
163
171
  โ†’ `{ status, sessionId, executionPlan, message }`
164
172
 
173
+ ์ €์žฅ๋œ ๊ณ„ํš์˜ DAG๊ฐ€ ๋ฌดํšจ๋ฉด ํ™•์ •ํ•˜์ง€ ์•Š๊ณ  ๊ฐ™์€ `plan_rewound` ์‘๋‹ต์„ ๋Œ๋ ค์ค€๋‹ค.
174
+
165
175
  **`status`** โ€” ์„ธ์…˜ ์ƒํƒœ ํ™•์ธ
176
+
166
177
  ```json
167
178
  { "action": "status", "sessionId": "..." }
168
179
  ```
169
180
 
170
181
  ### ExecuteContext ํ•„๋“œ
171
182
 
172
- | ํ•„๋“œ | ํƒ€์ž… | ์„ค๋ช… |
173
- |------|------|------|
174
- | `systemPrompt` | string | ์‹คํ–‰ ๊ณ„ํš ์‹œ์Šคํ…œ ํ”„๋กฌํ”„ํŠธ |
175
- | `planningPrompt` | string | ํ˜„์žฌ ๋‹จ๊ณ„์˜ ๊ณ„ํš ํ”„๋กฌํ”„ํŠธ |
176
- | `currentPrinciple` | string | ํ˜„์žฌ ์ ์šฉ ์ค‘์ธ ๊ฒŒ์ŠˆํƒˆํŠธ ์›๋ฆฌ |
177
- | `principleStrategy` | string | ํ•ด๋‹น ์›๋ฆฌ์˜ ์ „๋žต ์„ค๋ช… |
178
- | `phase` | string | ํ˜„์žฌ ๋‹จ๊ณ„ (`planning`) |
179
- | `stepNumber` | number | ํ˜„์žฌ ์Šคํ… ๋ฒˆํ˜ธ (1-4) |
180
- | `totalSteps` | number | ์ „์ฒด ์Šคํ… ์ˆ˜ (4) |
181
- | `spec` | Spec | ์›๋ณธ Spec ์ŠคํŽ™ |
182
- | `previousSteps` | array | ์ด์ „ ๋‹จ๊ณ„ ๊ฒฐ๊ณผ๋“ค |
183
+ | ํ•„๋“œ | ํƒ€์ž… | ์„ค๋ช… |
184
+ | ------------------- | ------ | ----------------------------------------------------------------------------------------------- |
185
+ | `systemPrompt` | string | ์‹คํ–‰ ๊ณ„ํš ์‹œ์Šคํ…œ ํ”„๋กฌํ”„ํŠธ |
186
+ | `planningPrompt` | string | ํ˜„์žฌ ๋‹จ๊ณ„์˜ ๊ณ„ํš ํ”„๋กฌํ”„ํŠธ |
187
+ | `currentStage` | string | ํ˜„์žฌ ๋‹จ๊ณ„๋ฅผ ํ’€์–ด ์“ด ๋ฌธ๊ตฌ (์˜ˆ: `๋น ์ง„ ์š”๊ตฌ์‚ฌํ•ญ ์ฑ„์šฐ๊ธฐ`). ์„œ๋ฒ„ ๋‚ด๋ถ€์˜ ์›๋ฆฌ ์ด๋ฆ„ ๋Œ€์‹  ์‘๋‹ต์— ์‹ค๋ฆฐ๋‹ค |
188
+ | `principleStrategy` | string | ํ•ด๋‹น ์›๋ฆฌ์˜ ์ „๋žต ์„ค๋ช… |
189
+ | `phase` | string | ํ˜„์žฌ ๋‹จ๊ณ„ (`planning`) |
190
+ | `stepNumber` | number | ํ˜„์žฌ ์Šคํ… ๋ฒˆํ˜ธ (1-4) |
191
+ | `totalSteps` | number | ์ „์ฒด ์Šคํ… ์ˆ˜ (4) |
192
+ | `spec` | Spec | ์›๋ณธ Spec ์ŠคํŽ™ |
193
+ | `previousSteps` | array | ์ด์ „ ๋‹จ๊ณ„ ๊ฒฐ๊ณผ๋“ค |
183
194
 
184
195
  ### Planning Principle ์ˆœ์„œ
185
196
 
@@ -195,6 +206,31 @@ API ํ‚ค ์—†์ด MCP ์„œ๋ฒ„ ์‹คํ–‰ ์‹œ ์ž๋™ ํ™œ์„ฑํ™”. LLM ์ž‘์—…์„ caller๊ฐ€
195
206
  - Continuity ๋‹จ๊ณ„์—์„œ๋Š” ์„œ๋ฒ„ ์ธก DAG ๊ฒ€์ฆ์ด ์ถ”๊ฐ€๋กœ ์ˆ˜ํ–‰๋จ
196
207
  - ๋ชจ๋“  AC๊ฐ€ ๋ถ„๋ฅ˜๋˜์–ด์•ผ ํ•˜๊ณ  ๋ชจ๋“  Task๊ฐ€ ๊ทธ๋ฃน์— ํฌํ•จ๋˜์–ด์•ผ ํ•จ
197
208
 
209
+ ### DAG๊ฐ€ ๋ฌดํšจ์ผ ๋•Œ โ€” closure๋กœ ๋˜๊ฐ๊ธฐ
210
+
211
+ ์ˆœํ™˜์€ closure ๋‹จ๊ณ„ `atomicTasks`์˜ `dependsOn`์—์„œ ์ƒ๊ธด๋‹ค. continuity๋งŒ ๋‹ค์‹œ ๋‚ด์„œ๋Š” ๋ชป ๊ณ ์นœ๋‹ค. ๊ทธ๋ž˜์„œ `dagValidation.isValid: false`๋ฅผ ๋ณด๊ณ ํ•˜๊ฑฐ๋‚˜ ์„œ๋ฒ„๊ฐ€ ์ˆœํ™˜์ด๋‚˜ ์ถฉ๋Œ์„ ์ฐพ์œผ๋ฉด `plan_step`(continuity)๊ณผ `plan_complete` ๋‘˜ ๋‹ค ๊ณ„ํš์„ ํ™•์ •ํ•˜์ง€ ์•Š๋Š”๋‹ค. ๋Œ€์‹  ์„ธ์…˜์„ figure_ground๊นŒ์ง€๋งŒ ๋‚จ๊ธฐ๊ณ  ๋˜๊ฐ์€ ๋’ค ์ด๋ ‡๊ฒŒ ๋Œ๋ ค์ค€๋‹ค.
212
+
213
+ ```json
214
+ {
215
+ "error": "Dependency DAG is invalid (...)",
216
+ "status": "plan_rewound",
217
+ "sessionId": "...",
218
+ "rewoundToStep": 2,
219
+ "hasCycles": true,
220
+ "cycleDetails": ["Cycle detected involving tasks: task-0 โ†’ task-1"],
221
+ "conflictDetails": [],
222
+ "executeContext": { "currentStage": "๋น ์ง„ ์š”๊ตฌ์‚ฌํ•ญ ์ฑ„์šฐ๊ธฐ", "stepNumber": 2, "...": "..." },
223
+ "nextAction": "plan_step"
224
+ }
225
+ ```
226
+
227
+ - `cycleDetails`์™€ `conflictDetails`๋ฅผ ๋ณด๊ณ  ๋ฌธ์ œ๊ฐ€ ๋œ ํƒœ์Šคํฌ์˜ `dependsOn`์„ ๊ณ ์นœ๋‹ค.
228
+ - ์‘๋‹ต์˜ `executeContext`๋กœ closure๋ถ€ํ„ฐ ๋‹ค์‹œ ๋‚ธ๋‹ค. ๊ทธ๋‹ค์Œ proximity์™€ continuity๋ฅผ ์ฐจ๋ก€๋กœ ๋‹ค์‹œ ์ œ์ถœํ•œ๋‹ค.
229
+ - `isValid: false`๋ฅผ ๊ทธ๋Œ€๋กœ ๋‘๊ณ  continuity๋งŒ ๋‹ค์‹œ ๋‚ด๋ฉด ๋˜ ๋˜๊ฐ๊ธด๋‹ค. ํ˜ธ์ถœ์ž ๋ณด๊ณ ๊ฐ€ ๋ฌดํšจ์—ฌ๋„ ๋ง‰๋Š”๋‹ค.
230
+ - ์ด ์‘๋‹ต์—๋Š” `error` ํ•„๋“œ๊ฐ€ ํ•จ๊ป˜ ์‹ค๋ฆฐ๋‹ค. `plan_complete`๋‚˜ `execute_start`๋กœ ๋„˜์–ด๊ฐ€์ง€ ์•Š๋Š”๋‹ค.
231
+ - ๋˜๊ฐ์€ ๋’ค์˜ closure ํ”„๋กฌํ”„ํŠธ์—๋Š” ์ˆœํ™˜ ์ •๋ณด๋„ ์ง์ „ `atomicTasks`๋„ ์—†๋‹ค. ์„œ๋ธŒ์—์ด์ „ํŠธ๋กœ ๋‹ค์‹œ ๋‚ผ ๋•Œ๋Š” ์‘๋‹ต์˜ `cycleDetails`์™€ `conflictDetails`, ์ง์ „์— ์ œ์ถœํ•œ `atomicTasks`๋ฅผ ํ•จ๊ป˜ ๋„˜๊ธฐ๊ณ  ์ˆœํ™˜์„ ๋งŒ๋“  `dependsOn`์„ ๊ณ ์น˜๋ผ๊ณ  ์ ๋Š”๋‹ค.
232
+ - ๊ฐ™์€ ์„ธ์…˜์—์„œ `plan_rewound`๋ฅผ ์—ฐ์† ๋‘ ๋ฒˆ ๋ฐ›์œผ๋ฉด closure๋ฅผ ๋‹ค์‹œ ์ œ์ถœํ•˜์ง€ ์•Š๋Š”๋‹ค. `cycleDetails`๋ฅผ ์‚ฌ์šฉ์ž์—๊ฒŒ ๋ณด์—ฌ์ฃผ๊ณ  ์–ด๋–ป๊ฒŒ ํ• ์ง€ ๋ฌป๋Š”๋‹ค. ์„œ๋ฒ„๋Š” ํšŸ์ˆ˜๋ฅผ ์„ธ์ง€ ์•Š์œผ๋ฏ€๋กœ ์Šคํ‚ฌ์ด ์„ผ๋‹ค.
233
+
198
234
  ### Reasoning Model ์„œ๋ธŒ์—์ด์ „ํŠธ๋กœ ํ”Œ๋ž˜๋‹ ์ถ”๋ก 
199
235
 
200
236
  Phase 1 ํ”Œ๋ž˜๋‹(`plan_step` 4๋‹จ๊ณ„ + `plan_complete`)์€ Spec์„ ํƒœ์Šคํฌ DAG๋กœ ๋ถ„ํ•ดํ•˜๋Š” ๊นŠ์€ one-shot ์ถ”๋ก ์ด๋ผ, ๊ฒŒ์ŠˆํƒˆํŠธ์—์„œ ์ƒ์œ„ ์ถ”๋ก  ๋ชจ๋ธ์ด ์ง„์งœ ๊ฐ’์„ ํ•˜๋Š” ์ง€์ ์ด๋‹ค. ๊ฐ `plan_step`์˜ `stepResult`(classifiedACs / atomicTasks / taskGroups / dagValidation)๋ฅผ ๋งŒ๋“œ๋Š” ์ถ”๋ก ์€ ํ˜„์žฌ ์„ธ์…˜์ด ์ง์ ‘ ํ•˜์ง€ ๋ง๊ณ  ๋ณ„๋„ Agent ์„œ๋ธŒ์—์ด์ „ํŠธ๋กœ ์Šคํฐํ•œ๋‹ค.
@@ -207,7 +243,7 @@ Phase 1 ํ”Œ๋ž˜๋‹(`plan_step` 4๋‹จ๊ณ„ + `plan_complete`)์€ Spec์„ ํƒœ์Šคํฌ DA
207
243
  ges_status() โ†’ { reasoningModel: "fable", reasoningModelFallback: "opus", ... }
208
244
  ```
209
245
 
210
- **์Šคํฐ.** ๊ฐ `plan_step`(๊ทธ๋ฆฌ๊ณ  `plan_complete` ์กฐ๋ฆฝ์„ ์œ„ํ•œ ์ถ”๋ก ์ด ํ•„์š”ํ•˜๋ฉด ๊ทธ ๋‹จ๊ณ„)์—์„œ Agent ๋„๊ตฌ๋กœ ์„œ๋ธŒ์—์ด์ „ํŠธ๋ฅผ ๋„์šฐ๋˜ `model` ํŒŒ๋ผ๋ฏธํ„ฐ์— `reasoningModel` ๊ฐ’์„ ๋„˜๊ธด๋‹ค. ์„œ๋ธŒ์—์ด์ „ํŠธ์—๋Š” ํ•ด๋‹น ๋‹จ๊ณ„์˜ `executeContext`(`systemPrompt`, `planningPrompt`, `currentPrinciple`, `spec`, `previousSteps`)๋ฅผ ์ „๋‹ฌํ•˜๊ณ  ๊ทธ ๋‹จ๊ณ„์˜ `stepResult`๋ฅผ ์‚ฐ์ถœํ•˜๊ฒŒ ํ•œ๋‹ค. ๊ฒฐ๊ณผ๋ฅผ `plan_step`์œผ๋กœ ์ œ์ถœํ•œ๋‹ค.
246
+ **์Šคํฐ.** ๊ฐ `plan_step`(๊ทธ๋ฆฌ๊ณ  `plan_complete` ์กฐ๋ฆฝ์„ ์œ„ํ•œ ์ถ”๋ก ์ด ํ•„์š”ํ•˜๋ฉด ๊ทธ ๋‹จ๊ณ„)์—์„œ Agent ๋„๊ตฌ๋กœ ์„œ๋ธŒ์—์ด์ „ํŠธ๋ฅผ ๋„์šฐ๋˜ `model` ํŒŒ๋ผ๋ฏธํ„ฐ์— `reasoningModel` ๊ฐ’์„ ๋„˜๊ธด๋‹ค. ์„œ๋ธŒ์—์ด์ „ํŠธ์—๋Š” ํ•ด๋‹น ๋‹จ๊ณ„์˜ `executeContext`(`systemPrompt`, `planningPrompt`, `currentStage`, `spec`, `previousSteps`)๋ฅผ ์ „๋‹ฌํ•˜๊ณ  ๊ทธ ๋‹จ๊ณ„์˜ `stepResult`๋ฅผ ์‚ฐ์ถœํ•˜๊ฒŒ ํ•œ๋‹ค. ๊ฒฐ๊ณผ๋ฅผ `plan_step`์œผ๋กœ ์ œ์ถœํ•œ๋‹ค.
211
247
 
212
248
  **ํด๋ฐฑ์€ ์Šคํ‚ฌ ๋Ÿฐํƒ€์ž„์—์„œ ๋ฐœ๋™ํ•œ๋‹ค.** ์„œ๋ฒ„๋Š” ํด๋ฐฑ ๋Œ€์ƒ(`reasoningModelFallback`)๋งŒ ์•Œ๋ ค์ค„ ๋ฟ, ๋ชจ๋ธ ๊ฐ€์šฉ์„ฑ์„ ๊ฐ์ง€ํ•˜๊ฑฐ๋‚˜ ์žฌ์‹œ๋„ํ•˜์ง€ ์•Š๋Š”๋‹ค. Agent ๋„๊ตฌ๊ฐ€ `reasoningModel`(์˜ˆ: `fable`)์„ ์ง€์›ํ•˜์ง€ ์•Š์•„ ์Šคํฐ์ด ๊ฑฐ๋ถ€/์‹คํŒจํ•˜๋ฉด, ๊ทธ๋•Œ ์Šคํ‚ฌ์ด ์ง์ ‘ `model`์„ `reasoningModelFallback`(์˜ˆ: `opus`)๋กœ ๋ฐ”๊ฟ” 1ํšŒ ์žฌ์‹œ๋„ํ•œ๋‹ค. ํด๋ฐฑ ํŒ๋‹จ๊ณผ ์žฌ์‹œ๋„๋Š” ์ „์ ์œผ๋กœ ์ด ์Šคํ‚ฌ ๋Ÿฐํƒ€์ž„์˜ ์ฑ…์ž„์ด๋‹ค.
213
249
 
@@ -220,9 +256,18 @@ ges_status() โ†’ { reasoningModel: "fable", reasoningModelFallback: "opus", ..
220
256
  `plan_complete` ์ดํ›„ ํ˜ธ์ถœ. ํƒœ์Šคํฌ ๋ชฉ๋ก์„ ๋ฐ›์•„ ์‹คํ–‰ ์ค€๋น„.
221
257
 
222
258
  ```json
223
- { "action": "execute_start", "sessionId": "..." }
259
+ { "action": "execute_start", "sessionId": "...", "cwd": "/path/to/project" }
224
260
  ```
225
- โ†’ `{ status, sessionId, executionPlan, message }`
261
+
262
+ โ†’ `{ status, sessionId, executionPlan, artifactCheck, message }`
263
+
264
+ `cwd`์—๋Š” ํ”„๋กœ์ ํŠธ ๋ฃจํŠธ๋ฅผ ๋„˜๊ธด๋‹ค. ์„œ๋ฒ„๊ฐ€ ์ด ๋””๋ ‰ํ† ๋ฆฌ์—์„œ git ์ž‘์—… ํŠธ๋ฆฌ๊ฐ€ ์‹คํ–‰ ์‹œ์ž‘ ์‹œ์ ์— ์–ด๋–ค ์ƒํƒœ์˜€๋Š”์ง€ ์žก์•„ ๋‘๊ณ  ๋‚˜์ค‘์— `completed` ๋ณด๊ณ ์˜ `artifacts`๋ฅผ ๊ทธ ์ƒํƒœ์™€ ๋Œ€์กฐํ•œ๋‹ค. `cwd`๋ฅผ ๋น„์šฐ๋ฉด ์„ธ์…˜์˜ `codeGraphRepoRoot`๋ฅผ ์“ฐ๊ณ  ๊ทธ๊ฒƒ๋„ ์—†์œผ๋ฉด ์„œ๋ฒ„ ํ”„๋กœ์„ธ์Šค์˜ cwd๋ฅผ ์“ด๋‹ค. git ๋ ˆํฌ๊ฐ€ ์•„๋‹ˆ๋ฉด ๋Œ€์กฐ ์—†์ด ์ง„ํ–‰ํ•œ๋‹ค. ๋Œ€์กฐ ์ค‘์—๋Š” ๊ทธ ๋ ˆํฌ์˜ `filter.*.clean` ์„ค์ •์ด ์‹คํ–‰๋˜๋ฏ€๋กœ ๋ฏฟ์ง€ ์•Š๋Š” ๋ ˆํฌ๋ฅผ `cwd`๋กœ ๋„˜๊ธฐ์ง€ ์•Š๋Š”๋‹ค.
265
+
266
+ ์‘๋‹ต์—๋Š” `artifactCheck: { repoRoot, baseline, error? }`๊ฐ€ ๋ถ™๋Š”๋‹ค. `repoRoot`๋Š” ์‹ค์ œ๋กœ ๋Œ€์กฐ์— ์“ธ ๋””๋ ‰ํ† ๋ฆฌ๋‹ค. `baseline`์€ ์•„๋ž˜ ์…‹ ์ค‘ ํ•˜๋‚˜๋‹ค. `execute_task` ์‘๋‹ต์˜ `artifactCheck`๋Š” `verified` ๊ฐ™์€ ๋ฌธ์ž์—ด ํ•˜๋‚˜๋ผ ๊ผด์ด ๋‹ค๋ฅด๋‹ค.
267
+
268
+ - `captured`: ์‹œ์ž‘ ์‹œ์  ์ƒํƒœ๋ฅผ ์žก์•˜๋‹ค. ์ดํ›„ `completed` ๋ณด๊ณ ๋ฅผ ๋Œ€์กฐํ•œ๋‹ค
269
+ - `no_baseline`: git ๋ ˆํฌ๊ฐ€ ์•„๋‹ˆ๋ผ ๋Œ€์กฐํ•˜์ง€ ์•Š๋Š”๋‹ค
270
+ - `baseline_failed`: git ํ˜ธ์ถœ์ด ์‹คํŒจํ•ด ๋Œ€์กฐํ•˜์ง€ ์•Š๋Š”๋‹ค. ์‹คํŒจ ๋‚ด์šฉ์€ `error`์— ๋‹ด๊ธด๋‹ค
226
271
 
227
272
  ---
228
273
 
@@ -236,6 +281,7 @@ ges_status() โ†’ { reasoningModel: "fable", reasoningModelFallback: "opus", ..
236
281
  // Call 1: ๋งค์นญ ์ปจํ…์ŠคํŠธ ์š”์ฒญ
237
282
  { "action": "role_match", "sessionId": "..." }
238
283
  ```
284
+
239
285
  โ†’ `{ matchContext }` โ€” ์–ด๋–ค ์—์ด์ „ํŠธ๊ฐ€ ์ ํ•ฉํ•œ์ง€ ํŒ๋‹จํ•˜๊ธฐ ์œ„ํ•œ ํ”„๋กฌํ”„ํŠธ
240
286
 
241
287
  `matchContext.tierHint`๋Š” `"frugal"`์ด๋‹ค. `matchContext.availableAgents`์—๋Š” ์—์ด์ „ํŠธ 20์—ฌ ๊ฐœ์˜ description์ด ํ†ต์งธ๋กœ ๋“ค์–ด ์žˆ๋‹ค. ๊ทธ๊ฑธ ์„ธ์…˜ ์ปจํ…์ŠคํŠธ์— ๋“ค์ด๋Š” ๋Œ€์‹  **์„œ๋ธŒ์—์ด์ „ํŠธ์— ๋„˜๊ฒจ 1์ฐจ ํ›„๋ณด๋ฅผ ์ขํžŒ๋‹ค.**
@@ -259,11 +305,22 @@ Agent {
259
305
  "action": "role_match",
260
306
  "sessionId": "...",
261
307
  "matchResult": [
262
- { "agentName": "technical-writer", "domain": ["documentation"], "relevanceScore": 0.9, "reasoning": "..." },
263
- { "agentName": "architect", "domain": ["architecture"], "relevanceScore": 0.7, "reasoning": "..." }
308
+ {
309
+ "agentName": "technical-writer",
310
+ "domain": ["documentation"],
311
+ "relevanceScore": 0.9,
312
+ "reasoning": "..."
313
+ },
314
+ {
315
+ "agentName": "architect",
316
+ "domain": ["architecture"],
317
+ "relevanceScore": 0.7,
318
+ "reasoning": "..."
319
+ }
264
320
  ]
265
321
  }
266
322
  ```
323
+
267
324
  โ†’ `{ perspectivePrompts }` โ€” ๊ฐ ์—์ด์ „ํŠธ๋ณ„ ๊ด€์  ์ƒ์„ฑ ํ”„๋กฌํ”„ํŠธ
268
325
 
269
326
  **`role_consensus` โ€” ๋‹ค์ค‘ ๊ด€์  ํ•ฉ์˜ (2-Call)**
@@ -279,6 +336,7 @@ Agent {
279
336
  ]
280
337
  }
281
338
  ```
339
+
282
340
  โ†’ `{ synthesisContext }` โ€” ๊ด€์  ํ†ตํ•ฉ ํ”„๋กฌํ”„ํŠธ
283
341
 
284
342
  ```json
@@ -293,6 +351,7 @@ Agent {
293
351
  }
294
352
  }
295
353
  ```
354
+
296
355
  โ†’ `{ roleGuidance }` โ€” execute_task ์‹œ ์ฐธ์กฐํ•  ์ตœ์ข… guidance
297
356
 
298
357
  ---
@@ -320,13 +379,13 @@ Agent {
320
379
 
321
380
  ```
322
381
  // ๊ฐ™์€ ๋ฉ”์‹œ์ง€์—์„œ ๋™์‹œ ํ˜ธ์ถœ โ€” Agent 1
323
- Agent(task: "task-0 ์‹คํ–‰: {task-0 title}\n์ปจํ…์ŠคํŠธ: {taskContext}\n์™„๋ฃŒ ํ›„ execute_task๋กœ ๊ฒฐ๊ณผ ์ œ์ถœ")
382
+ Agent(task: "task-0 ์‹คํ–‰: {task-0 title}\n์ปจํ…์ŠคํŠธ: {taskContext}\n์™„๋ฃŒ ํ›„ execute_task๋กœ ๊ฒฐ๊ณผ ์ œ์ถœ. ๋ฐ”๊พผ ํŒŒ์ผ์€ ์ „๋ถ€ artifacts์— ์ ๋Š”๋‹ค. ํŒŒ์ผ์„ ์•ˆ ๋ฐ”๊พธ๋Š” ํƒœ์Šคํฌ๋ฉด noCodeChange: true๋ฅผ ๊ฐ™์ด ๋‚ธ๋‹ค. verification_failed๊ฐ€ ์˜ค๋ฉด ๊ณ ์ณ์„œ ๋‹ค์‹œ ์ œ์ถœํ•˜๊ณ  ๋๋‚ด์ง€ ๋ชปํ–ˆ์œผ๋ฉด status: \"failed\"๋กœ ๋‚ธ๋‹ค. serverError: true๊ฐ€ ํ•จ๊ป˜ ์˜ค๋ฉด ๊ณ ์น˜์ง€ ๋ง๊ณ  ์ž ์‹œ ๋’ค ๊ฐ™์€ ๊ฒฐ๊ณผ๋ฅผ ๋‹ค์‹œ ๋‚ด๊ณ  ๊ณ„์† ์‹คํŒจํ•˜๋ฉด status: \"failed\"๋กœ ๋‚ธ๋‹ค")
324
383
 
325
384
  // ๊ฐ™์€ ๋ฉ”์‹œ์ง€์—์„œ ๋™์‹œ ํ˜ธ์ถœ โ€” Agent 2
326
- Agent(task: "task-1 ์‹คํ–‰: {task-1 title}\n์ปจํ…์ŠคํŠธ: {taskContext}\n์™„๋ฃŒ ํ›„ execute_task๋กœ ๊ฒฐ๊ณผ ์ œ์ถœ")
385
+ Agent(task: "task-1 ์‹คํ–‰: {task-1 title}\n์ปจํ…์ŠคํŠธ: {taskContext}\n์™„๋ฃŒ ํ›„ execute_task๋กœ ๊ฒฐ๊ณผ ์ œ์ถœ. ๋ฐ”๊พผ ํŒŒ์ผ์€ ์ „๋ถ€ artifacts์— ์ ๋Š”๋‹ค. ํŒŒ์ผ์„ ์•ˆ ๋ฐ”๊พธ๋Š” ํƒœ์Šคํฌ๋ฉด noCodeChange: true๋ฅผ ๊ฐ™์ด ๋‚ธ๋‹ค. verification_failed๊ฐ€ ์˜ค๋ฉด ๊ณ ์ณ์„œ ๋‹ค์‹œ ์ œ์ถœํ•˜๊ณ  ๋๋‚ด์ง€ ๋ชปํ–ˆ์œผ๋ฉด status: \"failed\"๋กœ ๋‚ธ๋‹ค. serverError: true๊ฐ€ ํ•จ๊ป˜ ์˜ค๋ฉด ๊ณ ์น˜์ง€ ๋ง๊ณ  ์ž ์‹œ ๋’ค ๊ฐ™์€ ๊ฒฐ๊ณผ๋ฅผ ๋‹ค์‹œ ๋‚ด๊ณ  ๊ณ„์† ์‹คํŒจํ•˜๋ฉด status: \"failed\"๋กœ ๋‚ธ๋‹ค")
327
386
 
328
387
  // ๊ฐ™์€ ๋ฉ”์‹œ์ง€์—์„œ ๋™์‹œ ํ˜ธ์ถœ โ€” Agent 3
329
- Agent(task: "task-2 ์‹คํ–‰: {task-2 title}\n์ปจํ…์ŠคํŠธ: {taskContext}\n์™„๋ฃŒ ํ›„ execute_task๋กœ ๊ฒฐ๊ณผ ์ œ์ถœ")
388
+ Agent(task: "task-2 ์‹คํ–‰: {task-2 title}\n์ปจํ…์ŠคํŠธ: {taskContext}\n์™„๋ฃŒ ํ›„ execute_task๋กœ ๊ฒฐ๊ณผ ์ œ์ถœ. ๋ฐ”๊พผ ํŒŒ์ผ์€ ์ „๋ถ€ artifacts์— ์ ๋Š”๋‹ค. ํŒŒ์ผ์„ ์•ˆ ๋ฐ”๊พธ๋Š” ํƒœ์Šคํฌ๋ฉด noCodeChange: true๋ฅผ ๊ฐ™์ด ๋‚ธ๋‹ค. verification_failed๊ฐ€ ์˜ค๋ฉด ๊ณ ์ณ์„œ ๋‹ค์‹œ ์ œ์ถœํ•˜๊ณ  ๋๋‚ด์ง€ ๋ชปํ–ˆ์œผ๋ฉด status: \"failed\"๋กœ ๋‚ธ๋‹ค. serverError: true๊ฐ€ ํ•จ๊ป˜ ์˜ค๋ฉด ๊ณ ์น˜์ง€ ๋ง๊ณ  ์ž ์‹œ ๋’ค ๊ฐ™์€ ๊ฒฐ๊ณผ๋ฅผ ๋‹ค์‹œ ๋‚ด๊ณ  ๊ณ„์† ์‹คํŒจํ•˜๋ฉด status: \"failed\"๋กœ ๋‚ธ๋‹ค")
330
389
  ```
331
390
 
332
391
  **๊ฐ Agent์˜ execute_task ์ œ์ถœ:**
@@ -345,6 +404,7 @@ Agent(task: "task-2 ์‹คํ–‰: {task-2 title}\n์ปจํ…์ŠคํŠธ: {taskContext}\n์™„๋ฃŒ
345
404
  ```
346
405
 
347
406
  ์‹คํŒจ ์‹œ:
407
+
348
408
  ```json
349
409
  {
350
410
  "action": "execute_task",
@@ -379,10 +439,54 @@ role_match/role_consensus๋กœ ์–ป์€ `roleGuidance`๋ฅผ ์ฐธ์กฐํ•ด ํƒœ์Šคํฌ๋ฅผ ์ˆ˜
379
439
  }
380
440
  }
381
441
  ```
382
- โ†’ `{ status, nextTaskId?, allTasksCompleted, driftResult? }`
442
+
443
+ โ†’ `{ status, nextTaskId?, allTasksCompleted, artifactCheck?, driftResult? }`
383
444
 
384
445
  `driftResult`๊ฐ€ ๋ฐ˜ํ™˜๋˜๋ฉด Spec๊ณผ์˜ drift ๊ฒฝ๊ณ  โ€” ๊ณ„์† ์ง„ํ–‰ํ•˜๋˜ ๋‹ค์Œ ํƒœ์Šคํฌ์—์„œ ๋ฐฉํ–ฅ ๋ณด์ •.
385
446
 
447
+ **artifacts ๋Œ€์กฐ.** `status: "completed"`๋กœ ๋ณด๊ณ ํ•˜๋ฉด ์„œ๋ฒ„๊ฐ€ `artifacts`์˜ ํŒŒ์ผ์ด ์‹คํ–‰ ์‹œ์ž‘ ๋’ค๋กœ ์‹ค์ œ๋กœ ๋ฐ”๋€Œ์—ˆ๋Š”์ง€ ํ™•์ธํ•œ๋‹ค. ์ˆ˜์ •ํ•˜๊ฑฐ๋‚˜ ์ƒˆ๋กœ ๋งŒ๋“ค๊ฑฐ๋‚˜ ์ปค๋ฐ‹ํ•˜๊ฑฐ๋‚˜ ์ง€์šด ํŒŒ์ผ์€ ๋ชจ๋‘ ๋ฐ”๋€ ๊ฒƒ์œผ๋กœ ์นœ๋‹ค. ์ƒ๋Œ€ ๊ฒฝ๋กœ๋Š” `execute_start`์˜ `cwd` ๊ธฐ์ค€์ด๋‹ค. ๋””๋ ‰ํ† ๋ฆฌ๋‚˜ gitignore์— ๊ฑธ๋ฆฐ ๊ฒฝ๋กœ๋Š” ํ™•์ธํ•  ์ˆ˜ ์—†์œผ๋‹ˆ ๋ฐ”๊พผ ์†Œ์Šค ํŒŒ์ผ์„ ํ•˜๋‚˜์”ฉ ์ ๋Š”๋‹ค. `failed`์™€ `skipped`๋Š” ๋Œ€์กฐํ•˜์ง€ ์•Š๋Š”๋‹ค. ๋Œ€์กฐ๋Š” `execute_task`์—๋งŒ ์žˆ๊ณ  `evolve_re_execute`์™€ `evolve_fix`๋กœ ๋‚ธ ๊ฒฐ๊ณผ๋Š” ๋Œ€์กฐํ•˜์ง€ ์•Š๋Š”๋‹ค.
448
+
449
+ `artifacts`๊ฐ€ ๋นˆ `completed`๋Š” ๊ฑฐ์ ˆ๋œ๋‹ค. ์กฐ์‚ฌ๋‚˜ ํŒ๋‹จ์ฒ˜๋Ÿผ ์›๋ž˜ ํŒŒ์ผ์„ ์•ˆ ๋ฐ”๊พธ๋Š” ํƒœ์Šคํฌ๋Š” `noCodeChange: true`๋ฅผ ๊ฐ™์ด ๋‚ธ๋‹ค. `artifacts`๊ฐ€ ํ•˜๋‚˜๋ผ๋„ ์žˆ์œผ๋ฉด `noCodeChange`์™€ ์ƒ๊ด€์—†์ด ๋Œ€์กฐํ•œ๋‹ค.
450
+
451
+ ```json
452
+ {
453
+ "action": "execute_task",
454
+ "sessionId": "...",
455
+ "taskResult": {
456
+ "taskId": "task-1",
457
+ "status": "completed",
458
+ "output": "๊ธฐ์กด ์ธ์ฆ ํ๋ฆ„ ์กฐ์‚ฌ ๊ฒฐ๊ณผ ์š”์•ฝ",
459
+ "artifacts": [],
460
+ "noCodeChange": true
461
+ }
462
+ }
463
+ ```
464
+
465
+ ํ†ต๊ณผํ•˜๋ฉด ์‘๋‹ต์— `artifactCheck`๊ฐ€ ๋ถ™๋Š”๋‹ค.
466
+
467
+ - `verified`: ๋Œ€์กฐ๋ฅผ ํ†ต๊ณผํ•œ ๊ฒฝ์šฐ
468
+ - `no_code_change`: `noCodeChange: true`๋กœ ๋Œ€์กฐ๋ฅผ ๊ฑด๋„ˆ๋›ด ๊ฒฝ์šฐ
469
+ - `no_baseline`: git ๋ ˆํฌ๊ฐ€ ์•„๋‹ˆ๋ผ ์‹œ์ž‘ ์‹œ์  ์ƒํƒœ๊ฐ€ ์—†๋Š” ๊ฒฝ์šฐ
470
+ - `baseline_failed`: `execute_start` ๋•Œ git ํ˜ธ์ถœ์ด ์‹คํŒจํ•ด ์‹œ์ž‘ ์‹œ์  ์ƒํƒœ๋ฅผ ๋ชป ์žก์€ ๊ฒฝ์šฐ
471
+ - `baseline_truncated`: ์‹œ์ž‘ ์‹œ์ ์— ์ปค๋ฐ‹ ์•ˆ ๋œ ํŒŒ์ผ์ด 2000๊ฐœ๋ฅผ ๋„˜์–ด ์ด๋ฒคํŠธ์— ํ•ด์‹œ๋ฅผ ๋‹ค ๋ชป ๋‚จ๊ฒผ๊ณ  ์ด ์„ธ์…˜์„ ๋‹ค๋ฅธ ์„œ๋ฒ„ ํ”„๋กœ์„ธ์Šค๊ฐ€ ์ด๋ฒคํŠธ์—์„œ ๋ถˆ๋Ÿฌ์™€ ๋Œ€์กฐํ•˜์ง€ ๋ชปํ•œ ๊ฒฝ์šฐ. ํ•ด์‹œ๋Š” ์‹คํ–‰์„ ์‹œ์ž‘ํ•œ ํ”„๋กœ์„ธ์Šค ๋ฉ”๋ชจ๋ฆฌ์—๋งŒ ์žˆ๊ณ  ์ด๋ฒคํŠธ์—๋Š” ์‚ฌ์œ ๋งŒ ๋‚จ๋Š”๋‹ค. ๊ทธ๋ž˜์„œ ์„œ๋ฒ„๊ฐ€ ์žฌ์‹œ์ž‘๋๊ฑฐ๋‚˜ MCP ์„œ๋ฒ„๋ฅผ ๋”ฐ๋กœ ๋„์šฐ๋Š” dispatch ์›Œ์ปค๊ฐ€ ๋ณด๊ณ ํ•˜๋ฉด ๋Œ€์กฐ ์—†์ด ํ†ต๊ณผํ•œ๋‹ค. ์‹œ์ž‘ํ•œ ํ”„๋กœ์„ธ์Šค๋Š” ์ƒํƒœ๋ฅผ ์žก์•˜์œผ๋ฏ€๋กœ `execute_start` ์‘๋‹ต์˜ `artifactCheck.baseline`์€ ์ด๋•Œ๋„ `captured`๋กœ ๋‚˜๊ฐ„๋‹ค. dispatch๋ฅผ ์“ธ ๋• ์‹œ์ž‘ ์ „์— ์ปค๋ฐ‹ ์•ˆ ๋œ ํŒŒ์ผ์„ ์ค„์—ฌ ๋‘”๋‹ค
472
+
473
+ **`verification_failed`๋ฅผ ๋ฐ›์œผ๋ฉด.** ๋ฐ”๋€Œ์ง€ ์•Š์€ ํŒŒ์ผ์ด ํ•˜๋‚˜๋ผ๋„ ์žˆ์œผ๋ฉด ์„œ๋ฒ„๋Š” ๊ฒฐ๊ณผ๋ฅผ ๊ธฐ๋กํ•˜์ง€ ์•Š๊ณ  ์ด๋ ‡๊ฒŒ ๋Œ๋ ค์ค€๋‹ค.
474
+
475
+ ```json
476
+ {
477
+ "status": "verification_failed",
478
+ "recorded": false,
479
+ "problems": [{ "path": "src/auth.ts", "status": "unchanged", "hint": "์‹คํ–‰ ์‹œ์ž‘ ๋’ค๋กœ ๋‚ด์šฉ์ด ๊ทธ๋Œ€๋กœ์ž…๋‹ˆ๋‹ค" }],
480
+ "nextAction": "execute_task"
481
+ }
482
+ ```
483
+
484
+ `problems[].status`๋Š” `unchanged`, `missing`, `outside_repo`, `ignored`, `directory`, `invalid_path`(๊ฒฝ๋กœ์— ๊ฐœํ–‰์ด๋‚˜ NUL ๋ฌธ์ž), `not_regular_file`(FIFO๋‚˜ ์†Œ์ผ“์ฒ˜๋Ÿผ ์ผ๋ฐ˜ ํŒŒ์ผ์ด ์•„๋‹˜) ์ค‘ ํ•˜๋‚˜๋‹ค. ํƒœ์Šคํฌ๋Š” ์•„์ง ๋๋‚˜์ง€ ์•Š์€ ์ƒํƒœ๋กœ ๋‚จ๋Š”๋‹ค. ํŒŒ์ผ์„ ์‹ค์ œ๋กœ ๊ณ ์ณค๋Š”์ง€ ํ™•์ธํ•˜๊ณ  ์ˆ˜์ •์„ ๋งˆ์น˜๊ฑฐ๋‚˜ `artifacts` ๋ชฉ๋ก์„ ๋ฐ”๋กœ์žก์•„ ๊ฐ™์€ ํƒœ์Šคํฌ๋ฅผ ๋‹ค์‹œ ์ œ์ถœํ•œ๋‹ค. ๋๋‚ด์ง€ ๋ชปํ–ˆ์œผ๋ฉด `status: "failed"`๋กœ ๋‚ธ๋‹ค.
485
+
486
+ ์‘๋‹ต์— `serverError: true`๊ฐ€ ์žˆ์œผ๋ฉด ๋ณด๊ณ  ๋‚ด์šฉ ๋ฌธ์ œ๊ฐ€ ์•„๋‹ˆ๋ผ ์„œ๋ฒ„ ์ชฝ git ํ˜ธ์ถœ์ด ์‹คํŒจํ•œ ๊ฒƒ์ด๋‹ค. ์ด๋•Œ๋Š” ๊ณ ์น  ๊ฒƒ์ด ์—†์œผ๋‹ˆ ์ž ์‹œ ๋’ค ๊ฐ™์€ ๊ฒฐ๊ณผ๋ฅผ ๊ทธ๋Œ€๋กœ ๋‹ค์‹œ ๋‚ธ๋‹ค. ๊ณ„์† ์‹คํŒจํ•˜๋ฉด `status: "failed"`๋กœ ๋‚ด๊ณ  `output`์— ์˜ค๋ฅ˜ ๋‚ด์šฉ์„ ์ ๋Š”๋‹ค.
487
+
488
+ > ๊ธฐ์ค€์ ์€ ํƒœ์Šคํฌ๋งˆ๋‹ค๊ฐ€ ์•„๋‹ˆ๋ผ `execute_start` ๋•Œ ํ•œ ๋ฒˆ ์žก๋Š”๋‹ค. ์•ž์„  ํƒœ์Šคํฌ๊ฐ€ ๋ฐ”๊พผ ํŒŒ์ผ์„ ๋’ค ํƒœ์Šคํฌ๊ฐ€ `artifacts`์— ์ ์–ด๋„ ํ†ต๊ณผํ•œ๋‹ค.
489
+
386
490
  ---
387
491
 
388
492
  ## Phase 3 โ€” Evaluate
@@ -390,12 +494,19 @@ role_match/role_consensus๋กœ ์–ป์€ `roleGuidance`๋ฅผ ์ฐธ์กฐํ•ด ํƒœ์Šคํฌ๋ฅผ ์ˆ˜
390
494
  ๋ชจ๋“  ํƒœ์Šคํฌ ์™„๋ฃŒ ํ›„ 3-Call ํ‰๊ฐ€ ์ง„ํ–‰.
391
495
 
392
496
  **Call 1 โ€” Structural ๋‹จ๊ณ„ ์‹œ์ž‘**
497
+
393
498
  ```json
394
499
  { "action": "evaluate", "sessionId": "..." }
395
500
  ```
501
+
396
502
  โ†’ `{ stage: "structural", structuralContext }` โ€” lint/build/test ์‹คํ–‰ ์ง€์‹œ
397
503
 
504
+ `structuralContext.commands`์˜ `command` ๋ฌธ์ž์—ด์„ ๊ณ ์น˜์ง€ ๋ง๊ณ  ๊ทธ๋Œ€๋กœ ์‹คํ–‰ํ•œ๋‹ค. ํŒจํ‚ค์ง€ ๋งค๋‹ˆ์ €๋Š” ์„œ๋ฒ„๊ฐ€ package.json์˜ `packageManager` ํ•„๋“œ๋‚˜ lockfile๋กœ ๊ณจ๋ผ๋’€๋‹ค. scripts์— ์—†๋Š” lint, build๋Š” ๋ชฉ๋ก์—์„œ ๋น ์ง€๊ณ  test๋Š” ํ•ญ์ƒ ๋‚จ๋Š”๋‹ค. ์ œ์ถœํ•  ๋•Œ๋„ ๊ฐ™์€ ๋ฌธ์ž์—ด์„ ๊ทธ๋Œ€๋กœ ์‹ฃ๋Š”๋‹ค โ€” ๋ช…๋ น์ด ๋‹ค๋ฅด๊ฑฐ๋‚˜ ๋น ์ง€๋ฉด ์„œ๋ฒ„๊ฐ€ ๊ฑฐ๋ถ€ํ•œ๋‹ค. ์ข…๋ฃŒ ์ฝ”๋“œ๊ฐ€ 0์ด ์•„๋‹Œ ๋ช…๋ น์ด ์žˆ์œผ๋ฉด `allPassed`๋ฅผ `true`๋กœ ๋ณด๋‚ด๋„ ์‹คํŒจ๋กœ ์ฒ˜๋ฆฌ๋œ๋‹ค.
505
+
506
+ ๊ฑฐ๋ถ€ ๋ฉ”์‹œ์ง€๊ฐ€ `Submitted commands do not match`๋กœ ์‹œ์ž‘ํ•˜๋ฉด `structuralContext.commands`์˜ ๋ช…๋ น์„ ๊ทธ๋Œ€๋กœ ๋‹ค์‹œ ์‹คํ–‰ํ•ด์„œ ๊ทธ ์‹คํ–‰์˜ ์ข…๋ฃŒ ์ฝ”๋“œ์™€ ์ถœ๋ ฅ์œผ๋กœ ๋‹ค์‹œ ์ œ์ถœํ•œ๋‹ค. ์ด์ „ ์‹คํ–‰ ๊ฒฐ๊ณผ์— ๋ช…๋ น ๋ฌธ์ž์—ด๋งŒ ๋ฐ”๊ฟ” ์‹ฃ์ง€ ์•Š๋Š”๋‹ค. ๋‹ค๋ฅธ ๊ฑฐ๋ถ€ ๋ฉ”์‹œ์ง€๋ฉด ๋‹ค์‹œ ์ œ์ถœํ•˜์ง€ ๋ง๊ณ  Call 1๋ถ€ํ„ฐ ๋‹ค์‹œ ์‹œ์ž‘ํ•œ๋‹ค.
507
+
398
508
  **Call 2 โ€” Structural ๊ฒฐ๊ณผ ์ œ์ถœ**
509
+
399
510
  ```json
400
511
  {
401
512
  "action": "evaluate",
@@ -410,24 +521,25 @@ role_match/role_consensus๋กœ ์–ป์€ `roleGuidance`๋ฅผ ์ฐธ์กฐํ•ด ํƒœ์Šคํฌ๋ฅผ ์ˆ˜
410
521
  }
411
522
  }
412
523
  ```
413
- โ†’ structural ์‹คํŒจ ์‹œ `{ stage: "structural_failed", evolveContext }` โ†’ Evolve Flow A ์ง„์ž…
414
- โ†’ structural ํ†ต๊ณผ ์‹œ `{ stage: "contextual", evaluationContext }` โ€” AC๋ณ„ LLM ๊ฒ€์ฆ ์ง€์‹œ
524
+
525
+ โ†’ structural ์‹คํŒจ ์‹œ `{ stage: "complete", shortCircuited: true, nextAction: "evolve_fix" }` โ†’ Evolve Flow A ์ง„์ž…
526
+ โ†’ structural ํ†ต๊ณผ ์‹œ `{ stage: "contextual", contextualContext }` โ€” AC๋ณ„ LLM ๊ฒ€์ฆ ์ง€์‹œ
415
527
 
416
528
  **Call 3 โ€” Contextual ๊ฒฐ๊ณผ ์ œ์ถœ**
529
+
417
530
  ```json
418
531
  {
419
532
  "action": "evaluate",
420
533
  "sessionId": "...",
421
534
  "evaluationResult": {
422
- "verifications": [
423
- { "acIndex": 0, "satisfied": true, "evidence": "...", "gaps": [] }
424
- ],
535
+ "verifications": [{ "acIndex": 0, "satisfied": true, "evidence": "...", "gaps": [] }],
425
536
  "overallScore": 0.92,
426
537
  "goalAlignment": 0.88,
427
538
  "recommendations": []
428
539
  }
429
540
  }
430
541
  ```
542
+
431
543
  โ†’ `{ status: "completed" }` (score โ‰ฅ 0.85, goalAlignment โ‰ฅ 0.80)
432
544
  โ†’ ๋ฏธ๋‹ฌ ์‹œ `{ evolveContext }` โ†’ Evolve Flow B ์ง„์ž…
433
545
 
@@ -477,7 +589,7 @@ role_match/role_consensus๋กœ ์–ป์€ `roleGuidance`๋ฅผ ์ฐธ์กฐํ•ด ํƒœ์Šคํฌ๋ฅผ ์ˆ˜
477
589
  {
478
590
  "action": "evolve_re_execute",
479
591
  "sessionId": "...",
480
- "reExecuteTaskResult": { "taskId": "task-3", "status": "completed", "output": "...", "artifacts": [] }
592
+ "reExecuteTaskResult": { "taskId": "task-3", "status": "completed", "output": "...", "artifacts": ["src/auth/oauth.ts"] }
481
593
  }
482
594
 
483
595
  // 4. Re-evaluate
@@ -510,25 +622,64 @@ role_match/role_consensus๋กœ ์–ป์€ `roleGuidance`๋ฅผ ์ฐธ์กฐํ•ด ํƒœ์Šคํฌ๋ฅผ ์ˆ˜
510
622
  { "action": "evolve_lateral", "sessionId": "..." }
511
623
  ```
512
624
 
513
- | Stagnation ํŒจํ„ด | Persona | ์ „๋žต |
625
+ | Stagnation ํŒจํ„ด | Persona | ์ „๋žต |
626
+ | ------------------- | -------------- | ---------------- |
627
+ | hard_cap | Multistability | ๋‹ค๋ฅธ ๊ฐ๋„๋กœ ๋ณด๊ธฐ |
628
+ | oscillation | Simplicity | ๋‹จ์ˆœํ•˜๊ฒŒ ์ค„์ด๊ธฐ |
629
+ | no_drift | Reification | ๋น ์ง„ ์กฐ๊ฐ ์ฑ„์šฐ๊ธฐ |
630
+ | diminishing_returns | Invariance | ์„ฑ๊ณต ํŒจํ„ด ๋ณต์ œ |
631
+
632
+ 4๊ฐœ persona๋ฅผ ๋‹ค ์จ๋„ ์ ์ˆ˜๊ฐ€ ์•ˆ ์˜ค๋ฅด๋ฉด ์„ธ์…˜์€ ๋๋‚˜์ง€ ์•Š๊ณ  `awaiting_human`์œผ๋กœ ๋ฉˆ์ถ˜๋‹ค. ์‘๋‹ต์— `gate`๊ฐ€ ์‹ค๋ ค ์˜จ๋‹ค.
633
+
634
+ ```json
635
+ โ†’ { status: "awaiting_human", gate: { gateId, question, options: [...], context }, escalationContext, nextAction: "gate_resolve", nextActionParams: { sessionId, gateResolution: { gateId } } }
636
+ ```
637
+
638
+ ### Flow D โ€” ์‚ฌ๋žŒ ํŒ๋‹จ ๋Œ€๊ธฐ (`awaiting_human`)
639
+
640
+ ์—ฌ๊ธฐ์„œ ์Šคํ‚ฌ์€ ์Šค์Šค๋กœ ๊ณ ๋ฅด์ง€ ์•Š๋Š”๋‹ค. **๋ฐ˜๋“œ์‹œ ์‚ฌ๋žŒ์—๊ฒŒ ๋ฌป๊ณ  ๋‹ต์„ ๊ธฐ๋‹ค๋ฆฐ๋‹ค.**
641
+
642
+ 1. `gate.question`๊ณผ `gate.context`(๋ง‰ํžŒ ํƒœ์Šคํฌ, ์‹œ๋„ํ•œ persona, ์ตœ๊ณ  ์ ์ˆ˜, ๋‚จ์€ ๋ฌธ์ œ)๋ฅผ ๋ณด์—ฌ์ค€๋‹ค.
643
+ 2. `gate.options`๋ฅผ ์„ ํƒ์ง€๋กœ ๋„์šด๋‹ค. ํ˜ธ์ŠคํŠธ์— ์„ ํƒํ˜• ์งˆ๋ฌธ ๋„๊ตฌ๊ฐ€ ์žˆ์œผ๋ฉด(AskUserQuestion ๋“ฑ) ๊ทธ๊ฑธ ์“ด๋‹ค. ์—†์œผ๋ฉด ๋ฒˆํ˜ธ ๋ชฉ๋ก์œผ๋กœ ๋ณด์—ฌ์ฃผ๊ณ  ๋‹ต์„ ๋ฐ›๋Š”๋‹ค. `restart`์™€ `abort`๋Š” ์„ธ์…˜์ด ์ข…๋ฃŒ๋œ๋‹ค๋Š” ์ ์„ ํ•จ๊ป˜ ์•Œ๋ฆฐ๋‹ค.
644
+ 3. ๊ณ ๋ฅธ ์„ ํƒ์ง€์— ๋”ํ•ด **๊ฒฐ์ •(`decision`)๊ณผ ์ด์œ (`rationale`)๋ฅผ ํ•œ ์ค„์”ฉ** ๋ฐ›๋Š”๋‹ค. ๋‘˜ ๋‹ค ๋น„๋ฉด ์„œ๋ฒ„๊ฐ€ ๊ฑฐ์ ˆํ•œ๋‹ค. ์‚ฌ๋žŒ์ด ์ด์œ ๋ฅผ ์•ˆ ์ ์—ˆ์œผ๋ฉด ๋‹ค์‹œ ๋ฌป๋Š”๋‹ค. ๋Œ€์‹  ์ง€์–ด๋‚ด์ง€ ์•Š๋Š”๋‹ค โ€” ์ด ๋‘ ์ค„์ด ๊ทธ๋Œ€๋กœ Memory์— ๋‚จ๋Š”๋‹ค.
645
+ 4. `gate_resolve`๋ฅผ ๋ถ€๋ฅธ๋‹ค.
646
+
647
+ ```json
648
+ {
649
+ "action": "gate_resolve",
650
+ "sessionId": "...",
651
+ "gateResolution": {
652
+ "gateId": "gate-...",
653
+ "optionId": "patch_spec",
654
+ "decision": "์‚ฌ๋žŒ์ด ๋‚ด๋ฆฐ ๊ฒฐ์ •",
655
+ "rationale": "๊ทธ๋ ‡๊ฒŒ ์ •ํ•œ ์ด์œ "
656
+ }
657
+ }
658
+ ```
659
+
660
+ 5. ์‘๋‹ต์˜ `nextAction`์„ ๋”ฐ๋ฅธ๋‹ค.
661
+
662
+ | `optionId` | ์‘๋‹ต | ๋‹ค์Œ |
514
663
  |---|---|---|
515
- | hard_cap | Multistability | ๋‹ค๋ฅธ ๊ฐ๋„๋กœ ๋ณด๊ธฐ |
516
- | oscillation | Simplicity | ๋‹จ์ˆœํ•˜๊ฒŒ ์ค„์ด๊ธฐ |
517
- | no_drift | Reification | ๋น ์ง„ ์กฐ๊ฐ ์ฑ„์šฐ๊ธฐ |
518
- | diminishing_returns | Invariance | ์„ฑ๊ณต ํŒจํ„ด ๋ณต์ œ |
664
+ | `patch_spec` | `gate_resolved`, ์„ธ์…˜ `executing` | ์‚ฌ๋žŒ์ด ๋งํ•œ ๋Œ€๋กœ AC๋‚˜ ์ œ์•ฝ์„ ๊ณ ์ณ `evolve_patch` (Flow B) |
665
+ | `manual_task` | `gate_resolved`, ์„ธ์…˜ `executing` | ์‚ฌ๋žŒ์ด ํƒœ์Šคํฌ๋ฅผ ์ฒ˜๋ฆฌํ–ˆ๋Š”์ง€ ํ™•์ธํ•œ ๋’ค `evaluate` |
666
+ | `restart` | `terminated` | ์„ธ์…˜ ์ข…๋ฃŒ. ํƒœ์Šคํฌ๋ฅผ ๋” ์ž˜๊ฒŒ ์ชผ๊ฐ  ์ƒˆ ์ŠคํŽ™์œผ๋กœ `start`๋ฅผ ์•ˆ๋‚ด |
667
+ | `abort` | `terminated` | ์„ธ์…˜ ์ข…๋ฃŒ. ๋ง‰ํžŒ ์ง€์ ๊ณผ ์‹œ๋„ํ•œ ์ ‘๊ทผ์„ ๋ณด๊ณ  |
668
+
669
+ ์ด์–ด๊ฐ„ ๋’ค ๋‹ค์Œ ํ‰๊ฐ€๊ฐ€ ํ•œ ๋ฒˆ๋งŒ ์„ฑ๊ณต ๊ธฐ์ค€์— ๋ชป ๋ฏธ์ณ๋„ persona๋ฅผ ๋˜ํ’€์ดํ•˜์ง€ ์•Š๊ณ  ๊ณง๋ฐ”๋กœ ์ƒˆ `awaiting_human` ์‘๋‹ต์ด ์˜จ๋‹ค. ์ง„ํ™” ์ด๋ ฅ๊ณผ ์ด๋ฏธ ์จ๋ณธ persona ๊ธฐ๋ก์ด ๋‚จ์•„ ์žˆ์–ด์„œ๋‹ค. ๊ทธ๋•Œ๋„ 1๋ฒˆ๋ถ€ํ„ฐ ๋‹ค์‹œ ํ•œ๋‹ค.
519
670
 
520
- 4๊ฐœ persona ์†Œ์ง„ โ†’ `human_escalation` ๋ฐ˜ํ™˜์œผ๋กœ ์„ธ์…˜ ์ข…๋ฃŒ.
671
+ `awaiting_human`์ธ ๋™์•ˆ์—๋Š” `status`, `resume`, `gate_resolve`, `evolution_viz` ๋ง๊ณ ๋Š” ์ „๋ถ€ ์—๋Ÿฌ๋กœ ๊ฑฐ์ ˆ๋œ๋‹ค. ์„ธ์…˜์„ ์ด์–ด๋ฐ›์•˜๋Š”๋ฐ `resume`์ด `awaiting_human`์„ ๋Œ๋ ค์ฃผ๋ฉด 1๋ฒˆ๋ถ€ํ„ฐ ๋‹ค์‹œ ํ•œ๋‹ค.
521
672
 
522
673
  ### ์ข…๋ฃŒ ์กฐ๊ฑด
523
674
 
524
- | ์กฐ๊ฑด | ํŠธ๋ฆฌ๊ฑฐ |
525
- |------|--------|
526
- | `success` | score โ‰ฅ 0.85 AND goalAlignment โ‰ฅ 0.80 |
527
- | `stagnation` | 2ํšŒ ์—ฐ์† delta < 0.05 |
528
- | `oscillation` | 2ํšŒ ์—ฐ์† ์ ์ˆ˜ ์—ญ์ „ |
529
- | `hard_cap` | structural 3ํšŒ + contextual 3ํšŒ ์‹คํŒจ |
530
- | `caller` | `{ action: "evolve", terminateReason: "caller" }` |
531
- | `human_escalation` | 4๊ฐœ lateral persona ์†Œ์ง„ |
675
+ | ์กฐ๊ฑด | ํŠธ๋ฆฌ๊ฑฐ |
676
+ | ------------------ | ------------------------------------------------------------- |
677
+ | `success` | score โ‰ฅ 0.85 AND goalAlignment โ‰ฅ 0.80 |
678
+ | `stagnation` | 2ํšŒ ์—ฐ์† delta < 0.05 |
679
+ | `oscillation` | 2ํšŒ ์—ฐ์† ์ ์ˆ˜ ์—ญ์ „ |
680
+ | `hard_cap` | structural 3ํšŒ + contextual 3ํšŒ ์‹คํŒจ |
681
+ | `caller` | `{ action: "evolve", terminateReason: "caller" }` |
682
+ | `human_escalation` | 4๊ฐœ lateral persona ์†Œ์ง„ ํ›„ ์‚ฌ๋žŒ์ด `restart`๋‚˜ `abort`๋ฅผ ๊ณ ๋ฆ„ |
532
683
 
533
684
  ---
534
685
 
@@ -551,7 +702,13 @@ activeForm: "์‹คํ–‰ ๊ณ„ํš ์ˆ˜๋ฆฝ ์ค‘"
551
702
  `TaskUpdate`๋กœ ํ˜„์žฌ Planning ๋‹จ๊ณ„๋ฅผ ์—…๋ฐ์ดํŠธํ•œ๋‹ค.
552
703
 
553
704
  ```
554
- description: "Planning ์ค‘ | ๋‹จ๊ณ„ {stepsCompleted}/4 | {currentPrinciple}"
705
+ description: "Planning ์ค‘ | ๋‹จ๊ณ„ {stepsCompleted}/4 | {executeContext.currentStage}"
706
+ ```
707
+
708
+ `plan_rewound`๋ฅผ ๋ฐ›์œผ๋ฉด `stepsCompleted`๊ฐ€ ์—†์œผ๋ฏ€๋กœ ์ด๋ ‡๊ฒŒ ๋ฐ”๊พผ๋‹ค.
709
+
710
+ ```
711
+ description: "Planning ๋˜๊ฐ๊น€ | ๋‹จ๊ณ„ {rewoundToStep - 1}/4 | {executeContext.currentStage}"
555
712
  ```
556
713
 
557
714
  ### Execution ์‹œ์ž‘ ํ›„ (`execute_start` ์‘๋‹ต ์ˆ˜์‹  ํ›„)
@@ -584,12 +741,14 @@ activeForm: "๋ณ‘๋ ฌ ์‹คํ–‰ ์ค‘: ๊ทธ๋ฃน {groupIndex}/{totalGroups} โ€” {agentCoun
584
741
  `TaskUpdate`๋กœ ์ง„ํ–‰ ์ƒํ™ฉ๊ณผ ํ˜„์žฌ ์‹คํ–‰ ํƒœ์Šคํฌ๋ช…์„ ์—…๋ฐ์ดํŠธํ•œ๋‹ค.
585
742
 
586
743
  ์ˆœ์ฐจ ์‹คํ–‰ ์ค‘:
744
+
587
745
  ```
588
746
  description: "{completedCount}/{totalTasks} ์™„๋ฃŒ | ์‹คํŒจ: {failedCount}๊ฐœ | ๊ทธ๋ฃน {groupIndex}/{totalGroups}"
589
747
  activeForm: "์‹คํ–‰ ์ค‘: {taskContext.currentTask.title}"
590
748
  ```
591
749
 
592
750
  ๋ณ‘๋ ฌ ๊ทธ๋ฃน ์‹คํ–‰ ์ค‘ (๊ฐ Agent์˜ execute_task ์™„๋ฃŒ ์‹œ):
751
+
593
752
  ```
594
753
  description: "{completedCount}/{totalTasks} ์™„๋ฃŒ | ์‹คํŒจ: {failedCount}๊ฐœ | ๊ทธ๋ฃน {groupIndex}/{totalGroups}"
595
754
  activeForm: "๋ณ‘๋ ฌ ์‹คํ–‰ ์ค‘: ๊ทธ๋ฃน {groupIndex}/{totalGroups} โ€” {agentCount}๊ฐœ Agent ์‹คํ–‰ ์ค‘"
@@ -609,6 +768,14 @@ activeForm: "๋ณ‘๋ ฌ ์‹คํ–‰ ์ค‘: ๊ทธ๋ฃน {groupIndex}/{totalGroups} โ€” {agentCoun
609
768
  - ํ‰๊ฐ€ ์™„๋ฃŒ(success): `TaskUpdate({ status: "completed", description: "์™„๋ฃŒ | score: {overallScore} | alignment: {goalAlignment}" })`
610
769
  - Evolve ์ง„์ž…: description์— "๊ฐœ์„  ์ค‘ (generation {N})" ์ถ”๊ฐ€
611
770
 
771
+ ### ์‚ฌ๋žŒ ํŒ๋‹จ ๋Œ€๊ธฐ ์‹œ (`awaiting_human`)
772
+
773
+ ```
774
+ description: "์‚ฌ๋žŒ ํŒ๋‹จ ๋Œ€๊ธฐ | ์ตœ๊ณ  ์ ์ˆ˜: {gate.context.bestScore}"
775
+ ```
776
+
777
+ `gate_resolve`๊ฐ€ `gate_resolved`๋ฅผ ๋Œ๋ ค์ฃผ๋ฉด ์ง„ํ™” ๋‹จ๊ณ„ ํ‘œ์‹œ๋กœ ๋Œ์•„๊ฐ„๋‹ค.
778
+
612
779
  ### ์˜ค๋ฅ˜/์—์Šค์ปฌ๋ ˆ์ด์…˜ ์‹œ
613
780
 
614
781
  ```
@@ -128,7 +128,15 @@ The interview only has value if the human's actual intent is captured. A self-an
128
128
  1. **Start**: Create a session, detect project type (greenfield/brownfield), ask the first question
129
129
  2. **Iterate**: Present each generated question to the user โ†’ wait for answer โ†’ submit answer to Gestalt
130
130
  3. **Score**: Continuously assess resolution across multiple dimensions
131
- 4. **Complete**: When resolution score โ‰ฅ 0.8, the interview is ready for spec generation
131
+ 4. **Complete**: Call `complete` only after `resolutionScore.isReady === true` (overall โ‰ฅ 0.8). The server rejects `complete` on a session that has no score or is below threshold
132
+
133
+ ### 0.8 ๋ฏธ๋งŒ์—์„œ ๋๋‚ด๊ธฐ
134
+
135
+ ์‚ฌ์šฉ์ž๊ฐ€ 0.8 ๋ฏธ๋งŒ์—์„œ ๋„˜์–ด๊ฐ€๊ฒ ๋‹ค๊ณ  ์ง์ ‘ ๋‹ตํ•œ ๊ฒฝ์šฐ์—๋งŒ `force: true`๋กœ `complete`๋ฅผ ๋ถ€๋ฅธ๋‹ค. 15๋ผ์šด๋“œ๋ฅผ ๋‹ค ์ฑ„์›Œ `respond`๊ฐ€ ๋” ๋ฐ›์ง€ ์•Š์œผ๋ฉด ๊ทธ ๋งˆ์ง€๋ง‰ ๋‹ต์˜ ์ ์ˆ˜๋Š” ๋ฐ˜์˜๋˜์ง€ ์•Š์€ ์ƒํƒœ๋‹ค. ๋จผ์ € `score`๋กœ ๊ทธ ์ ์ˆ˜๋ฅผ ๋„ฃ๊ณ  `isReady`๋ฅผ ํ™•์ธํ•œ๋‹ค. ๊ทธ๋ž˜๋„ 0.8 ๋ฏธ๋งŒ์ด๋ฉด ์—์ด์ „ํŠธ๊ฐ€ ํ˜„์žฌ ์ ์ˆ˜์™€ ๋œ ์ฑ„์›Œ์ง„ ์ฐจ์›์„ ๋ณด์—ฌ์ฃผ๊ณ  ๋„˜์–ด๊ฐˆ์ง€ ๋ฌป๋Š”๋‹ค. ๋ผ์šด๋“œ ์ˆ˜๋งŒ์œผ๋กœ `force`๋ฅผ ๋„˜๊ธฐ์ง€ ์•Š๋Š”๋‹ค. ์‚ฌ์šฉ์ž๊ฐ€ ๋จผ์ € "๊ทธ๋ƒฅ ๋„˜์–ด๊ฐ€์ž"๊ณ  ํ–ˆ์„ ๋•Œ๋„ ๊ฐ™์€ ๋‚ด์šฉ์„ ๋ณด์—ฌ์ฃผ๊ณ  ํ•œ ๋ฒˆ ๋” ํ™•์ธํ•œ ๋’ค์— ๋ถ€๋ฅธ๋‹ค.
136
+
137
+ ์‚ฌ์šฉ์ž๊ฐ€ ๋„˜์–ด๊ฐ€์ง€ ์•Š๊ฒ ๋‹ค๊ณ  ํ•˜๋ฉด ์„ธ์…˜์„ `in_progress`๋กœ ๋‘”๋‹ค. 15๋ผ์šด๋“œ ์ „์ด๋ฉด ๊ฐ™์€ ์„ธ์…˜์—์„œ ๋œ ์ฑ„์›Œ์ง„ ์ฐจ์›์„ ๋‹ค์‹œ ๋ฌป๋Š”๋‹ค. 15๋ผ์šด๋“œ๋ฅผ ๋‹ค ์ฑ„์› ์œผ๋ฉด ๋œ ์ฑ„์›Œ์ง„ ์ฐจ์›์„ ์‚ฌ์šฉ์ž์™€ ํ•จ๊ป˜ ์ •๋ฆฌํ•ด ์ƒˆ ์ธํ„ฐ๋ทฐ๋กœ ์ด์–ด๊ฐ€๊ฑฐ๋‚˜ ๊ฑฐ๊ธฐ์„œ ๋ฉˆ์ถ˜๋‹ค.
138
+
139
+ ์—์ด์ „ํŠธ๊ฐ€ ์Šค์Šค๋กœ `force`๋ฅผ ํŒ๋‹จํ•˜์ง€ ์•Š๋Š”๋‹ค. ๊ฑฐ์ ˆ ๋ฉ”์‹œ์ง€์— "force=true๋กœ ๋„˜๊ธฐ์„ธ์š”"๊ฐ€ ๋‚˜์™€๋„ ๊ทธ๊ฑด ์‚ฌ์šฉ์ž์—๊ฒŒ ๋ฌผ์–ด๋ณผ ๊ทผ๊ฑฐ์ด์ง€ ๋ฐ”๋กœ ๋„˜๊ธธ ๊ทผ๊ฑฐ๊ฐ€ ์•„๋‹ˆ๋‹ค. ์ด๋ ‡๊ฒŒ ๋๋‚ธ ์„ธ์…˜์—๋Š” `forcedComplete`๊ฐ€ ๊ธฐ๋ก๋œ๋‹ค. Spec์„ ๋ฝ‘์„ ๋•Œ๋„ `ges_generate_spec`์— `force`๋ฅผ ๋”ฐ๋กœ ๋„˜๊ฒจ์•ผ ํ•œ๋‹ค.
132
140
 
133
141
  ## Gestalt Principles Applied
134
142
 
@@ -154,9 +162,12 @@ API ํ‚ค ์—†์ด MCP ์„œ๋ฒ„ ์‹คํ–‰ ์‹œ ์ž๋™ ํ™œ์„ฑํ™”. LLM ์ž‘์—…์„ caller๊ฐ€
154
162
  | `resolutionScore.priorityClarity` | number (0-1) | ํ•„์ˆ˜* | ์šฐ์„ ์ˆœ์œ„ ๋ช…ํ™•๋„ |
155
163
  | `resolutionScore.contextClarity` | number (0-1) | ์„ ํƒ | ์ปจํ…์ŠคํŠธ ๋ช…ํ™•๋„ |
156
164
  | `resolutionScore.contradictions` | string[] | ์„ ํƒ | ๋ฐœ๊ฒฌ๋œ ๋ชจ์ˆœ ๋ชฉ๋ก |
165
+ | `force` | boolean | ์„ ํƒ (๊ธฐ๋ณธ `false`) | `complete` ์ „์šฉ. 0.8 ๋ฏธ๋งŒ์ด์–ด๋„ ์™„๋ฃŒํ•œ๋‹ค. ์‚ฌ์šฉ์ž๊ฐ€ ์ง์ ‘ ์ •ํ–ˆ์„ ๋•Œ๋งŒ ๋„˜๊ธด๋‹ค |
157
166
 
158
167
  \* resolutionScore ๊ฐ์ฒด๋ฅผ ์ œ๊ณตํ•  ๊ฒฝ์šฐ ํ•„์ˆ˜
159
168
 
169
+ ๋‹ต๋ณ€ ๋ผ์šด๋“œ๊ฐ€ 0์ธ ์„ธ์…˜์— ๊ธฐ์ค€์„ ๋„˜๋Š” resolutionScore๋ฅผ ๋„ฃ์œผ๋ฉด `score`์™€ `respond`๊ฐ€ ๊ฑฐ์ ˆํ•œ๋‹ค. ๊ณต๋ฐฑ๋งŒ ๋ณด๋‚ธ ๋‹ต์€ ๋‹ต๋ณ€์œผ๋กœ ์„ธ์ง€ ์•Š๋Š”๋‹ค. ๊ธฐ์ค€ ๋ฏธ๋งŒ ์ ์ˆ˜๋Š” ๋ฐ›๋Š”๋‹ค.
170
+
160
171
  ### Action๋ณ„ ์‘๋‹ต ๊ตฌ์กฐ (Passthrough)
161
172
 
162
173
  **`start`** โ†’ `{ status, sessionId, projectType, detectedFiles, gestaltContext, roundNumber, message }`
@@ -166,7 +177,9 @@ API ํ‚ค ์—†์ด MCP ์„œ๋ฒ„ ์‹คํ–‰ ์‹œ ์ž๋™ ํ™œ์„ฑํ™”. LLM ์ž‘์—…์„ caller๊ฐ€
166
177
  **`score`** (์ ์ˆ˜ ๋ฏธ์ œ๊ณต ์‹œ) โ†’ `{ status, resolutionScore, scoringPrompt, message }`
167
178
  **`score`** (์ ์ˆ˜ ์ œ๊ณต ์‹œ) โ†’ `{ status, resolutionScore }`
168
179
 
169
- **`complete`** โ†’ `{ status, sessionId, totalRounds, finalResolutionScore, message }`
180
+ **`complete`** โ†’ `{ status, sessionId, totalRounds, finalResolutionScore, forced, message }`
181
+
182
+ `forced`๋Š” ๊ธฐ์ค€ ๋ฏธ๋งŒ ์„ธ์…˜์„ `force`๋กœ ๋๋ƒˆ์„ ๋•Œ๋งŒ `true`๋‹ค. ์ด๋ฏธ ์ค€๋น„๋œ ์„ธ์…˜์— `force`๋ฅผ ๋„˜๊ฒจ๋„ `false`๋กœ ๋‚จ๋Š”๋‹ค.
170
183
 
171
184
  ### GestaltContext ํ•„๋“œ
172
185
 
@@ -25,7 +25,7 @@ outputs:
25
25
  > `ges_*` ๋„๊ตฌ๊ฐ€ ์—†๊ฑฐ๋‚˜ ํ˜ธ์ถœ์ด ์‹คํŒจํ•˜๋ฉด ์ง์ ‘ ํ‰๋‚ด๋‚ด ์ง„ํ–‰ํ•˜์ง€ ์•Š๊ณ  ๋ฌด์—‡์ด ์™œ ์•ˆ ๋˜๋Š”์ง€ ๋งํ•˜๊ณ  ๋ฉˆ์ถฅ๋‹ˆ๋‹ค.
26
26
 
27
27
  - **์ธํ„ฐ๋ทฐ**: ์‚ฌ๋žŒ์ด ์ง์ ‘ ๋‹ต๋ณ€ (ํฐ ๊ด€์  ์ •๋ฆฌ ํฌํ•จ, ์ž๋™ํ™”ํ•˜์ง€ ์•Š์Œ)
28
- - **์ŠคํŽ™ ์ƒ์„ฑ ์ดํ›„**: AI๊ฐ€ ์ž์œจ๋กœ ๋“œ๋ผ์ด๋น™ โ€” ์‚ฌ๋žŒ ๊ฐœ์ž… ์—†์ด ๋ฃจํ”„๋ฅผ ๋Œ๋ฆฐ๋‹ค
28
+ - **์ŠคํŽ™ ์ƒ์„ฑ ์ดํ›„**: AI๊ฐ€ ์ž์œจ๋กœ ๋“œ๋ผ์ด๋น™ โ€” ์‚ฌ๋žŒ ๊ฐœ์ž… ์—†์ด ๋ฃจํ”„๋ฅผ ๋Œ๋ฆฐ๋‹ค. lateral persona๋ฅผ ๋‹ค ์จ์„œ `awaiting_human`์œผ๋กœ ๋ฉˆ์ท„์„ ๋•Œ๋งŒ ์‚ฌ๋žŒ์—๊ฒŒ ๋ฌป๋Š”๋‹ค
29
29
 
30
30
  ---
31
31
 
@@ -84,12 +84,14 @@ Phase 3์˜ ๋ ˆํฌ ์•ˆ ํƒ์ƒ‰๊นŒ์ง€ ์•ž๋‹น๊ธฐ์ง€๋Š” ์•Š๋Š”๋‹ค. ๊ทธ๊ฑด ์‹คํ–‰ ๋Œ€
84
84
 
85
85
  โ†’ resolutionScore.isReady === true ๋˜๋Š” overallScore โ‰ฅ 0.8์ด ๋  ๋•Œ๊นŒ์ง€ ๋ฐ˜๋ณตํ•œ๋‹ค.
86
86
 
87
- ์™„๋ฃŒ:
87
+ ์™„๋ฃŒ (`isReady === true`์ผ ๋•Œ๋งŒ):
88
88
 
89
89
  ```json
90
90
  { "action": "complete", "sessionId": "..." }
91
91
  ```
92
92
 
93
+ 0.8 ๋ฏธ๋งŒ์ด๋ฉด ์„œ๋ฒ„๊ฐ€ `complete`๋ฅผ ๊ฑฐ์ ˆํ•œ๋‹ค. ์ž์œจ ๋ฃจํ”„๋ผ๋„ `force`๋Š” ์—์ด์ „ํŠธ๊ฐ€ ์ •ํ•˜์ง€ ์•Š๋Š”๋‹ค. 15๋ผ์šด๋“œ๋ฅผ ๋‹ค ์ฑ„์šด ๊ฒฝ์šฐ์—๋Š” ๋งˆ์ง€๋ง‰ ๋‹ต์˜ ์ ์ˆ˜๊ฐ€ ๋น ์ ธ ์žˆ์œผ๋‹ˆ ๋จผ์ € `score`๋กœ ๋„ฃ๊ณ  `isReady`๋ฅผ ํ™•์ธํ•œ๋‹ค. ๊ทธ๋ž˜๋„ 0.8 ๋ฏธ๋งŒ์ด๋ฉด ์‚ฌ์šฉ์ž์—๊ฒŒ ํ˜„์žฌ ์ ์ˆ˜๋ฅผ ๋ณด์—ฌ์ฃผ๊ณ  ๋„˜์–ด๊ฐ€๊ธฐ๋กœ ์ง์ ‘ ๋‹ตํ–ˆ์„ ๋•Œ๋งŒ `{ "action": "complete", "sessionId": "...", "force": true }`๋กœ ๋ถ€๋ฅธ๋‹ค. ์ด๋ ‡๊ฒŒ ๋๋‚ธ ์„ธ์…˜์€ `complete` ์‘๋‹ต์— `forced: true`๊ฐ€ ์˜จ๋‹ค. ๊ทธ ๊ฐ’์„ ๊ทผ๊ฑฐ๋กœ Phase 2์—์„œ `ges_generate_spec`์—๋„ `force: true`๋ฅผ ๋„˜๊ธด๋‹ค.
94
+
93
95
  ### ์ง„ํ–‰ ํŒจ๋„
94
96
 
95
97
  ์„ธ Phase๋ฅผ ๋„๋Š” ๋™์•ˆ ์‚ฌ์šฉ์ž๊ฐ€ ์–ด๋””๊นŒ์ง€ ์™”๋Š”์ง€ ๋ณผ ์ž๋ฆฌ๋ฅผ ๋งŒ๋“ ๋‹ค. ํŒจ๋„์€ best-effort๋‹ค โ€” ํŒจ๋„์„ ๋ชป ๋งŒ๋“ค๊ฑฐ๋‚˜ ๋ชป ๊ณ ์ณ๋„ ์ธํ„ฐ๋ทฐ์™€ ์ŠคํŽ™๊ณผ ์‹คํ–‰์€ ๊ทธ๋Œ€๋กœ ๊ฐ„๋‹ค.
@@ -143,7 +145,7 @@ description: "Phase 2/3 โ€” ์ŠคํŽ™ ์™„๋ฃŒ | AC {N}๊ฐœ"
143
145
 
144
146
  ## Phase 3 โ€” Execute ๋ฃจํ”„ (์ž์œจ)
145
147
 
146
- ์ŠคํŽ™์„ ๋ฐ›์•„ ์‹คํ–‰ โ†’ ํ‰๊ฐ€ โ†’ ๊ฐœ์„  ๋ฃจํ”„๋ฅผ ์ž์œจ๋กœ ๋“œ๋ผ์ด๋น™ํ•œ๋‹ค. **์‚ฌ๋žŒ ๊ฐœ์ž… ์—†์ด ๋ฃจํ”„๋ฅผ ๋ˆ๋‹ค.**
148
+ ์ŠคํŽ™์„ ๋ฐ›์•„ ์‹คํ–‰ โ†’ ํ‰๊ฐ€ โ†’ ๊ฐœ์„  ๋ฃจํ”„๋ฅผ ์ž์œจ๋กœ ๋“œ๋ผ์ด๋น™ํ•œ๋‹ค. **์‚ฌ๋žŒ ๊ฐœ์ž… ์—†์ด ๋ฃจํ”„๋ฅผ ๋ˆ๋‹ค.** ์˜ˆ์™ธ๋Š” lateral persona๋ฅผ ๋‹ค ์จ์„œ ์„ธ์…˜์ด ์‚ฌ๋žŒ ํŒ๋‹จ์„ ๊ธฐ๋‹ค๋ฆด ๋•Œ ํ•˜๋‚˜๋‹ค (โ†’ [์‚ฌ๋žŒ ํŒ๋‹จ ๋Œ€๊ธฐ](#์‚ฌ๋žŒ-ํŒ๋‹จ-๋Œ€๊ธฐ-awaiting_human)).
147
149
 
148
150
  execute ์Šคํ‚ฌ์˜ ์ „์ฒด ํŒŒ์ดํ”„๋ผ์ธ(Planning โ†’ Execution โ†’ Evaluate โ†’ Evolve)์„ ๊ทธ๋Œ€๋กœ ๋”ฐ๋ฅธ๋‹ค. ๋‹จ, ๊ฐ ๋‹จ๊ณ„ ์‚ฌ์ด์—์„œ ์‚ฌ๋žŒ์—๊ฒŒ ํ™•์ธ์„ ๊ตฌํ•˜์ง€ ์•Š๋Š”๋‹ค.
149
151
 
@@ -168,9 +170,21 @@ activeForm: "{ํ˜„์žฌ ๋‹จ๊ณ„: ์‹คํ–‰ ์ค‘ / ํ‰๊ฐ€ ์ค‘ / ๊ฐœ์„  ์ค‘}"
168
170
  | ์กฐ๊ฑด | ๋Œ€์‘ |
169
171
  |------|------|
170
172
  | `success` (score โ‰ฅ 0.85, goalAlignment โ‰ฅ 0.80) | ๋ฃจํ”„ ์ข…๋ฃŒ โ†’ ์™„๋ฃŒ ๋ณด๊ณ  |
171
- | `human_escalation` (lateral 4๊ฐœ ์†Œ์ง„) | ๋ฃจํ”„ ์ข…๋ฃŒ โ†’ ๋ง‰ํžŒ ์ง€์ ๊ณผ ์‹œ๋„ํ•œ ์ ‘๊ทผ๋ฒ• ๋ณด๊ณ  |
173
+ | `awaiting_human` (lateral 4๊ฐœ ์†Œ์ง„) | ๋ฃจํ”„๋ฅผ ๋ฉˆ์ถ”๊ณ  ์‚ฌ๋žŒ์—๊ฒŒ ๋ฌป๋Š”๋‹ค โ†’ `gate_resolve` โ†’ `nextAction`๋Œ€๋กœ ์ด์–ด๊ฐ„๋‹ค (์•„๋ž˜ ์ฐธ๊ณ ) |
174
+ | `human_escalation` (์‚ฌ๋žŒ์ด `restart`๋‚˜ `abort`๋ฅผ ๊ณ ๋ฆ„) | ๋ฃจํ”„ ์ข…๋ฃŒ โ†’ ๋ง‰ํžŒ ์ง€์ ๊ณผ ์‹œ๋„ํ•œ ์ ‘๊ทผ๋ฒ• ๋ณด๊ณ  |
172
175
  | `caller` (์‚ฌ์šฉ์ž๊ฐ€ ๋ช…์‹œ์ ์œผ๋กœ ์ค‘๋‹จ) | ์ฆ‰์‹œ ์ข…๋ฃŒ |
173
176
 
177
+ ### ์‚ฌ๋žŒ ํŒ๋‹จ ๋Œ€๊ธฐ (`awaiting_human`)
178
+
179
+ lateral persona 4๊ฐœ๋ฅผ ๋‹ค ์จ๋„ ์ ์ˆ˜๊ฐ€ ์•ˆ ์˜ค๋ฅด๋ฉด ์„ธ์…˜์€ ๋๋‚˜์ง€ ์•Š๊ณ  `awaiting_human`์œผ๋กœ ๋ฉˆ์ถ˜๋‹ค. ์—ฌ๊ธฐ๋Š” ์ธํ„ฐ๋ทฐ์™€ ๊ฐ™๋‹ค. **๋ฐ˜๋“œ์‹œ ์‚ฌ๋žŒ์—๊ฒŒ ๋ฌป๊ณ  ๋‹ต์„ ๊ธฐ๋‹ค๋ฆฐ๋‹ค.** ์Šค์Šค๋กœ ๊ณ ๋ฅด์ง€ ์•Š๋Š”๋‹ค.
180
+
181
+ 1. `gate.question`๊ณผ ๋ง‰ํžŒ ์ง€์ (`gate.context`)์„ ๋ณด์—ฌ์ฃผ๊ณ  `gate.options`๋ฅผ ์„ ํƒ์ง€๋กœ ๋„์šด๋‹ค.
182
+ 2. ๊ณ ๋ฅธ ์„ ํƒ์ง€์™€ ํ•จ๊ป˜ ๊ฒฐ์ •๊ณผ ์ด์œ ๋ฅผ ํ•œ ์ค„์”ฉ ๋ฐ›๋Š”๋‹ค. ๋น„์–ด ์žˆ์œผ๋ฉด ์„œ๋ฒ„๊ฐ€ ๊ฑฐ์ ˆํ•œ๋‹ค. ๋Œ€์‹  ์ฑ„์šฐ์ง€ ์•Š๋Š”๋‹ค โ€” ๊ทธ๋Œ€๋กœ Memory์— ๋‚จ๋Š” ๋ง์ด๋‹ค.
183
+ 3. `ges_execute { action: "gate_resolve", sessionId, gateResolution: { gateId, optionId, decision, rationale } }`๋ฅผ ๋ถ€๋ฅธ๋‹ค.
184
+ 4. `patch_spec`์ด๋ฉด `evolve_patch`๋กœ, `manual_task`๋ฉด ์‚ฌ๋žŒ์ด ์ฒ˜๋ฆฌํ•œ ๊ฑธ ํ™•์ธํ•˜๊ณ  `evaluate`๋กœ ๋ฃจํ”„๋ฅผ ์ด์–ด๊ฐ„๋‹ค. `restart`๋‚˜ `abort`๋ฉด ์„ธ์…˜์ด ์ข…๋ฃŒ๋˜๋‹ˆ ๋ฃจํ”„๋ฅผ ๋๋‚ด๊ณ  ์•„๋ž˜ ์—์Šค์ปฌ๋ ˆ์ด์…˜ ๋ณด๊ณ ๋ฅผ ํ•œ๋‹ค.
185
+
186
+ ์ž์„ธํ•œ ํ๋ฆ„์€ execute ์Šคํ‚ฌ์˜ Flow D์™€ ๊ฐ™๋‹ค.
187
+
174
188
  ### ์™„๋ฃŒ ๋ณด๊ณ 
175
189
 
176
190
  ๋ฃจํ”„ ์ข…๋ฃŒ ์‹œ ์‚ฌ๋žŒ์—๊ฒŒ ๊ฒฐ๊ณผ๋ฅผ ๋ณด๊ณ ํ•œ๋‹ค:
@@ -216,7 +230,8 @@ description: "์—์Šค์ปฌ๋ ˆ์ด์…˜ | ์ตœ๊ณ  ์ ์ˆ˜: {bestScore} | {์‹œ๋„ํ•œ perso
216
230
  execute โ†’ evaluate โ†’ evolve โ†’ re-execute โ†’ evaluate โ†’ ...
217
231
  โ†“
218
232
  success โ†’ ์™„๋ฃŒ ๋ณด๊ณ 
219
- human_escalation โ†’ ๋ง‰ํžŒ ์ง€์  ๋ณด๊ณ 
233
+ awaiting_human โ†’ ์‚ฌ๋žŒ์—๊ฒŒ ๋ฌป๊ณ  gate_resolve โ†’ ์ด์–ด๊ฐ€๊ฑฐ๋‚˜ ์ข…๋ฃŒ
234
+ human_escalation (restart/abort) โ†’ ๋ง‰ํžŒ ์ง€์  ๋ณด๊ณ 
220
235
  ```
221
236
 
222
237
  ์ธํ„ฐ๋ทฐ์—์„œ ์‚ฌ๋žŒ๊ณผ ํฐ ๊ด€์ ์„ ์ถฉ๋ถ„ํžˆ ์ •๋ฆฌํ•œ ๋’ค, ๊ทธ ์ดํ›„๋Š” AI๊ฐ€ ๋ชฉํ‘œ๋ฅผ ํ–ฅํ•ด ์Šค์Šค๋กœ ๋ฃจํ”„๋ฅผ ๋ˆ๋‹ค.
@@ -41,6 +41,8 @@ This skill transforms completed interview data into a structured project specifi
41
41
 
42
42
  - Interview session must be in `completed` status
43
43
  - Resolution score must be โ‰ฅ 0.8 (unless `force` is true)
44
+ - 0.8 ๋ฏธ๋งŒ ์„ธ์…˜์€ ์ธํ„ฐ๋ทฐ `complete`์— `force: true`๋ฅผ ๋„˜๊ฒจ์•ผ๋งŒ `completed`๊ฐ€ ๋œ๋‹ค. ์ด๋•Œ ์„ธ์…˜์— `forcedComplete`๊ฐ€ ๋‚จ๋Š”๋‹ค
45
+ - `ges_generate_spec`์ด ํ•ด์ƒ๋„ ๊ธฐ์ค€์œผ๋กœ ๊ฑฐ์ ˆํ•˜๋ฉด `ges_status({ sessionId })`๋กœ `forcedComplete`๋ฅผ ๋ณธ๋‹ค. `true`๋ฉด ์‚ฌ์šฉ์ž๊ฐ€ ์ธํ„ฐ๋ทฐ์—์„œ ๋„˜์–ด๊ฐ€๊ธฐ๋กœ ํ•œ ์„ธ์…˜์ด๋‹ˆ `force: true`๋กœ ๋‹ค์‹œ ๋ถ€๋ฅธ๋‹ค. `false`์ธ๋ฐ 0.8 ๋ฏธ๋งŒ์ด๋ฉด `force`๋ฅผ ์Šค์Šค๋กœ ๋„˜๊ธฐ์ง€ ์•Š๋Š”๋‹ค. ํ˜„์žฌ ์ ์ˆ˜๋ฅผ ๋ณด์—ฌ์ฃผ๊ณ  ์‚ฌ์šฉ์ž์—๊ฒŒ ๋ฌป๋Š”๋‹ค
44
46
 
45
47
  ## ๊ทœ์น™ ํ™•๋ณด (1๋‹จ๊ณ„ ํ˜ธ์ถœ ์ „)
46
48
 
@@ -1,33 +0,0 @@
1
- export interface MiniInterviewQuestion {
2
- dimension: string;
3
- prompt: string;
4
- rationale: string;
5
- }
6
- export interface MiniInterviewContext {
7
- systemPrompt: string;
8
- questions: MiniInterviewQuestion[];
9
- scoringPrompt: string;
10
- sourceTopic: string;
11
- message: string;
12
- }
13
- export interface ResolutionDimensionScore {
14
- goalClarity: number;
15
- constraintClarity: number;
16
- successCriteria: number;
17
- priorityClarity: number;
18
- contextClarity?: number;
19
- contradictions?: string[];
20
- }
21
- export declare class MiniInterviewEngine {
22
- /**
23
- * Given an initial ambiguity score from text-based spec generation,
24
- * determine if a mini-interview is needed and build the clarification context.
25
- */
26
- needsMiniInterview(score: ResolutionDimensionScore): boolean;
27
- buildClarificationContext(topic: string, text: string, score: ResolutionDimensionScore): MiniInterviewContext;
28
- buildReScoringContext(topic: string, text: string, answers: Array<{
29
- question: string;
30
- answer: string;
31
- }>): string;
32
- }
33
- //# sourceMappingURL=mini-interview-engine.d.ts.map