agestra 4.1.1 → 4.3.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.
@@ -10,12 +10,9 @@
10
10
  "plugins": [
11
11
  {
12
12
  "name": "agestra",
13
- "source": {
14
- "source": "npm",
15
- "package": "agestra"
16
- },
13
+ "source": "./",
17
14
  "description": "Orchestrate Ollama, Gemini, and Codex for multi-AI debates, cross-validation, and GraphRAG memory",
18
- "version": "4.1.1",
15
+ "version": "4.3.0",
19
16
  "author": {
20
17
  "name": "mua-vtuber"
21
18
  },
@@ -1,11 +1,13 @@
1
- {
2
- "name": "agestra",
3
- "version": "4.1.1",
4
- "description": "Claude Code plugin — orchestrate Ollama, Gemini, and Codex for multi-AI debates, cross-validation, and GraphRAG memory",
5
- "mcpServers": {
6
- "agestra": {
7
- "command": "node",
8
- "args": ["${CLAUDE_PLUGIN_ROOT}/dist/bundle.js"]
9
- }
10
- }
11
- }
1
+ {
2
+ "name": "agestra",
3
+ "version": "4.3.0",
4
+ "description": "Claude Code plugin — orchestrate Ollama, Gemini, and Codex for multi-AI debates, cross-validation, and GraphRAG memory",
5
+ "mcpServers": {
6
+ "agestra": {
7
+ "command": "node",
8
+ "args": [
9
+ "${CLAUDE_PLUGIN_ROOT}/dist/bundle.js"
10
+ ]
11
+ }
12
+ }
13
+ }
package/README.ko.md CHANGED
@@ -7,7 +7,7 @@
7
7
 
8
8
  [English](README.md) | [한국어](README.ko.md)
9
9
 
10
- Agestra는 Ollama(로컬), Gemini CLI, Codex CLI를 Claude Code에 플러그형으로 연결합니다. 멀티에이전트 토론, 병렬 작업 분배, 교차 검증, 지속적 GraphRAG 메모리 시스템을 39개 MCP 도구로 제공합니다.
10
+ Agestra는 Ollama(로컬), Gemini CLI, Codex CLI를 Claude Code에 플러그형으로 연결합니다. 독립 취합, 합의 토론, 자율 CLI 워커, 병렬 작업 분배, 교차 검증, 품질 기반 공급자 라우팅, 지속적 GraphRAG 메모리 시스템을 49개 MCP 도구로 제공합니다.
11
11
 
12
12
  ## 빠른 시작
13
13
 
@@ -18,7 +18,7 @@ Claude Code에서 실행:
18
18
  /plugin install agestra@agestra
19
19
  ```
20
20
 
21
- 끝. Agestra가 첫 사용 시 사용 가능한 공급자(Ollama, Gemini CLI, Codex CLI)를 자동 감지합니다.
21
+ 끝. Agestra가 첫 사용 시 `environment_check`로 사용 가능한 공급자(Ollama, Gemini CLI, Codex CLI)를 자동 감지합니다.
22
22
 
23
23
  ### 사전 요구사항
24
24
 
@@ -30,6 +30,9 @@ Claude Code에서 실행:
30
30
  | [Gemini CLI](https://github.com/google-gemini/gemini-cli) | `npm install -g @google/gemini-cli` | 클라우드 |
31
31
  | [Codex CLI](https://github.com/openai/codex) | `npm install -g @openai/codex` | 클라우드 |
32
32
 
33
+ 선택 사항이지만 권장:
34
+ - **tmux** — 자율 실행 중 CLI 워커 패인을 시각적으로 확인 가능
35
+
33
36
  ---
34
37
 
35
38
  ## 철학
@@ -44,16 +47,34 @@ Claude Code에서 실행:
44
47
  | `/agestra idea [주제]` | 유사 프로젝트 비교를 통한 개선점 발굴 |
45
48
  | `/agestra design [주제]` | 구현 전 아키텍처 및 설계 트레이드오프 탐색 |
46
49
 
47
- 각 커맨드는 선택지를 제시합니다: **Claude만**, **비교** (여러 AI 나란히), **토론** (구조화된 멀티AI 논의), **기타** (사용자 지정).
50
+ 각 커맨드는 선택지를 제시합니다:
51
+
52
+ | 모드 | 설명 |
53
+ |------|------|
54
+ | **Claude only** | 플러그인 전문 에이전트가 단독 작업 |
55
+ | **각자 독립** | 각 AI가 독립 작업 후 진행자가 취합하여 통합 문서 작성 |
56
+ | **끝장토론** | 각자 독립 + 문서를 돌아가며 분석/피드백, 모든 AI가 동의할 때까지 |
48
57
 
49
58
  ## 에이전트
50
59
 
51
60
  | 에이전트 | 모델 | 역할 |
52
61
  |----------|------|------|
53
- | `reviewer` | Opus | 엄격한 품질 검증 보안, 고아 시스템, 스펙 이탈, 테스트 공백 |
54
- | `designer` | Opus | 아키텍처 탐색소크라테스식 질문, 트레이드오프 분석 |
55
- | `ideator` | Sonnet | 개선점 발굴 리서치, 경쟁 분석 |
56
- | `moderator` | Sonnet | 토론 진행중립, 관리, 합의 판정 |
62
+ | `agestra-team-lead` | Sonnet | 오케스트레이터 — 환경 체크, 품질 기반 공급자 라우팅, 작업 모드 선택, CLI 워커 감독, QA 루프 |
63
+ | `agestra-reviewer` | Opus | 엄격한 품질 검증 보안, 고아 시스템, 스펙 이탈, 테스트 공백 |
64
+ | `agestra-designer` | Opus | 아키텍처 탐색소크라테스식 질문, 트레이드오프 분석 |
65
+ | `agestra-ideator` | Sonnet | 개선점 발굴 리서치, 경쟁 분석 |
66
+ | `agestra-moderator` | Sonnet | 다목적 진행자 — 합의 검출 토론, 독립 취합, 문서 라운드 리뷰, 충돌 해결 |
67
+ | `agestra-qa` | Opus | QA 검증 — 설계 준수, PASS/FAIL 판정 |
68
+
69
+ ## 스킬
70
+
71
+ | 스킬 | 설명 |
72
+ |------|------|
73
+ | `provider-guide` | 공급자 라우팅, 모드 참조, 오케스트레이션 파이프라인 |
74
+ | `worker-manage` | CLI 워커 목록, 상태 확인, 결과 수집, 중지 |
75
+ | `cancel` | 워커, 토론, 체인, 작업의 정상 종료 |
76
+ | `build-fix` | 빌드/타입체크/린트 에러 자동 진단 및 수정 |
77
+ | `trace` | 에이전트 실행 타임라인 및 흐름 다이어그램 조회 |
57
78
 
58
79
  ---
59
80
 
@@ -63,14 +84,14 @@ Turborepo 모노레포, 8개 패키지:
63
84
 
64
85
  | 패키지 | 설명 |
65
86
  |--------|------|
66
- | `@agestra/core` | `AIProvider` 인터페이스, 레지스트리, 설정 로더, CLI 러너, 원자적 쓰기, 작업 |
87
+ | `@agestra/core` | `AIProvider` 인터페이스, 난이도 기반 라우팅 레지스트리, 설정 로더, CLI 러너, 원자적 쓰기, 작업 큐, 시크릿 스캐너, 워크트리 관리자, 태스크 매니페스트, CLI 워커 관리자 |
67
88
  | `@agestra/provider-ollama` | Ollama HTTP 어댑터 (모델 자동 감지) |
68
89
  | `@agestra/provider-gemini` | Google Gemini CLI 어댑터 |
69
90
  | `@agestra/provider-codex` | OpenAI Codex CLI 어댑터 |
70
- | `@agestra/agents` | 토론 엔진, 작업 분배기, 교차 검증기, 작업 체인, 자동 QA, 파일 변경 추적기, 세션 관리자 |
91
+ | `@agestra/agents` | 합의 검출 토론 엔진, 턴 품질 평가기, 작업 분배기, 교차 검증기, 작업 체인, 자동 QA, 파일 변경 추적기, 세션 관리자 |
71
92
  | `@agestra/workspace` | 코드 리뷰 워크플로우용 문서 관리자 |
72
93
  | `@agestra/memory` | GraphRAG — FTS5 + 벡터 + 지식 그래프 하이브리드 검색, 실패 추적 |
73
- | `@agestra/mcp-server` | MCP 프로토콜 레이어, 39개 도구, 디스패치 |
94
+ | `@agestra/mcp-server` | MCP 프로토콜 레이어, 49개 도구, 디스패치 |
74
95
 
75
96
  ### 설계 원칙
76
97
 
@@ -80,10 +101,19 @@ Turborepo 모노레포, 8개 패키지:
80
101
  - **모듈형 디스패치** — 각 도구 카테고리가 `getTools()` + `handleTool()`을 내보내는 독립 모듈. 서버가 동적으로 수집·디스패치.
81
102
  - **원자적 쓰기** — 모든 파일 연산이 임시 파일 → rename 방식. 크래시 시 손상 방지.
82
103
  - **실패 추적** — 실패한 접근법이 GraphRAG에 자동 기록, 이후 프롬프트에 주입.
104
+ - **사전 보안 검증** — CLI 워커 스폰 시 시크릿 스캔 + 배열 기반 프로세스 인자로 인젝션 방지.
105
+
106
+ ### 작업 모드
107
+
108
+ **텍스트 작업** (리뷰, 설계, 아이디어): Claude only → 각자 독립 → 끝장토론
109
+
110
+ **구현 작업** (team-lead 오케스트레이션):
111
+ - **Claude만으로** — Claude가 프로젝트/전역 에이전트를 활용해 직접 구현.
112
+ - **다른 AI도 함께** — CLI 워커(Codex/Gemini)가 격리된 git worktree에서 자율 코딩, Ollama가 단순 작업 처리, Claude가 감독 및 병합.
83
113
 
84
114
  ---
85
115
 
86
- ## 도구 (39개)
116
+ ## 도구 (49개)
87
117
 
88
118
  ### AI 채팅 (3개)
89
119
 
@@ -93,7 +123,7 @@ Turborepo 모노레포, 8개 패키지:
93
123
  | `ai_analyze_files` | 파일을 디스크에서 읽어 공급자에게 질문과 함께 전송 |
94
124
  | `ai_compare` | 같은 프롬프트를 여러 공급자에 보내 응답 비교 |
95
125
 
96
- ### 에이전트 오케스트레이션 (16개)
126
+ ### 에이전트 오케스트레이션 (20개)
97
127
 
98
128
  | 도구 | 설명 |
99
129
  |------|------|
@@ -102,6 +132,7 @@ Turborepo 모노레포, 8개 패키지:
102
132
  | `agent_debate_create` | 턴 기반 토론 세션 생성 (토론 ID 반환) |
103
133
  | `agent_debate_turn` | 공급자 1턴 실행; `provider: "claude"`로 Claude 독립 참여 지원 |
104
134
  | `agent_debate_conclude` | 토론 종료 및 최종 트랜스크립트 생성 |
135
+ | `agent_debate_moderate` | 완전 자동화 토론 — 세션 생성, Specialist 에이전트 참여 라운드 실행, 합의 검출, 요약만 반환 |
105
136
  | `agent_debate_review` | 문서를 여러 공급자에게 독립적으로 리뷰 요청 |
106
137
  | `agent_assign_task` | 특정 공급자에게 작업 위임 |
107
138
  | `agent_task_status` | 작업 완료 상태 및 결과 확인 |
@@ -109,12 +140,30 @@ Turborepo 모노레포, 8개 패키지:
109
140
  | `agent_cross_validate` | 출력 교차 검증 (에이전트 등급 검증자만 가능) |
110
141
  | `agent_task_chain_create` | 의존성과 체크포인트가 있는 다단계 작업 체인 생성 |
111
142
  | `agent_task_chain_step` | 체인의 다음 (또는 지정) 단계 실행 |
143
+ | `agent_task_chain_step_async` | 단계를 비동기로 실행 (논블로킹) |
144
+ | `agent_task_chain_await` | 비동기 단계 완료 대기 |
112
145
  | `agent_task_chain_status` | 체인 진행 상태 및 단계 결과 확인 |
113
146
  | `agent_changes_review` | 격리된 작업의 파일 변경 리뷰 |
114
147
  | `agent_changes_accept` | 격리된 작업의 변경 수락 및 병합 |
115
148
  | `agent_changes_reject` | 변경 거부 및 격리 워크트리 정리 |
149
+ | `session_list` | 에이전트 세션 목록 조회 (유형/상태 필터링) |
150
+
151
+ ### CLI 워커 (4개)
152
+
153
+ | 도구 | 설명 |
154
+ |------|------|
155
+ | `cli_worker_spawn` | CLI AI(Codex/Gemini)를 자율 모드로 스폰 — git worktree 격리 + 사전 보안 검증 |
156
+ | `cli_worker_status` | 워커 FSM 상태, 하트비트, 출력 미리보기 확인 |
157
+ | `cli_worker_collect` | 완료된 워커 결과 수집 (git diff, 출력, 종료 코드) |
158
+ | `cli_worker_stop` | 실행 중인 워커 중지 (SIGTERM → SIGKILL) + 워크트리 정리 |
159
+
160
+ ### 환경 (1개)
161
+
162
+ | 도구 | 설명 |
163
+ |------|------|
164
+ | `environment_check` | CLI 도구, Ollama 모델 티어, tmux, git worktree 지원 여부, 사용 가능 모드 탐지 |
116
165
 
117
- ### 워크스페이스 (5개)
166
+ ### 워크스페이스 (6개)
118
167
 
119
168
  | 도구 | 설명 |
120
169
  |------|------|
@@ -123,6 +172,7 @@ Turborepo 모노레포, 8개 패키지:
123
172
  | `workspace_review_status` | 리뷰 완료 상태 확인 |
124
173
  | `workspace_add_comment` | 리뷰에 코멘트 추가 |
125
174
  | `workspace_read` | 리뷰 내용 읽기 |
175
+ | `workspace_list` | 워크스페이스의 모든 리뷰 문서 목록 조회 |
126
176
 
127
177
  ### 공급자 관리 (2개)
128
178
 
@@ -135,7 +185,7 @@ Turborepo 모노레포, 8개 패키지:
135
185
 
136
186
  | 도구 | 설명 |
137
187
  |------|------|
138
- | `ollama_models` | 설치된 모델 및 크기 목록 |
188
+ | `ollama_models` | 설치된 모델 및 크기, 티어 분류 목록 |
139
189
  | `ollama_pull` | 모델 다운로드 |
140
190
 
141
191
  ### 메모리 (6개)
@@ -161,7 +211,7 @@ Turborepo 모노레포, 8개 패키지:
161
211
  | 도구 | 설명 |
162
212
  |------|------|
163
213
  | `trace_query` | 조건별 추적 레코드 조회 (공급자, 작업, 기간) |
164
- | `trace_summary` | 공급자별·작업별 품질 성능 통계 |
214
+ | `trace_summary` | 공급자별 품질 통계, 성능 지표, 난이도 자격 확인 |
165
215
  | `trace_visualize` | 추적된 작업 흐름의 Mermaid 다이어그램 생성 |
166
216
 
167
217
  ---
@@ -190,6 +240,8 @@ Agestra는 시작 시 공급자를 자동 감지합니다. 수동 제어가 필
190
240
  | `.agestra/workspace/` | 코드 리뷰 문서 |
191
241
  | `.agestra/memory.db` | GraphRAG SQLite 데이터베이스 |
192
242
  | `.agestra/.jobs/` | 백그라운드 작업 큐 |
243
+ | `.agestra/.workers/` | CLI 워커 상태, 매니페스트, 출력 로그 |
244
+ | `.agestra/worktrees/` | CLI 워커 격리 실행용 git worktree |
193
245
  | `.agestra/traces/` | 공급자 추적 JSONL (30일 후 자동 정리) |
194
246
 
195
247
  ---
@@ -218,14 +270,18 @@ agestra/
218
270
  │ ├── idea.md # /agestra idea — 개선점 발굴
219
271
  │ └── design.md # /agestra design — 아키텍처 탐색
220
272
  ├── agents/
221
- │ ├── reviewer.md # 엄격한 품질 검증자 (Opus)
222
- │ ├── designer.md # 아키텍처 탐색자 (Opus)
223
- │ ├── ideator.md # 개선점 발굴자 (Sonnet)
224
- │ ├── moderator.md # 토론 진행자 (Sonnet)
225
- │ ├── qa.md # QA 검증자 (프로젝트 내부)
226
- │ └── team-lead.md # 작업 오케스트레이터 (프로젝트 내부)
273
+ │ ├── agestra-reviewer.md # 엄격한 품질 검증자 (Opus)
274
+ │ ├── agestra-designer.md # 아키텍처 탐색자 (Opus)
275
+ │ ├── agestra-ideator.md # 개선점 발굴자 (Sonnet)
276
+ │ ├── agestra-moderator.md # 다목적 진행자 (Sonnet)
277
+ │ ├── agestra-qa.md # QA 검증자 (Opus, 코드 쓰기 불가)
278
+ │ └── agestra-team-lead.md # 오케스트레이터 (Sonnet, 코드 쓰기 불가)
227
279
  ├── skills/
228
- └── provider-guide.md # 공급자 사용 가이드라인 (skill)
280
+ ├── provider-guide.md # 공급자 라우팅 모드 참조
281
+ │ ├── worker-manage.md # CLI 워커 관리
282
+ │ ├── cancel.md # 정상 작업 취소
283
+ │ ├── build-fix.md # 빌드 에러 자동 수정
284
+ │ └── trace.md # 실행 타임라인 조회
229
285
  ├── hooks/
230
286
  │ └── user-prompt-submit.md # 도구 추천 hook
231
287
  ├── dist/
@@ -233,14 +289,14 @@ agestra/
233
289
  ├── scripts/
234
290
  │ └── bundle.mjs # esbuild 번들 스크립트
235
291
  ├── packages/
236
- │ ├── core/ # AIProvider 인터페이스, 레지스트리
292
+ │ ├── core/ # AIProvider 인터페이스, 레지스트리, 보안, 워커
237
293
  │ ├── provider-ollama/ # Ollama HTTP 어댑터
238
294
  │ ├── provider-gemini/ # Gemini CLI 어댑터
239
295
  │ ├── provider-codex/ # Codex CLI 어댑터
240
296
  │ ├── agents/ # 토론 엔진, 분배기, 교차 검증기
241
297
  │ ├── workspace/ # 코드 리뷰 문서 관리자
242
298
  │ ├── memory/ # GraphRAG: 하이브리드 검색, 실패 추적
243
- │ └── mcp-server/ # MCP 서버, 39개 도구, 디스패치
299
+ │ └── mcp-server/ # MCP 서버, 49개 도구, 디스패치
244
300
  ├── package.json # 워크스페이스 루트
245
301
  └── turbo.json # Turborepo 파이프라인
246
302
  ```
package/README.md CHANGED
@@ -7,7 +7,7 @@
7
7
 
8
8
  [English](README.md) | [한국어](README.ko.md)
9
9
 
10
- Agestra connects Ollama (local), Gemini CLI, and Codex CLI to Claude Code as pluggable providers, enabling multi-agent debates, parallel task dispatch, cross-validation, and a persistent GraphRAG memory system — all through 39 MCP tools.
10
+ Agestra connects Ollama (local), Gemini CLI, and Codex CLI to Claude Code as pluggable providers, enabling multi-agent orchestration with independent aggregation, consensus debates, autonomous CLI workers, parallel task dispatch, cross-validation, quality-based provider routing, and a persistent GraphRAG memory system — all through 49 MCP tools.
11
11
 
12
12
  ## Quick Start
13
13
 
@@ -18,7 +18,7 @@ In Claude Code, run:
18
18
  /plugin install agestra@agestra
19
19
  ```
20
20
 
21
- That's it. Agestra auto-detects available providers (Ollama, Gemini CLI, Codex CLI) on first use.
21
+ That's it. Agestra auto-detects available providers (Ollama, Gemini CLI, Codex CLI) on first use via `environment_check`.
22
22
 
23
23
  ### Prerequisites
24
24
 
@@ -30,6 +30,9 @@ At least one AI provider must be installed:
30
30
  | [Gemini CLI](https://github.com/google-gemini/gemini-cli) | `npm install -g @google/gemini-cli` | Cloud |
31
31
  | [Codex CLI](https://github.com/openai/codex) | `npm install -g @openai/codex` | Cloud |
32
32
 
33
+ Optional but recommended:
34
+ - **tmux** — enables visible CLI worker panes during autonomous execution
35
+
33
36
  ---
34
37
 
35
38
  ## Philosophy
@@ -44,16 +47,34 @@ At least one AI provider must be installed:
44
47
  | `/agestra idea [topic]` | Discover improvements by comparing with similar projects |
45
48
  | `/agestra design [subject]` | Explore architecture and design trade-offs before implementation |
46
49
 
47
- Each command presents a choice: **Claude only**, **Compare** (multiple AIs side-by-side), **Debate** (structured multi-AI discussion), or **Other** (user-specified).
50
+ Each command presents a choice:
51
+
52
+ | Mode | Description |
53
+ |------|-------------|
54
+ | **Claude only** | Plugin specialist agent works alone |
55
+ | **각자 독립** (Independent) | Each AI works independently, moderator aggregates into unified document |
56
+ | **끝장토론** (Debate) | Independent work + document review rounds until all AIs agree |
48
57
 
49
58
  ## Agents
50
59
 
51
60
  | Agent | Model | Role |
52
61
  |-------|-------|------|
53
- | `reviewer` | Opus | Strict quality verifier security, orphans, spec drift, test gaps |
54
- | `designer` | Opus | Architecture explorerSocratic questioning, trade-off analysis |
55
- | `ideator` | Sonnet | Improvement discovererweb research, competitive analysis |
56
- | `moderator` | Sonnet | Debate facilitatorneutral, manages turns, judges consensus |
62
+ | `agestra-team-lead` | Sonnet | Full orchestratorenvironment check, quality-based provider routing, work mode selection, CLI worker supervision, QA loop |
63
+ | `agestra-reviewer` | Opus | Strict quality verifier security, orphans, spec drift, test gaps |
64
+ | `agestra-designer` | Opus | Architecture explorerSocratic questioning, trade-off analysis |
65
+ | `agestra-ideator` | Sonnet | Improvement discovererweb research, competitive analysis |
66
+ | `agestra-moderator` | Sonnet | Multi-mode facilitator — debate with consensus detection, independent aggregation, document review, conflict resolution |
67
+ | `agestra-qa` | Opus | QA verifier — design compliance, PASS/FAIL judgment |
68
+
69
+ ## Skills
70
+
71
+ | Skill | Description |
72
+ |-------|-------------|
73
+ | `provider-guide` | Provider routing, mode reference, orchestration pipeline |
74
+ | `worker-manage` | List, check, collect, and stop CLI workers |
75
+ | `cancel` | Graceful stop for workers, debates, chains, tasks |
76
+ | `build-fix` | Auto-diagnose and fix build/typecheck/lint errors |
77
+ | `trace` | View agent execution timeline and flow diagrams |
57
78
 
58
79
  ---
59
80
 
@@ -63,14 +84,14 @@ Turborepo monorepo with 8 packages:
63
84
 
64
85
  | Package | Description |
65
86
  |---------|-------------|
66
- | `@agestra/core` | `AIProvider` interface, registry, config loader, CLI runner, atomic writes, job queue |
87
+ | `@agestra/core` | `AIProvider` interface, registry with difficulty-based routing, config loader, CLI runner, atomic writes, job queue, secret scanner, worktree manager, task manifest, CLI worker manager |
67
88
  | `@agestra/provider-ollama` | Ollama HTTP adapter with model detection |
68
89
  | `@agestra/provider-gemini` | Google Gemini CLI adapter |
69
90
  | `@agestra/provider-codex` | OpenAI Codex CLI adapter |
70
- | `@agestra/agents` | Debate engine, task dispatcher, cross-validator, task chain, auto-QA, file change tracker, session manager |
91
+ | `@agestra/agents` | Debate engine with consensus detection, turn quality evaluator, task dispatcher, cross-validator, task chain, auto-QA, file change tracker, session manager |
71
92
  | `@agestra/workspace` | Document manager for code review workflows |
72
93
  | `@agestra/memory` | GraphRAG — FTS5 + vector + knowledge graph hybrid search, dead-end tracking |
73
- | `@agestra/mcp-server` | MCP protocol layer, 39 tools, dispatch |
94
+ | `@agestra/mcp-server` | MCP protocol layer, 49 tools, dispatch |
74
95
 
75
96
  ### Design Principles
76
97
 
@@ -80,10 +101,19 @@ Turborepo monorepo with 8 packages:
80
101
  - **Modular dispatch** — Each tool category is an independent module with `getTools()` + `handleTool()`. The server collects and dispatches dynamically.
81
102
  - **Atomic writes** — All file operations use write-to-temp-then-rename to prevent corruption.
82
103
  - **Dead-end tracking** — Failed approaches are recorded in GraphRAG and injected into future prompts.
104
+ - **Preflight security** — CLI worker spawning includes secret scanning and array-based process args to prevent injection.
105
+
106
+ ### Work Modes
107
+
108
+ **Text work** (review, design, idea): Claude only → 각자 독립 → 끝장토론
109
+
110
+ **Implementation work** (team-lead orchestration):
111
+ - **Claude만으로** — Claude implements directly with project/global agents.
112
+ - **다른 AI도 함께** — CLI workers (Codex/Gemini) do autonomous coding in isolated git worktrees, Ollama handles simple tasks, Claude supervises and merges.
83
113
 
84
114
  ---
85
115
 
86
- ## Tools (39)
116
+ ## Tools (49)
87
117
 
88
118
  ### AI Chat (3)
89
119
 
@@ -93,7 +123,7 @@ Turborepo monorepo with 8 packages:
93
123
  | `ai_analyze_files` | Read files from disk and send contents with a question to a provider |
94
124
  | `ai_compare` | Send the same prompt to multiple providers, compare responses |
95
125
 
96
- ### Agent Orchestration (16)
126
+ ### Agent Orchestration (20)
97
127
 
98
128
  | Tool | Description |
99
129
  |------|-------------|
@@ -102,6 +132,7 @@ Turborepo monorepo with 8 packages:
102
132
  | `agent_debate_create` | Create a turn-based debate session (returns debate ID) |
103
133
  | `agent_debate_turn` | Execute one provider's turn; supports `provider: "claude"` for Claude's independent participation |
104
134
  | `agent_debate_conclude` | End a debate and generate final transcript |
135
+ | `agent_debate_moderate` | Run a fully automated debate — creates session, runs rounds with specialist agents, detects consensus, returns summary only |
105
136
  | `agent_debate_review` | Send a document to multiple providers for independent review |
106
137
  | `agent_assign_task` | Delegate a task to a specific provider |
107
138
  | `agent_task_status` | Check task completion and result |
@@ -109,12 +140,30 @@ Turborepo monorepo with 8 packages:
109
140
  | `agent_cross_validate` | Cross-validate outputs (agent-tier validators only) |
110
141
  | `agent_task_chain_create` | Create a multi-step task chain with dependencies and checkpoints |
111
142
  | `agent_task_chain_step` | Execute the next (or specified) step in a chain |
143
+ | `agent_task_chain_step_async` | Execute a step asynchronously (non-blocking) |
144
+ | `agent_task_chain_await` | Wait for an async step to complete |
112
145
  | `agent_task_chain_status` | Check chain progress and step results |
113
146
  | `agent_changes_review` | Review file changes from an isolated task |
114
147
  | `agent_changes_accept` | Accept and merge changes from an isolated task |
115
148
  | `agent_changes_reject` | Reject changes and clean up the isolated worktree |
149
+ | `session_list` | List all agent sessions with optional type/status filtering |
150
+
151
+ ### CLI Workers (4)
152
+
153
+ | Tool | Description |
154
+ |------|-------------|
155
+ | `cli_worker_spawn` | Spawn a CLI AI (Codex/Gemini) in autonomous mode with git worktree isolation and preflight security |
156
+ | `cli_worker_status` | Check worker FSM state, heartbeat, and output tail |
157
+ | `cli_worker_collect` | Collect completed worker results (git diff, output, exit code) |
158
+ | `cli_worker_stop` | Stop a running worker (SIGTERM → SIGKILL) and clean up worktree |
159
+
160
+ ### Environment (1)
161
+
162
+ | Tool | Description |
163
+ |------|-------------|
164
+ | `environment_check` | Detect CLI tools, Ollama models with tiers, tmux, git worktree support, available modes |
116
165
 
117
- ### Workspace (5)
166
+ ### Workspace (6)
118
167
 
119
168
  | Tool | Description |
120
169
  |------|-------------|
@@ -123,6 +172,7 @@ Turborepo monorepo with 8 packages:
123
172
  | `workspace_review_status` | Check review completion status |
124
173
  | `workspace_add_comment` | Add a comment to a review |
125
174
  | `workspace_read` | Read review contents |
175
+ | `workspace_list` | List all review documents in the workspace |
126
176
 
127
177
  ### Provider Management (2)
128
178
 
@@ -135,7 +185,7 @@ Turborepo monorepo with 8 packages:
135
185
 
136
186
  | Tool | Description |
137
187
  |------|-------------|
138
- | `ollama_models` | List installed models with sizes |
188
+ | `ollama_models` | List installed models with sizes and tier classification |
139
189
  | `ollama_pull` | Download a model |
140
190
 
141
191
  ### Memory (6)
@@ -161,7 +211,7 @@ Turborepo monorepo with 8 packages:
161
211
  | Tool | Description |
162
212
  |------|-------------|
163
213
  | `trace_query` | Query trace records with filtering (provider, task, time range) |
164
- | `trace_summary` | Get quality and performance stats per provider and task type |
214
+ | `trace_summary` | Get quality stats, performance metrics, and difficulty qualification per provider |
165
215
  | `trace_visualize` | Generate a Mermaid diagram of a traced operation's flow |
166
216
 
167
217
  ---
@@ -190,6 +240,8 @@ Stored under `.agestra/` (gitignored):
190
240
  | `.agestra/workspace/` | Code review documents |
191
241
  | `.agestra/memory.db` | GraphRAG SQLite database |
192
242
  | `.agestra/.jobs/` | Background job queue |
243
+ | `.agestra/.workers/` | CLI worker state, manifests, and output logs |
244
+ | `.agestra/worktrees/` | Git worktrees for isolated CLI worker execution |
193
245
  | `.agestra/traces/` | Provider trace JSONL (auto-pruned after 30 days) |
194
246
 
195
247
  ---
@@ -218,14 +270,18 @@ agestra/
218
270
  │ ├── idea.md # /agestra idea — improvement discovery
219
271
  │ └── design.md # /agestra design — architecture exploration
220
272
  ├── agents/
221
- │ ├── reviewer.md # Strict quality verifier (Opus)
222
- │ ├── designer.md # Architecture explorer (Opus)
223
- │ ├── ideator.md # Improvement discoverer (Sonnet)
224
- │ ├── moderator.md # Debate facilitator (Sonnet)
225
- │ ├── qa.md # QA verifier (project-internal)
226
- │ └── team-lead.md # Task orchestrator (project-internal)
273
+ │ ├── agestra-reviewer.md # Strict quality verifier (Opus)
274
+ │ ├── agestra-designer.md # Architecture explorer (Opus)
275
+ │ ├── agestra-ideator.md # Improvement discoverer (Sonnet)
276
+ │ ├── agestra-moderator.md # Multi-mode facilitator (Sonnet)
277
+ │ ├── agestra-qa.md # QA verifier (Opus, no code writes)
278
+ │ └── agestra-team-lead.md # Full orchestrator (Sonnet, no code writes)
227
279
  ├── skills/
228
- └── provider-guide.md # Provider usage guidelines (skill)
280
+ ├── provider-guide.md # Provider routing and mode reference
281
+ │ ├── worker-manage.md # CLI worker management
282
+ │ ├── cancel.md # Graceful operation cancellation
283
+ │ ├── build-fix.md # Build error auto-repair
284
+ │ └── trace.md # Execution timeline viewer
229
285
  ├── hooks/
230
286
  │ └── user-prompt-submit.md # Tool recommendation hook
231
287
  ├── dist/
@@ -233,14 +289,14 @@ agestra/
233
289
  ├── scripts/
234
290
  │ └── bundle.mjs # esbuild bundle script
235
291
  ├── packages/
236
- │ ├── core/ # AIProvider interface, registry
292
+ │ ├── core/ # AIProvider interface, registry, security, workers
237
293
  │ ├── provider-ollama/ # Ollama HTTP adapter
238
294
  │ ├── provider-gemini/ # Gemini CLI adapter
239
295
  │ ├── provider-codex/ # Codex CLI adapter
240
296
  │ ├── agents/ # Debate engine, dispatcher, cross-validator
241
297
  │ ├── workspace/ # Code review document manager
242
298
  │ ├── memory/ # GraphRAG: hybrid search, dead-end tracking
243
- │ └── mcp-server/ # MCP server, 39 tools, dispatch
299
+ │ └── mcp-server/ # MCP server, 49 tools, dispatch
244
300
  ├── package.json # Workspace root
245
301
  └── turbo.json # Turborepo pipeline
246
302
  ```
@@ -0,0 +1,122 @@
1
+ ---
2
+ name: agestra-designer
3
+ description: |
4
+ Pre-implementation design explorer using Socratic questioning. Explores architecture,
5
+ discusses design trade-offs, and establishes direction before coding.
6
+ Triggers: "design this", "how should I architect", "explore approaches", "design trade-offs",
7
+ "설계", "아키텍처", "구조 잡아줘", "어떻게 만들지", "방향 잡아줘",
8
+ "設計", "アーキテクチャ", "架构", "设计"
9
+ model: claude-opus-4-6
10
+ ---
11
+
12
+ <Role>
13
+ You are a pre-implementation design explorer. Your job is to help the user find the right architecture before any code is written. You use Socratic questioning to understand intent, explore the codebase for existing patterns, propose multiple approaches with trade-offs, and produce a design document.
14
+ </Role>
15
+
16
+ <Scope>
17
+ You design features and systems **for the current project** (the codebase you're running in). If the user's request is outside this project's scope — a new product idea, a business question, or something unrelated to this codebase — say so directly:
18
+
19
+ > "This is outside the current project's scope. I design features within this codebase. If you're looking for project ideas, try `/agestra idea` instead."
20
+
21
+ Do not attempt to design something that cannot be implemented in the current codebase.
22
+ </Scope>
23
+
24
+ <Workflow>
25
+ Follow these phases in order. Do not skip phases.
26
+
27
+ ### Phase 1: Understand (Clarity Gate)
28
+
29
+ Before asking questions, check if the request is already clear. If it includes specific file paths, function names, or concrete acceptance criteria, score immediately — skip the interview if ambiguity is already low.
30
+
31
+ **Clarity Dimensions:**
32
+
33
+ | Dimension | Weight (greenfield) | Weight (brownfield) |
34
+ |-----------|-------------------|-------------------|
35
+ | Goal | 40% | 35% |
36
+ | Constraints | 30% | 25% |
37
+ | Success Criteria | 30% | 25% |
38
+ | Context | N/A | 15% |
39
+
40
+ Greenfield: no relevant source code exists for the feature.
41
+ Brownfield: modifying or extending existing code.
42
+
43
+ **After each user answer:**
44
+ 1. Score all dimensions 0.0–1.0
45
+ 2. Calculate: `ambiguity = 1 - weighted_sum`
46
+ 3. Display progress to the user:
47
+ ```
48
+ Round {n} | Ambiguity: {score}% | Targeting: {weakest dimension}
49
+ ```
50
+ 4. If ambiguity <= 20% → proceed to Phase 2
51
+ 5. If ambiguity > 20% → ask the next question targeting the WEAKEST dimension
52
+
53
+ **Question targeting:** Always target the dimension with the lowest score. Ask ONE question at a time. Expose assumptions, not feature lists.
54
+
55
+ | Dimension | Question Style |
56
+ |-----------|---------------|
57
+ | Goal | "What exactly happens when...?" / "What specific action does a user take first?" |
58
+ | Constraints | "What are the boundaries?" / "Should this work offline?" |
59
+ | Success Criteria | "How do we know it works?" / "What would make you say 'yes, that's it'?" |
60
+ | Context (brownfield) | "How does this fit with existing...?" / "Extend or replace?" |
61
+
62
+ **Challenge modes** (each used once, then return to normal):
63
+ - Round 4+: **Contrarian** — "What if the opposite were true? What if this constraint doesn't actually exist?"
64
+ - Round 6+: **Simplifier** — "What's the simplest version that would still be valuable?"
65
+ - Round 8+: **Ontologist** (if ambiguity still > 30%) — "What IS this, really? One sentence."
66
+
67
+ **Soft limits:**
68
+ - Round 3+: allow early exit if user says "enough" — show ambiguity warning
69
+ - Round 10: soft warning — "We're at 10 rounds. Current ambiguity: {score}%. Continue or proceed?"
70
+ - Round 20: hard cap — proceed with current clarity, note the risk
71
+
72
+ ### Phase 2: Explore
73
+ Search the codebase for relevant existing patterns:
74
+ - Use Glob to find related files by name
75
+ - Use Grep to find similar implementations
76
+ - Use Read to understand existing architecture
77
+ - Note conventions: naming, file organization, patterns used
78
+
79
+ ### Phase 3: Propose
80
+ Present 2-3 distinct approaches. For each:
81
+ - **Approach name** — one-line summary
82
+ - **How it works** — architecture overview
83
+ - **Fits with** — which existing patterns it aligns with
84
+ - **Trade-offs** — pros and cons
85
+ - **Effort** — relative complexity (low/medium/high)
86
+
87
+ ### Phase 4: Refine
88
+ Based on user feedback:
89
+ - Deep-dive into the selected approach
90
+ - Address concerns raised
91
+ - Detail component boundaries and data flow
92
+ - Identify risks and mitigation
93
+
94
+ ### Phase 5: Document
95
+ Write a design document to `docs/plans/` with this structure:
96
+
97
+ ```markdown
98
+ # [Feature/System Name] Design
99
+
100
+ ## Problem
101
+ ## Approach
102
+ ## Architecture
103
+ ## Components
104
+ ## Data Flow
105
+ ## Trade-offs & Decisions
106
+ ## Open Questions
107
+ ## Implementation Steps
108
+ ```
109
+ </Workflow>
110
+
111
+ <Constraints>
112
+ - Ask one question at a time. Do not dump multiple questions.
113
+ - Present approaches before solutions. Let the user choose direction.
114
+ - Always explore the codebase before proposing — do not design in a vacuum.
115
+ - Document all decisions made during the conversation in the final design document.
116
+ - Do not write implementation code. Design documents only.
117
+ - Communicate in the user's language.
118
+ </Constraints>
119
+
120
+ <Output_Format>
121
+ Your final deliverable is a design document in `docs/plans/` following the template above. The document should be self-contained — someone reading it without conversation context should understand the design fully.
122
+ </Output_Format>