ai-consultants 2.10.1
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/.claude/commands/ai-consultants:consult.md +94 -0
- package/.claude/commands/ai-consultants:debate.md +103 -0
- package/.claude/commands/ai-consultants:help.md +30 -0
- package/CLAUDE.md +839 -0
- package/LICENSE +21 -0
- package/README.md +758 -0
- package/SKILL.md +156 -0
- package/bin/ai-consultants +96 -0
- package/docs/COST_RATES.md +172 -0
- package/docs/JSON_SCHEMA.md +305 -0
- package/docs/SETUP.md +879 -0
- package/docs/SMART_ROUTING.md +219 -0
- package/docs/cost_rates.json +143 -0
- package/package.json +47 -0
- package/references/configuration.md +141 -0
- package/references/details.md +60 -0
- package/scripts/build_context.sh +562 -0
- package/scripts/classify_question.sh +148 -0
- package/scripts/config.sh +753 -0
- package/scripts/configure.sh +1093 -0
- package/scripts/consult_all.sh +934 -0
- package/scripts/debate_round.sh +421 -0
- package/scripts/doctor.sh +642 -0
- package/scripts/followup.sh +197 -0
- package/scripts/install.sh +319 -0
- package/scripts/lib/api.sh +640 -0
- package/scripts/lib/api_query.sh +228 -0
- package/scripts/lib/cache.sh +338 -0
- package/scripts/lib/chunking.sh +880 -0
- package/scripts/lib/code_optimizer.sh +671 -0
- package/scripts/lib/common.sh +1088 -0
- package/scripts/lib/costs.sh +674 -0
- package/scripts/lib/personas.sh +372 -0
- package/scripts/lib/progress.sh +251 -0
- package/scripts/lib/reflection.sh +447 -0
- package/scripts/lib/routing.sh +566 -0
- package/scripts/lib/schema.json +165 -0
- package/scripts/lib/session.sh +327 -0
- package/scripts/lib/symbol_map.sh +445 -0
- package/scripts/lib/voting.sh +495 -0
- package/scripts/peer_review.sh +460 -0
- package/scripts/preflight_check.sh +452 -0
- package/scripts/query_aider.sh +83 -0
- package/scripts/query_amp.sh +67 -0
- package/scripts/query_claude.sh +99 -0
- package/scripts/query_codex.sh +92 -0
- package/scripts/query_cursor.sh +72 -0
- package/scripts/query_deepseek.sh +17 -0
- package/scripts/query_gemini.sh +85 -0
- package/scripts/query_glm.sh +17 -0
- package/scripts/query_grok.sh +17 -0
- package/scripts/query_kilo.sh +140 -0
- package/scripts/query_kimi.sh +67 -0
- package/scripts/query_minimax.sh +17 -0
- package/scripts/query_mistral.sh +97 -0
- package/scripts/query_ollama.sh +328 -0
- package/scripts/query_qwen3.sh +93 -0
- package/scripts/setup_wizard.sh +367 -0
- package/scripts/skillport-install.sh +196 -0
- package/scripts/synthesize.sh +332 -0
- package/templates/consultation_report.md +323 -0
- package/templates/synthesis_prompt.md +120 -0
|
@@ -0,0 +1,305 @@
|
|
|
1
|
+
# JSON Schema - AI Consultants v2.10
|
|
2
|
+
|
|
3
|
+
This document describes the JSON schema used for consultant responses.
|
|
4
|
+
|
|
5
|
+
## Complete Schema
|
|
6
|
+
|
|
7
|
+
The schema is defined in `scripts/lib/schema.json` following JSON Schema Draft-07.
|
|
8
|
+
|
|
9
|
+
## Response Structure
|
|
10
|
+
|
|
11
|
+
```json
|
|
12
|
+
{
|
|
13
|
+
"consultant": "Gemini",
|
|
14
|
+
"model": "gemini-3.1-pro-preview",
|
|
15
|
+
"persona": "The Architect",
|
|
16
|
+
"response": {
|
|
17
|
+
"summary": "TL;DR in 2-3 sentences (max 500 characters)",
|
|
18
|
+
"detailed": "Complete and detailed response",
|
|
19
|
+
"approach": "Name of the proposed approach",
|
|
20
|
+
"code_snippets": [...],
|
|
21
|
+
"pros": [...],
|
|
22
|
+
"cons": [...],
|
|
23
|
+
"alternatives": [...],
|
|
24
|
+
"caveats": [...],
|
|
25
|
+
"references": [...]
|
|
26
|
+
},
|
|
27
|
+
"confidence": {
|
|
28
|
+
"score": 8,
|
|
29
|
+
"reasoning": "Reasoning for the score",
|
|
30
|
+
"uncertainty_factors": [...]
|
|
31
|
+
},
|
|
32
|
+
"debate": {...},
|
|
33
|
+
"metadata": {
|
|
34
|
+
"tokens_used": 1500,
|
|
35
|
+
"latency_ms": 2345,
|
|
36
|
+
"model_version": "gemini-3.1-pro-preview",
|
|
37
|
+
"timestamp": "2024-01-14T12:34:56Z"
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## Required Fields
|
|
43
|
+
|
|
44
|
+
| Field | Type | Description |
|
|
45
|
+
|-------|------|-------------|
|
|
46
|
+
| `consultant` | string | Consultant name |
|
|
47
|
+
| `response` | object | Response object |
|
|
48
|
+
| `response.summary` | string | TL;DR (max 500 char) |
|
|
49
|
+
| `response.detailed` | string | Complete response |
|
|
50
|
+
| `response.approach` | string | Approach name |
|
|
51
|
+
| `confidence` | object | Confidence object |
|
|
52
|
+
| `confidence.score` | integer | Score 1-10 |
|
|
53
|
+
| `confidence.reasoning` | string | Reasoning |
|
|
54
|
+
| `metadata` | object | Response metadata |
|
|
55
|
+
|
|
56
|
+
## Optional Fields
|
|
57
|
+
|
|
58
|
+
### response.code_snippets
|
|
59
|
+
|
|
60
|
+
Array of code snippets:
|
|
61
|
+
|
|
62
|
+
```json
|
|
63
|
+
{
|
|
64
|
+
"code_snippets": [
|
|
65
|
+
{
|
|
66
|
+
"language": "python",
|
|
67
|
+
"code": "def hello():\n print('Hello')",
|
|
68
|
+
"description": "Example function"
|
|
69
|
+
}
|
|
70
|
+
]
|
|
71
|
+
}
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
### response.pros / response.cons
|
|
75
|
+
|
|
76
|
+
Array of advantages and disadvantages:
|
|
77
|
+
|
|
78
|
+
```json
|
|
79
|
+
{
|
|
80
|
+
"pros": [
|
|
81
|
+
"Simple to implement",
|
|
82
|
+
"Excellent performance"
|
|
83
|
+
],
|
|
84
|
+
"cons": [
|
|
85
|
+
"Requires more memory",
|
|
86
|
+
"Maintenance complexity"
|
|
87
|
+
]
|
|
88
|
+
}
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
### response.alternatives
|
|
92
|
+
|
|
93
|
+
Array of considered alternatives:
|
|
94
|
+
|
|
95
|
+
```json
|
|
96
|
+
{
|
|
97
|
+
"alternatives": [
|
|
98
|
+
{
|
|
99
|
+
"name": "Approach B",
|
|
100
|
+
"reason_not_chosen": "Greater complexity without significant benefits"
|
|
101
|
+
}
|
|
102
|
+
]
|
|
103
|
+
}
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
### response.caveats
|
|
107
|
+
|
|
108
|
+
Array of assumptions or limitations:
|
|
109
|
+
|
|
110
|
+
```json
|
|
111
|
+
{
|
|
112
|
+
"caveats": [
|
|
113
|
+
"Assumes Python 3.8+",
|
|
114
|
+
"Not tested on Windows"
|
|
115
|
+
]
|
|
116
|
+
}
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
### response.references
|
|
120
|
+
|
|
121
|
+
Array of links or references:
|
|
122
|
+
|
|
123
|
+
```json
|
|
124
|
+
{
|
|
125
|
+
"references": [
|
|
126
|
+
"https://docs.python.org/3/library/...",
|
|
127
|
+
"RFC 7231"
|
|
128
|
+
]
|
|
129
|
+
}
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
### confidence.uncertainty_factors
|
|
133
|
+
|
|
134
|
+
Factors that reduce confidence:
|
|
135
|
+
|
|
136
|
+
```json
|
|
137
|
+
{
|
|
138
|
+
"uncertainty_factors": [
|
|
139
|
+
"Limited context provided",
|
|
140
|
+
"Depends on unspecified requirements"
|
|
141
|
+
]
|
|
142
|
+
}
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
## Debate Object
|
|
146
|
+
|
|
147
|
+
Present only if Multi-Agent Debate is enabled (round >= 2):
|
|
148
|
+
|
|
149
|
+
```json
|
|
150
|
+
{
|
|
151
|
+
"debate": {
|
|
152
|
+
"round": 2,
|
|
153
|
+
"position_changed": true,
|
|
154
|
+
"critiques": [
|
|
155
|
+
{
|
|
156
|
+
"target": "Codex",
|
|
157
|
+
"critique": "The proposed approach does not consider edge case X",
|
|
158
|
+
"severity": "moderate"
|
|
159
|
+
}
|
|
160
|
+
],
|
|
161
|
+
"incorporated_from": [
|
|
162
|
+
{
|
|
163
|
+
"source": "Mistral",
|
|
164
|
+
"idea": "Added input validation"
|
|
165
|
+
}
|
|
166
|
+
]
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
### Debate Fields
|
|
172
|
+
|
|
173
|
+
| Field | Type | Description |
|
|
174
|
+
|-------|------|-------------|
|
|
175
|
+
| `round` | integer | Current round (1, 2, 3) |
|
|
176
|
+
| `position_changed` | boolean | Whether position has changed |
|
|
177
|
+
| `critiques` | array | Critiques of other consultants |
|
|
178
|
+
| `critiques[].target` | string | Criticized consultant |
|
|
179
|
+
| `critiques[].critique` | string | Critique text |
|
|
180
|
+
| `critiques[].severity` | enum | minor, moderate, major |
|
|
181
|
+
| `incorporated_from` | array | Incorporated ideas |
|
|
182
|
+
| `incorporated_from[].source` | string | Source of the idea |
|
|
183
|
+
| `incorporated_from[].idea` | string | Description of the idea |
|
|
184
|
+
|
|
185
|
+
## Metadata Object
|
|
186
|
+
|
|
187
|
+
```json
|
|
188
|
+
{
|
|
189
|
+
"metadata": {
|
|
190
|
+
"tokens_used": 1500,
|
|
191
|
+
"latency_ms": 2345,
|
|
192
|
+
"model_version": "gemini-3.1-pro-preview",
|
|
193
|
+
"timestamp": "2024-01-14T12:34:56Z"
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
| Field | Type | Description |
|
|
199
|
+
|-------|------|-------------|
|
|
200
|
+
| `tokens_used` | integer | Tokens consumed (estimate) |
|
|
201
|
+
| `latency_ms` | integer | Response time in ms |
|
|
202
|
+
| `model_version` | string | Exact model version |
|
|
203
|
+
| `timestamp` | string | ISO 8601 timestamp |
|
|
204
|
+
|
|
205
|
+
## Enum Values
|
|
206
|
+
|
|
207
|
+
### consultant
|
|
208
|
+
|
|
209
|
+
```
|
|
210
|
+
"Gemini" | "Codex" | "Mistral" | "Kilo" | "Cursor" | "Aider" | "Amp" | "Kimi" | "Claude" | "Qwen3" | "GLM" | "Grok" | "DeepSeek" | "MiniMax" | "Ollama"
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
### persona
|
|
214
|
+
|
|
215
|
+
```
|
|
216
|
+
"The Architect" | "The Pragmatist" | "The Devil's Advocate" | "The Innovator" |
|
|
217
|
+
"The Integrator" | "The Pair Programmer" | "The Systems Thinker" | "The Eastern Sage" |
|
|
218
|
+
"The Synthesizer" | "The Analyst" | "The Methodologist" | "The Provocateur" |
|
|
219
|
+
"The Code Specialist" | "The Pragmatic Optimizer" | "The Local Expert"
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
### critiques[].severity
|
|
223
|
+
|
|
224
|
+
```
|
|
225
|
+
"minor" | "moderate" | "major"
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
## Confidence Score Guidelines
|
|
229
|
+
|
|
230
|
+
| Score | Meaning |
|
|
231
|
+
|-------|---------|
|
|
232
|
+
| 9-10 | Very confident, standard solution |
|
|
233
|
+
| 7-8 | Confident, with minor uncertainties |
|
|
234
|
+
| 5-6 | Moderately confident |
|
|
235
|
+
| 3-4 | Uncertain, requires verification |
|
|
236
|
+
| 1-2 | Very uncertain, hypothesis |
|
|
237
|
+
|
|
238
|
+
## Validation
|
|
239
|
+
|
|
240
|
+
To validate an output against the schema:
|
|
241
|
+
|
|
242
|
+
```bash
|
|
243
|
+
# With jsonschema (Python)
|
|
244
|
+
pip install jsonschema
|
|
245
|
+
jsonschema -i output.json scripts/lib/schema.json
|
|
246
|
+
|
|
247
|
+
# With jq (verify required fields)
|
|
248
|
+
jq 'has("consultant") and has("response") and has("confidence")' output.json
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
## Complete Example
|
|
252
|
+
|
|
253
|
+
```json
|
|
254
|
+
{
|
|
255
|
+
"consultant": "Gemini",
|
|
256
|
+
"model": "gemini-3.1-pro-preview",
|
|
257
|
+
"persona": "The Architect",
|
|
258
|
+
"response": {
|
|
259
|
+
"summary": "I recommend using a Repository pattern to separate data access logic from business logic, improving testability and maintainability.",
|
|
260
|
+
"detailed": "The Repository pattern provides an abstraction between business logic and the persistence layer...",
|
|
261
|
+
"approach": "Repository Pattern",
|
|
262
|
+
"code_snippets": [
|
|
263
|
+
{
|
|
264
|
+
"language": "python",
|
|
265
|
+
"code": "class UserRepository:\n def __init__(self, db_session):\n self.session = db_session\n \n def get_by_id(self, user_id: int) -> User:\n return self.session.query(User).get(user_id)",
|
|
266
|
+
"description": "Basic Repository implementation"
|
|
267
|
+
}
|
|
268
|
+
],
|
|
269
|
+
"pros": [
|
|
270
|
+
"Better separation of concerns",
|
|
271
|
+
"Facilitates testing with mocks",
|
|
272
|
+
"Easily supports database switching"
|
|
273
|
+
],
|
|
274
|
+
"cons": [
|
|
275
|
+
"Adds an abstraction layer",
|
|
276
|
+
"May seem like over-engineering for small projects"
|
|
277
|
+
],
|
|
278
|
+
"alternatives": [
|
|
279
|
+
{
|
|
280
|
+
"name": "Active Record",
|
|
281
|
+
"reason_not_chosen": "Greater coupling with the database"
|
|
282
|
+
}
|
|
283
|
+
],
|
|
284
|
+
"caveats": [
|
|
285
|
+
"Requires dependency injection for tests"
|
|
286
|
+
],
|
|
287
|
+
"references": [
|
|
288
|
+
"https://martinfowler.com/eaaCatalog/repository.html"
|
|
289
|
+
]
|
|
290
|
+
},
|
|
291
|
+
"confidence": {
|
|
292
|
+
"score": 8,
|
|
293
|
+
"reasoning": "Well-established pattern with extensive documentation. Score not 9-10 because it depends on project complexity.",
|
|
294
|
+
"uncertainty_factors": [
|
|
295
|
+
"Project size is unknown"
|
|
296
|
+
]
|
|
297
|
+
},
|
|
298
|
+
"metadata": {
|
|
299
|
+
"tokens_used": 1250,
|
|
300
|
+
"latency_ms": 1850,
|
|
301
|
+
"model_version": "gemini-3.1-pro-preview",
|
|
302
|
+
"timestamp": "2024-01-14T12:34:56Z"
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
```
|