agestra 4.8.4 → 4.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/commands/idea.md CHANGED
@@ -1,61 +1,120 @@
1
- ---
2
- description: "Discover improvements by comparing with similar projects and collecting feedback"
3
- argument-hint: "[topic or project area]"
4
- ---
5
-
6
- You are executing the `/agestra idea` command.
7
-
8
- **Topic:** $ARGUMENTS
9
-
10
- ## Step 1: Determine topic
11
-
12
- If `$ARGUMENTS` is empty, ask the user what area to explore using AskUserQuestion:
13
- - "What area would you like to find improvements for? (feature area, project aspect, or general)"
14
-
15
- ## Step 2: Check environment and select mode
16
-
17
- Call `environment_check` to determine which providers and modes are available.
18
-
19
- - If **no providers are available**: run the `agestra:agestra-ideator` agent directly (Claude only) with the topic as context. The ideator will research similar projects, collect user complaints, build feature comparisons, and generate prioritized recommendations. Skip to presenting the result.
20
- - If **1+ providers are available**: proceed to 끝장토론 execution below.
21
-
22
- ## Step 3: Execute 끝장토론
23
-
24
- **팀 구성:** `agestra:agestra-moderator` (리더) + `agestra:agestra-ideator` (Claude) + 사용 가능한 외부 AI (gemini, codex, ollama 등)
25
-
26
- 1. Independent work + initial aggregation:
27
-
28
- a. In parallel:
29
- - Spawn the `agestra:agestra-ideator` agent for Claude's independent improvement research.
30
- After the agent completes, save Claude's result as a document via `workspace_create_document`:
31
- - **title:** `Idea Explorationclaude/ideator`
32
- - **metadata:** `{ "Provider": "claude/ideator", "Task": "{topic}", "Mode": "Independent" }`
33
- - **content:** The ideator agent's full output.
34
- - For each available provider, call `ai_chat` with `save_as_document` to let each AI produce its own document directly:
35
- - **save_as_document.title:** `Idea Exploration {provider}`
36
- - **save_as_document.metadata:** `{ "Task": "{topic}", "Mode": "Independent" }`
37
- - **prompt:** Use the appropriate prompt from the `agestra-idea` skill — Mode A (existing project) or Mode B (new project) — including the user interview context collected earlier. The prompt must include structured output requirements (Title, Category, Evidence/Why, Effort, Priority) and the user's constraints.
38
-
39
- b. Collect all document IDs.
40
-
41
- c. Spawn the `agestra:agestra-moderator` agent in **Independent Aggregation** mode:
42
- - Pass the **document ID list**.
43
- - Moderator reads each document via `workspace_read`.
44
- - Moderator classifies: consensus suggestions, unique ideas, disputed priorities.
45
- - Moderator creates an **aggregated document** via `workspace_create_document`.
46
- - The moderator's integrated document becomes the starting document.
47
-
48
- 2. Document review rounds (no max until all agree):
49
- a. Moderator sends the current document to each AI for review:
50
- - Claude: spawn `agestra:agestra-ideator` analyze document write section-by-section feedback
51
- - Other providers: `agent_debate_turn` with the document as prompt, requesting agree/disagree per section
52
- b. Moderator collects all feedback.
53
- c. Classify: agree/disagree per section per provider.
54
- d. Revise document incorporating disagreement feedback.
55
- e. If all providers agree on all sections → consensus reached.
56
- f. If not next round with revised document.
57
- g. **Every 10 rounds:** Ask the user via AskUserQuestion whether to continue or stop with current state.
58
-
59
- 3. Present the final document:
60
- - Consensus sections: marked as agreed
61
- - Disputed sections: show split positions with each provider's rationale
1
+ ---
2
+ description: "Discover improvements by comparing with similar projects and collecting feedback"
3
+ argument-hint: "[topic or project area]"
4
+ ---
5
+
6
+ You are executing the `/agestra idea` command.
7
+
8
+ **Topic:** $ARGUMENTS
9
+
10
+ ## Step 0: Setup preflight (MANDATORY)
11
+
12
+ Before anything else, call `setup_status`. If it reports `Current config: not found` (or the path exists but `setup_status` shows 0 detected providers with a missing-config note), **stop this command and run setup first**:
13
+
14
+ 1. Invoke the `agestra:setup` skill or route the user through `/agestra setup` inline — detect providers, ask for selection + locale, call `setup_apply`.
15
+ 2. After setup writes the config, resume this `/agestra idea` command **from Step 1**, preserving the original `$ARGUMENTS` topic. Do not ask the user to retype it.
16
+
17
+ Rationale: Agestra's path resolver uses a single plugin-scoped `providers.config.json` (`$CLAUDE_PLUGIN_ROOT/providers.config.json` or `~/.agestra/providers.config.json`). Without it, auto-detect silently enables whatever is installed — which has caused disabled providers to participate in past runs. Setup is the only sanctioned way to pick the active set.
18
+
19
+ ## Step 1: Determine topic
20
+
21
+ If `$ARGUMENTS` is empty, ask the user what area to explore using AskUserQuestion:
22
+ - "What area would you like to find improvements for? (feature area, project aspect, or general)"
23
+
24
+ ## Step 2: Check environment and select mode
25
+
26
+ Call `environment_check` to determine which providers and modes are available.
27
+
28
+ - If **no providers are available**: run the `agestra:agestra-ideator` agent directly (Claude only) with the topic as context. Skip to presenting the result.
29
+ - If **1+ providers are available**: proceed to 끝장토론 execution below.
30
+
31
+ Respect the providers list verbatim. A provider marked `Not found` or missing from `environment_check` MUST NOT be invoked (the `enabled:false` opt-out is honored at registration do not second-guess it).
32
+
33
+ ## Step 3: Execute 끝장토론
34
+
35
+ **팀 구성:** `agestra:agestra-moderator` (리더) + `agestra:agestra-ideator` (Claude) + `environment_check`가 Available로 보고한 외부 AI.
36
+
37
+ ### 3.1 Individual exploration (parallel, independent)
38
+
39
+ Every participant produces an independent analysis **without seeing anyone else's work yet**. Each result is saved as a separate document in `individual/`.
40
+
41
+ In parallel:
42
+ - Spawn the `agestra:agestra-ideator` agent for Claude's independent improvement research. After it completes, save its output via `workspace_create_document` with:
43
+ - **kind:** `"individual"`
44
+ - **title:** `Idea Exploration claude/ideator`
45
+ - **metadata:** `{ "Provider": "claude/ideator", "Task": "{topic}", "Mode": "Independent", "Round": "0" }`
46
+ - For each available external provider, call `ai_chat` with `save_as_document` using:
47
+ - **save_as_document.kind:** `"individual"`
48
+ - **save_as_document.title:** `Idea Exploration{provider}`
49
+ - **save_as_document.metadata:** `{ "Task": "{topic}", "Mode": "Independent", "Round": "0" }`
50
+ - **prompt:** The Mode A or Mode B prompt from the `agestra-idea` skill, including the user-interview context and the structured output requirements (Title, Category, Evidence, Description, Effort, Priority).
51
+
52
+ Collect every returned Document ID.
53
+
54
+ ### 3.2 Initial aggregation (Round 0 synthesis)
55
+
56
+ Spawn the `agestra:agestra-moderator` agent in **Independent Aggregation** mode:
57
+ - Pass the individual document ID list.
58
+ - Moderator reads each via `workspace_read`, classifies consensus / unique / disputed ideas.
59
+ - Moderator writes the aggregated document via `workspace_create_document` with:
60
+ - **kind:** `"debate"`
61
+ - **title:** `Aggregated Ideas {topic} Round 0`
62
+ - **metadata:** `{ "Task": "{topic}", "Mode": "Aggregated", "Round": "0" }`
63
+ - This aggregated doc is the **working document** that enters the round loop.
64
+
65
+ ### 3.3 Document review rounds (sequential, read-prior-before-comment)
66
+
67
+ **Goal:** each round lets every provider review the current working doc AND every earlier-in-round comment, so later providers can agree-and-defer instead of re-stating. This keeps the transcript compact and surfaces real disagreement.
68
+
69
+ Per round `N` (start at 1):
70
+
71
+ 1. **Freeze inputs**: gather the doc IDs the round will build on — the Round 0 aggregated doc plus every Round `N-1` review doc.
72
+
73
+ 2. **Sequential turns** — call providers one at a time (NOT in parallel). Order: external providers alphabetical first, Claude last. For each provider in turn:
74
+ a. Read every document produced so far in this round (prior participants' Round `N` reviews), by ID, via `workspace_read`. This is what lets a late-turn provider simply endorse an earlier opinion instead of repeating it.
75
+ b. Send the review prompt with **all** of: the working doc content, the Round 0 aggregated doc, prior reviews from this round, and the structured agree/disagree contract below.
76
+ c. Save this provider's round review via `workspace_create_document` with:
77
+ - **kind:** `"debate"`
78
+ - **title:** `Round {N} Review — {provider}`
79
+ - **metadata:** `{ "Task": "{topic}", "Round": "{N}", "Participant": "{provider}" }`
80
+
81
+ 3. **Review-prompt contract** (append to every round prompt):
82
+
83
+ > You are reviewing the current working document for Round {N}. Other participants (listed below) have already reviewed it this round — read their reviews first. Where you agree with an existing position, say so and move on; do NOT re-state the same argument. Where you disagree, say so and give a concrete alternative.
84
+ >
85
+ > End your review with a machine-parseable block:
86
+ >
87
+ > ```
88
+ > <round-votes>
89
+ > <item id="IDEA-01" stance="agree"/>
90
+ > <item id="IDEA-02" stance="agree-with-note" note="priority should be MEDIUM not HIGH"/>
91
+ > <item id="IDEA-03" stance="disagree" reason="conflicts with stated constraint X"/>
92
+ > <item id="IDEA-04" stance="defer-to-{earlier-provider}"/>
93
+ > </round-votes>
94
+ > ```
95
+ >
96
+ > `stance` is a closed set: `agree | agree-with-note | disagree | defer-to-<providerId>`. One `<item>` per idea in the working doc. Use the idea IDs from the working doc verbatim.
97
+
98
+ 4. **Round wrap-up**: After every provider has taken its turn, the moderator revises the working doc:
99
+ - Apply changes for `agree-with-note` items the moderator judges well-reasoned.
100
+ - Mark `disagree` items as Disputed with both positions.
101
+ - Record every `defer-to` so the final doc can show endorsement chains.
102
+
103
+ 5. **Consensus check**:
104
+ - If every `<round-votes>` block for this round has no `disagree` on any item AND no open `agree-with-note` that wasn't applied → consensus reached. Go to 3.4.
105
+ - Else → next round with the revised working doc.
106
+ - **Every 10 rounds**: call `AskUserQuestion` offering `continue`, `stop with current state`, or `escalate split positions`.
107
+
108
+ ### 3.4 Final consensus document
109
+
110
+ Write the final document via `workspace_create_document` with:
111
+ - **kind:** `"synthesis"`
112
+ - **title:** `Final — {topic} — Consensus`
113
+ - **metadata:** `{ "Task": "{topic}", "Mode": "Final Consensus", "Rounds": "{N}", "Participants": "{comma-separated}" }`
114
+ - **content:** Use the **Final Consensus Format** defined in the `agestra:agestra-moderator` agent's `<Final_Consensus_Format>` section — explicit per-idea stance table, expanded reasoning in prose (not tables-only), a clear "동의 현황" summary so the reader can see at a glance who agreed and who pushed back.
115
+
116
+ ### 3.5 Present to the user
117
+
118
+ - Start by naming the final document ID and its path.
119
+ - Show the per-idea stance summary in chat.
120
+ - List each disputed item with the dissenter's rationale verbatim.
@@ -7,6 +7,15 @@ You are executing the `/agestra implement` command.
7
7
 
8
8
  **Task:** $ARGUMENTS
9
9
 
10
+ ## Step 0: Setup preflight (MANDATORY)
11
+
12
+ Before anything else, call `setup_status`. If it reports `Current config: not found`, **stop this command and run setup first**:
13
+
14
+ 1. Invoke the `agestra:setup` skill (or `/agestra setup` inline) — provider detection, selection, locale, `setup_apply`.
15
+ 2. After the config is written, resume this `/agestra implement` command **from Step 1**, preserving `$ARGUMENTS`. Do not ask the user to retype.
16
+
17
+ Agestra uses a single plugin-scoped `providers.config.json`. No config → no sanctioned provider set → setup is the only correct starting point.
18
+
10
19
  ## Step 1: Determine implementation target
11
20
 
12
21
  If `$ARGUMENTS` is empty, ask the user:
@@ -1,111 +1,120 @@
1
- ---
2
- description: "Review code quality, security, and integration completeness"
3
- argument-hint: "[target file, directory, or description]"
4
- ---
5
-
6
- You are executing the `/agestra review` command.
7
-
8
- **Target:** $ARGUMENTS
9
-
10
- ## Step 1: Determine review scope
11
-
12
- If `$ARGUMENTS` is provided, use it as the review target and skip the scope question.
13
-
14
- If `$ARGUMENTS` is empty, ask the user using AskUserQuestion (in the user's language):
15
-
16
- | Option | Description |
17
- |--------|-------------|
18
- | **전체 프로젝트** | 프로젝트 전체를 리뷰 |
19
- | **일부 지정** | 특정 파일, 디렉토리, 또는 영역을 지정하여 리뷰 |
20
-
21
- - If **"전체 프로젝트"**: set target to the project root.
22
- - If **"일부 지정"**: ask a follow-up "What would you like to review? (file path, directory, or description)" and use the answer as the target.
23
-
24
- ## Step 2: Choose review focus areas
25
-
26
- Ask the user what to focus on using AskUserQuestion with **multiSelect: true** (in the user's language):
27
-
28
- | Option | Description |
29
- |--------|-------------|
30
- | **전체 점검** | 아래 모든 항목을 점검 |
31
- | **보안 취약점** | OWASP top 10 (인젝션, 인증, XSS ) |
32
- | **하드코딩** | 매직넘버, 하드코딩된 URL, 임베디드 자격증명 |
33
- | **중복 코드** | 반복되는 로직, 복사-붙여넣기 코드 |
34
- | **레거시 코드** | 더 이상 사용되지 않는 코드, 고아 시스템, 데드 코드 |
35
- | **스파게티 코드** | 과도한 복잡성, 함수, 깊은 중첩, 얽힌 의존성 |
36
- | **테스트 커버리지** | 테스트 없는 공개 함수, 엣지케이스 미커버 |
37
- | **i18n** | 번역 함수 없이 하드코딩된 UI 문자열 (i18n 시스템이 있는 경우만) |
38
- | **스펙 불일치** | 설계 문서와 실제 구현의 차이 |
39
-
40
- - If **"전체 점검"** is selected: use all focus areas.
41
- - If specific items are selected: use only those areas.
42
- - If **"Other"**: use the user's custom focus description.
43
-
44
- Pass the selected focus areas to all reviewers (agent and external AIs) as part of the review instructions.
45
-
46
- ## Step 3: Check environment and select mode
47
-
48
- Call `environment_check` to determine which providers and modes are available.
49
-
50
- - If **no providers are available**: run the `agestra:agestra-reviewer` agent directly (Claude only) with the target and selected focus areas as context. Skip to presenting the result.
51
- - If **1+ providers are available**: proceed to 끝장토론 execution below.
52
-
53
- ## Step 4: Execute 끝장토론
54
-
55
- ### Execution discipline
56
-
57
- - Prefer Agestra MCP tools for external providers (`ai_chat`, `ai_analyze_files`, `agent_debate_*`, `workspace_*`, `cli_job_submit` when a direct provider retry is needed).
58
- - Do NOT launch raw Bash retries such as `codex exec ...` or `gemini ...` yourself, and do NOT invent provider-specific flags. If a retry is required, use `cli_job_submit` with the provider's default mapping unless you have just verified the current CLI help output in this environment.
59
- - Exclude `ollama` from review workflows even if it is available. For repository/code reviews, use only review-capable external providers such as `gemini`, `codex`, and registered Claude-backed reviewers.
60
- - Treat the Claude reviewer agent as asynchronous work that may legitimately take several minutes. Poll about once per minute; an empty or slowly growing output file is not a failure by itself.
61
- - Do NOT stop or replace the Claude reviewer with a duplicate main-thread review unless there is an explicit error, the user asks to cancel, or there has been no visible progress for at least 8 minutes. For large review scopes, allow up to 15 minutes before declaring the reviewer stalled.
62
- - If a background reviewer is still running, tell the user you are waiting and continue the orchestration. Do not short-circuit the workflow just because another provider finished earlier.
63
- - Use the turn-based flow (`agent_debate_create` + iterative `agent_debate_review` / `agent_debate_turn` + `agent_debate_conclude`) or the approval-gated flow (`agent_debate_structured` + `agent_debate_approve`/`_continue`/`_reject`) so long-running review rounds do not get cut off by host tool-call time limits.
64
-
65
- **팀 구성:** `agestra:agestra-moderator` (리더) + `agestra:agestra-reviewer` (Claude) + 리뷰용 외부 AI (`gemini`, `codex`, 등록된 Claude-backed reviewer 등; `ollama` 제외)
66
-
67
- 1. Independent work + initial aggregation:
68
-
69
- a. In parallel:
70
- - Spawn the `agestra:agestra-reviewer` agent for Claude's independent analysis.
71
- After the agent completes, save Claude's result as a document via `workspace_create_document`:
72
- - **title:** `Code Review claude/reviewer`
73
- - **metadata:** `{ "Provider": "claude/reviewer", "Task": "{review target}", "Focus": "{selected focus areas}", "Mode": "Independent" }`
74
- - **content:** The reviewer agent's full output.
75
- - For each available provider, call `ai_chat` with `save_as_document` to let each AI produce its own document directly:
76
- - **save_as_document.title:** `Code Review {provider}`
77
- - **save_as_document.metadata:** `{ "Task": "{review target}", "Focus": "{selected focus areas}", "Mode": "Independent" }`
78
- - **prompt:**
79
-
80
- > Review the following code. Focus on: [selected focus areas].
81
- > For each finding, provide severity (CRITICAL/HIGH/MEDIUM/LOW), file:line location, and evidence.
82
- >
83
- > Target: [the review target]
84
-
85
- b. Collect all document IDs.
86
-
87
- c. Spawn the `agestra:agestra-moderator` agent in **Independent Aggregation** mode:
88
- - Pass the **document ID list**.
89
- - Moderator reads each document via `workspace_read`.
90
- - Moderator classifies: consensus findings, unique findings, disputed points.
91
- - Moderator creates an **aggregated document** via `workspace_create_document`.
92
- - The moderator's integrated document becomes the starting document.
93
-
94
- 2. Start a turn-based debate session with `agent_debate_create`.
95
- - Use the integrated document's title/topic as the debate topic.
96
- - Reuse the same reviewer set from step 1, excluding `ollama`.
97
-
98
- 3. Document review rounds (no max — until all agree):
99
- a. Moderator sends the current document to Claude reviewer asynchronously.
100
- b. Moderator sends the same current document to non-Claude providers with `agent_debate_review`.
101
- c. Moderator collects all feedback and updates the working document.
102
- d. If a provider needs a follow-up reply to another provider's point, add a targeted `agent_debate_turn` in the same debate session rather than restarting the workflow.
103
- e. If all providers agree on all sections → consensus reached.
104
- f. If not next round with the revised document.
105
- g. **Every 10 rounds:** Ask the user via AskUserQuestion whether to continue or stop with current state.
106
-
107
- 4. When consensus is reached, record the moderator's final synthesis with `agent_debate_conclude`.
108
-
109
- 5. Present the final document:
110
- - Consensus sections: marked as agreed
111
- - Disputed sections: show split positions with each provider's rationale
1
+ ---
2
+ description: "Review code quality, security, and integration completeness"
3
+ argument-hint: "[target file, directory, or description]"
4
+ ---
5
+
6
+ You are executing the `/agestra review` command.
7
+
8
+ **Target:** $ARGUMENTS
9
+
10
+ ## Step 0: Setup preflight (MANDATORY)
11
+
12
+ Before anything else, call `setup_status`. If it reports `Current config: not found`, **stop this command and run setup first**:
13
+
14
+ 1. Invoke the `agestra:setup` skill (or `/agestra setup` inline) provider detection, selection, locale, `setup_apply`.
15
+ 2. After the config is written, resume this `/agestra review` command **from Step 1**, preserving `$ARGUMENTS`. Do not ask the user to retype.
16
+
17
+ Agestra uses a single plugin-scoped `providers.config.json`. No config → no sanctioned provider set → setup is the only correct starting point.
18
+
19
+ ## Step 1: Determine review scope
20
+
21
+ If `$ARGUMENTS` is provided, use it as the review target and skip the scope question.
22
+
23
+ If `$ARGUMENTS` is empty, ask the user using AskUserQuestion (in the user's language):
24
+
25
+ | Option | Description |
26
+ |--------|-------------|
27
+ | **전체 프로젝트** | 프로젝트 전체를 리뷰 |
28
+ | **일부 지정** | 특정 파일, 디렉토리, 또는 영역을 지정하여 리뷰 |
29
+
30
+ - If **"전체 프로젝트"**: set target to the project root.
31
+ - If **"일부 지정"**: ask a follow-up "What would you like to review? (file path, directory, or description)" and use the answer as the target.
32
+
33
+ ## Step 2: Choose review focus areas
34
+
35
+ Ask the user what to focus on using AskUserQuestion with **multiSelect: true** (in the user's language):
36
+
37
+ | Option | Description |
38
+ |--------|-------------|
39
+ | **전체 점검** | 아래 모든 항목을 점검 |
40
+ | **보안 취약점** | OWASP top 10 (인젝션, 인증, XSS 등) |
41
+ | **하드코딩** | 매직넘버, 하드코딩된 URL, 임베디드 자격증명 |
42
+ | **중복 코드** | 반복되는 로직, 복사-붙여넣기 코드 |
43
+ | **레거시 코드** | 더 이상 사용되지 않는 코드, 고아 시스템, 데드 코드 |
44
+ | **스파게티 코드** | 과도한 복잡성, 함수, 깊은 중첩, 얽힌 의존성 |
45
+ | **테스트 커버리지** | 테스트 없는 공개 함수, 엣지케이스 미커버 |
46
+ | **i18n** | 번역 함수 없이 하드코딩된 UI 문자열 (i18n 시스템이 있는 경우만) |
47
+ | **스펙 불일치** | 설계 문서와 실제 구현의 차이 |
48
+
49
+ - If **"전체 점검"** is selected: use all focus areas.
50
+ - If specific items are selected: use only those areas.
51
+ - If **"Other"**: use the user's custom focus description.
52
+
53
+ Pass the selected focus areas to all reviewers (agent and external AIs) as part of the review instructions.
54
+
55
+ ## Step 3: Check environment and select mode
56
+
57
+ Call `environment_check` to determine which providers and modes are available.
58
+
59
+ - If **no providers are available**: run the `agestra:agestra-reviewer` agent directly (Claude only) with the target and selected focus areas as context. Skip to presenting the result.
60
+ - If **1+ providers are available**: proceed to 끝장토론 execution below.
61
+
62
+ ## Step 4: Execute 끝장토론
63
+
64
+ ### Execution discipline
65
+
66
+ - Prefer Agestra MCP tools for external providers (`ai_chat`, `ai_analyze_files`, `agent_debate_*`, `workspace_*`, `cli_job_submit` when a direct provider retry is needed).
67
+ - Do NOT launch raw Bash retries such as `codex exec ...` or `gemini ...` yourself, and do NOT invent provider-specific flags. If a retry is required, use `cli_job_submit` with the provider's default mapping unless you have just verified the current CLI help output in this environment.
68
+ - Exclude `ollama` from review workflows even if it is available. For repository/code reviews, use only review-capable external providers such as `gemini`, `codex`, and registered Claude-backed reviewers.
69
+ - Treat the Claude reviewer agent as asynchronous work that may legitimately take several minutes. Poll about once per minute; an empty or slowly growing output file is not a failure by itself.
70
+ - Do NOT stop or replace the Claude reviewer with a duplicate main-thread review unless there is an explicit error, the user asks to cancel, or there has been no visible progress for at least 8 minutes. For large review scopes, allow up to 15 minutes before declaring the reviewer stalled.
71
+ - If a background reviewer is still running, tell the user you are waiting and continue the orchestration. Do not short-circuit the workflow just because another provider finished earlier.
72
+ - Use the turn-based flow (`agent_debate_create` + iterative `agent_debate_review` / `agent_debate_turn` + `agent_debate_conclude`) or the approval-gated flow (`agent_debate_structured` + `agent_debate_approve`/`_continue`/`_reject`) so long-running review rounds do not get cut off by host tool-call time limits.
73
+
74
+ **팀 구성:** `agestra:agestra-moderator` (리더) + `agestra:agestra-reviewer` (Claude) + 리뷰용 외부 AI (`gemini`, `codex`, 등록된 Claude-backed reviewer 등; `ollama` 제외)
75
+
76
+ 1. Independent work + initial aggregation:
77
+
78
+ a. In parallel:
79
+ - Spawn the `agestra:agestra-reviewer` agent for Claude's independent analysis.
80
+ After the agent completes, save Claude's result as a document via `workspace_create_document`:
81
+ - **title:** `Code Review claude/reviewer`
82
+ - **metadata:** `{ "Provider": "claude/reviewer", "Task": "{review target}", "Focus": "{selected focus areas}", "Mode": "Independent" }`
83
+ - **content:** The reviewer agent's full output.
84
+ - For each available provider, call `ai_chat` with `save_as_document` to let each AI produce its own document directly:
85
+ - **save_as_document.title:** `Code Review {provider}`
86
+ - **save_as_document.metadata:** `{ "Task": "{review target}", "Focus": "{selected focus areas}", "Mode": "Independent" }`
87
+ - **prompt:**
88
+
89
+ > Review the following code. Focus on: [selected focus areas].
90
+ > For each finding, provide severity (CRITICAL/HIGH/MEDIUM/LOW), file:line location, and evidence.
91
+ >
92
+ > Target: [the review target]
93
+
94
+ b. Collect all document IDs.
95
+
96
+ c. Spawn the `agestra:agestra-moderator` agent in **Independent Aggregation** mode:
97
+ - Pass the **document ID list**.
98
+ - Moderator reads each document via `workspace_read`.
99
+ - Moderator classifies: consensus findings, unique findings, disputed points.
100
+ - Moderator creates an **aggregated document** via `workspace_create_document`.
101
+ - The moderator's integrated document becomes the starting document.
102
+
103
+ 2. Start a turn-based debate session with `agent_debate_create`.
104
+ - Use the integrated document's title/topic as the debate topic.
105
+ - Reuse the same reviewer set from step 1, excluding `ollama`.
106
+
107
+ 3. Document review rounds (no max until all agree):
108
+ a. Moderator sends the current document to Claude reviewer asynchronously.
109
+ b. Moderator sends the same current document to non-Claude providers with `agent_debate_review`.
110
+ c. Moderator collects all feedback and updates the working document.
111
+ d. If a provider needs a follow-up reply to another provider's point, add a targeted `agent_debate_turn` in the same debate session rather than restarting the workflow.
112
+ e. If all providers agree on all sections → consensus reached.
113
+ f. If not → next round with the revised document.
114
+ g. **Every 10 rounds:** Ask the user via AskUserQuestion whether to continue or stop with current state.
115
+
116
+ 4. When consensus is reached, record the moderator's final synthesis with `agent_debate_conclude`.
117
+
118
+ 5. Present the final document:
119
+ - Consensus sections: marked as agreed
120
+ - Disputed sections: show split positions with each provider's rationale
@@ -0,0 +1,71 @@
1
+ ---
2
+ description: "Select AI providers and UI language for Agestra workflows"
3
+ argument-hint: ""
4
+ ---
5
+
6
+ You are executing the `/agestra setup` command.
7
+
8
+ ## Step 1: Inspect current state
9
+
10
+ Call these tools first:
11
+ - `environment_check`
12
+ - `provider_list`
13
+ - `setup_status`
14
+
15
+ Use the results to identify:
16
+ - which providers are currently available
17
+ - which providers are already enabled in `providers.config.json`
18
+ - which locale is currently configured
19
+
20
+ ## Step 2: Handle the no-provider case
21
+
22
+ If `setup_status` shows that no providers are detected:
23
+ - Explain this in the user's language.
24
+ - Briefly tell the user they need to install at least one supported provider (Ollama, Gemini CLI, Codex CLI, or Claude CLI).
25
+ - Stop without calling `setup_apply`.
26
+
27
+ ## Step 3: Ask for provider selection
28
+
29
+ Use AskUserQuestion with **multiSelect: true** in the user's language.
30
+
31
+ Present one option per currently available provider from `setup_status`.
32
+ - Label: provider ID (`ollama`, `gemini`, `codex`, `claude-cli`, etc.)
33
+ - Description: short capability hint from `provider_list`
34
+
35
+ Guidance:
36
+ - If one or more providers are already enabled, pre-select them conceptually in your reasoning.
37
+ - Recommend enabling at least one external provider.
38
+ - If the user wants Claude-only operation, allow an empty selection only if they explicitly ask for it. Otherwise prefer at least one enabled provider.
39
+
40
+ ## Step 4: Ask for language
41
+
42
+ Use AskUserQuestion in the user's language with these choices:
43
+
44
+ | Option | Description |
45
+ |--------|-------------|
46
+ | **한국어** | Korean UI / moderator text |
47
+ | **English** | English UI / moderator text |
48
+ | **日本語** | Japanese UI / moderator text |
49
+ | **中文** | Chinese UI / moderator text |
50
+
51
+ Map these to locale codes:
52
+ - `한국어` → `ko`
53
+ - `English` → `en`
54
+ - `日本語` → `ja`
55
+ - `中文` → `zh`
56
+
57
+ ## Step 5: Apply setup
58
+
59
+ Call `setup_apply` with:
60
+ - `enabled_providers`: the selected provider IDs
61
+ - `locale`: the selected locale code
62
+ - `selection_policy`: `default-only`
63
+
64
+ ## Step 6: Report result
65
+
66
+ Respond in the user's language with:
67
+ - enabled providers
68
+ - selected language
69
+ - the path to `providers.config.json`
70
+
71
+ If the user changed providers, mention that future Agestra workflows will use the new setup on the next run/read of config.