agestra 4.12.2 → 4.12.4

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agestra",
3
- "version": "4.12.2",
3
+ "version": "4.12.4",
4
4
  "description": "Multi-host AI orchestration toolkit for Claude Code, Codex CLI, and Gemini CLI",
5
5
  "type": "module",
6
6
  "packageManager": "npm@11.11.0",
@@ -34,7 +34,8 @@
34
34
  "test": "turbo test && npm run test:host-assets",
35
35
  "test:host-assets": "vitest run scripts/__tests__",
36
36
  "dev": "turbo dev",
37
- "lint": "turbo lint",
37
+ "lint": "npm run lint:root && turbo lint",
38
+ "lint:root": "eslint \"scripts/**/*.mjs\"",
38
39
  "clean": "turbo clean",
39
40
  "prebundle": "npm run sync:metadata",
40
41
  "bundle": "node scripts/bundle.mjs",
package/skills/design.md CHANGED
@@ -98,6 +98,7 @@ Every generated artifact has a fixed role:
98
98
  The JSON consensus ledger is the source of truth. Markdown is a readable artifact only. Do not parse generated Markdown as state and do not hand-edit it to change provider stances, item status, or consensus state.
99
99
 
100
100
  1. Start an approval-gated structured debate with `agent_debate_structured`.
101
+ - **mode:** use `"idea"` for exploratory architecture/design option discovery. Use `"review"` only when reviewing an already-written design artifact.
101
102
  - **topic:** the design subject.
102
103
  - **participants:** only providers reported available by `environment_check` / `provider_list`, plus the host design specialist when the engine supports it.
103
104
  - **scope:** the design subject, user constraints, relevant code areas, and any related existing design docs.
package/skills/idea.md CHANGED
@@ -111,8 +111,8 @@ The `ai_chat` prompt for external providers differs by mode. Use the interview a
111
111
  - For each available external provider, call `ai_chat` with `save_as_document`:
112
112
  - **save_as_document.kind:** `"individual"`
113
113
  - **save_as_document.title:** `Idea Exploration — {provider}`
114
- - **save_as_document.metadata:** `{ "Task": "{topic}", "Mode": "Independent", "Round": "0" }`
115
- - **prompt:** Use the Mode A or Mode B prompt below.
114
+ - **save_as_document.metadata:** `{ "Provider": "{provider}", "Task": "{topic}", "Mode": "Independent", "Round": "0" }`
115
+ - **prompt:** Use the Mode A or Mode B prompt below. The response must include a `<proposals>` block. Each idea is an `<item>` with `id`, `title`, `severity`, and optional `location`; put category, evidence, effort, and priority in the item body.
116
116
 
117
117
  **Mode A prompt for external providers:**
118
118
 
@@ -189,39 +189,28 @@ The `ai_chat` prompt for external providers differs by mode. Use the interview a
189
189
  - **title:** `Aggregated Ideas — {topic} — Round 0`
190
190
  - **metadata:** `{ "Task": "{topic}", "Mode": "Aggregated", "Round": "0" }`
191
191
 
192
- 2. Sequential round-based review (no max — until all agree):
192
+ 2. Start the approval-gated structured consensus flow.
193
193
 
194
- For each round `N` starting at 1:
194
+ Call `agent_debate_structured` with:
195
+ - **mode:** `"idea"`.
196
+ - **topic:** the user's idea-discovery topic.
197
+ - **participants:** providers reported Available by `environment_check`, plus the host ideator when supported.
198
+ - **source_documents:** optional; use only when step 1 created individual documents, and pass `{ "document_id": "...", "provider": "..." }` for each document.
199
+ - **leader:** the current host/leader identity when known.
195
200
 
196
- a. **Turn order**: external providers alphabetical first, host specialist last when present. This lets the host specialist respond to everyone; more importantly, it lets later providers **read earlier providers' Round N reviews** and either endorse or dissent instead of repeating arguments.
201
+ The MCP moderator engine extracts proposals, assigns stable `ITEM-*` IDs, sends JSON-only turn packets, validates `{ provider, round, items }` responses, persists `{sessionId}.consensus.json`, and regenerates the debate Markdown from the ledger.
197
202
 
198
- b. For each provider in order:
199
- - Read the working doc (Round 0 aggregated or the revised doc from Round `N-1`).
200
- - Read every Round `N` review already written by earlier providers this round (via `workspace_read`).
201
- - Send the review prompt including the `<round-votes>` contract described in the `agestra:agestra-moderator` agent's `<Workflow_Document_Review_Round>` section.
202
- - Save the reply via `workspace_create_document` with:
203
- - **kind:** `"debate"`
204
- - **title:** `Round {N} Review — {provider}`
205
- - **metadata:** `{ "Task": "{topic}", "Round": "{N}", "Participant": "{provider}" }`
203
+ 3. Use the approval gate.
206
204
 
207
- c. After all providers finish Round `N`, the moderator revises the working doc, marks any unresolved disagreement as Disputed, and decides whether to continue.
205
+ Poll `agent_debate_status` until `ready-for-approval`, `escalated`, or `error`:
206
+ - If `ready-for-approval`, call `agent_debate_approve` to write the final synthesis.
207
+ - If `escalated` or more discussion is needed, call `agent_debate_continue` with 3, 5, or 10 additional rounds.
208
+ - If the result should be closed without synthesis, call `agent_debate_reject`.
208
209
 
209
- d. If every `<round-votes>` block for Round `N` has zero `disagree` and the moderator has absorbed every `agree-with-note` → consensus reached. Proceed to step 3.
210
-
211
- e. Otherwise Round `N+1` with the revised doc.
212
-
213
- f. **Every 10 rounds**: call `AskUserQuestion` to offer `continue`, `stop with current state`, or `escalate split positions`.
214
-
215
- 3. When consensus (or user-approved stop) is reached, write the final document via `workspace_create_document` with:
216
- - **kind:** `"synthesis"`
217
- - **title:** `Final — {topic} — Consensus`
218
- - **metadata:** `{ "Task": "{topic}", "Mode": "Final Consensus", "Rounds": "{N}", "Participants": "{...}" }`
219
- - **content:** Use the `<Final_Consensus_Format>` template from the `agestra:agestra-moderator` agent — per-idea stance matrix, expanded reasoning, clear 동의 현황 summary.
220
-
221
- 4. Present the final document to the user:
222
- - Name the final doc ID and path.
223
- - Echo the per-idea stance matrix.
224
- - For each Disputed item, show the dissenter's rationale verbatim.
210
+ 4. Present the final result to the user:
211
+ - Name the debate Markdown path, consensus JSON ledger path, and synthesis path if approved.
212
+ - Echo the per-idea consensus table.
213
+ - Explain accepted, excluded, and disputed items in plain language.
225
214
 
226
215
  ### Phase 4: Research (Leader-host-only mode)
227
216
 
package/skills/review.md CHANGED
@@ -75,13 +75,15 @@ Call `environment_check` to determine available providers.
75
75
  a. In parallel:
76
76
  - Spawn the `agestra:agestra-reviewer` agent for host-local independent analysis.
77
77
  After the agent completes, save the host reviewer's result as a document via `workspace_create_document`:
78
+ - **kind:** `"individual"`
78
79
  - **title:** `Code Review — host/reviewer`
79
- - **metadata:** `{ "Provider": "host/reviewer", "Task": "{review target}", "Focus": "{selected focus areas}", "Mode": "Independent" }`
80
+ - **metadata:** `{ "Provider": "host/reviewer", "Task": "{review target}", "Focus": "{selected focus areas}", "Mode": "Independent", "Round": "0" }`
80
81
  - **content:** The reviewer agent's full output.
81
82
  - For each available provider, call `ai_chat` with `save_as_document`:
83
+ - **save_as_document.kind:** `"individual"`
82
84
  - **save_as_document.title:** `Code Review — {provider}`
83
- - **save_as_document.metadata:** `{ "Task": "{review target}", "Focus": "{selected focus areas}", "Mode": "Independent" }`
84
- - **prompt:** Review the following code. Focus on: [selected focus areas]. For each finding, provide severity (CRITICAL/HIGH/MEDIUM/LOW), file:line location, and evidence. Target: [the review target]
85
+ - **save_as_document.metadata:** `{ "Provider": "{provider}", "Task": "{review target}", "Focus": "{selected focus areas}", "Mode": "Independent", "Round": "0" }`
86
+ - **prompt:** Review the following code. Focus on: [selected focus areas]. For each finding, provide severity (CRITICAL/HIGH/MEDIUM/LOW), file:line location, and evidence. Include a `<proposals>` block where each finding is an `<item>` with `id`, `title`, `severity`, and `location`; put the evidence and impact in the item body. Target: [the review target]
85
87
 
86
88
  b. Collect all document IDs.
87
89
 
@@ -92,9 +94,11 @@ Call `environment_check` to determine available providers.
92
94
  - The moderator's integrated document becomes the starting document.
93
95
 
94
96
  2. Start a structured debate session with `agent_debate_structured`.
95
- - Use the integrated document's title/topic as the debate topic.
96
- - Reuse the same reviewer set from step 1, excluding `ollama`.
97
- - Pass the independent document IDs as source context when available.
97
+ - **mode:** `"review"`.
98
+ - **topic:** the review target and selected focus summary.
99
+ - **participants:** the same reviewer set from step 1, excluding `ollama`.
100
+ - **source_documents:** optional; use only when step 1 created individual documents, and pass `{ "document_id": "...", "provider": "..." }` for each document.
101
+ - **leader:** the current host/leader identity when known.
98
102
 
99
103
  3. Let the MCP moderator engine run the consensus loop.
100
104
  - The engine assigns stable `ITEM-*` IDs, builds `{sessionId}.consensus.json`, and sends each provider a JSON turn packet.