@faviovazquez/deliberate 0.2.4 → 0.2.6
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/CHANGELOG.md +10 -0
- package/assets/agents_wheel.png +0 -0
- package/assets/banner.png +0 -0
- package/assets/enforcement.png +0 -0
- package/assets/modes_overview.png +0 -0
- package/assets/research_grounding.png +0 -0
- package/assets/sycophancy.png +0 -0
- package/assets/triad_map.png +0 -0
- package/assets/verdict.png +0 -0
- package/bin/cli.js +9 -3
- package/package.json +3 -1
- package/protocols/research-grounding.md +183 -0
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,16 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [0.2.6] - 2025-04-03
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
- `bin/cli.js`: all three install functions (Claude Code, Windsurf, Cursor) now copy `protocols/` to the skill directory — `protocols/research-grounding.md` was missing after install despite being in the npm package
|
|
12
|
+
|
|
13
|
+
## [0.2.5] - 2025-04-03
|
|
14
|
+
|
|
15
|
+
### Fixed
|
|
16
|
+
- Added `protocols/` and `assets/` to npm `files` array — both were missing from published packages, causing `protocols/research-grounding.md` and all README images to be absent after install
|
|
17
|
+
|
|
8
18
|
## [0.2.4] - 2025-04-03
|
|
9
19
|
|
|
10
20
|
### Added
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/bin/cli.js
CHANGED
|
@@ -187,6 +187,10 @@ function installClaudeCode(isGlobal) {
|
|
|
187
187
|
copyDir(path.join(ROOT, 'templates'), path.join(skillDir, 'templates'));
|
|
188
188
|
console.log(` ${green}✓${reset} Installed output templates`);
|
|
189
189
|
|
|
190
|
+
// Protocols
|
|
191
|
+
copyDir(path.join(ROOT, 'protocols'), path.join(skillDir, 'protocols'));
|
|
192
|
+
console.log(` ${green}✓${reset} Installed protocols`);
|
|
193
|
+
|
|
190
194
|
console.log(`\n ${green}Done!${reset} Open Claude Code and try: ${cyan}/deliberate "your question here"${reset}`);
|
|
191
195
|
}
|
|
192
196
|
|
|
@@ -206,14 +210,15 @@ function installWindsurf(isGlobal) {
|
|
|
206
210
|
copyDir(path.join(ROOT, 'agents'), path.join(skillDir, 'agents'));
|
|
207
211
|
console.log(` ${green}✓${reset} Installed 17 agents`);
|
|
208
212
|
|
|
209
|
-
// Configs, Scripts, Templates
|
|
213
|
+
// Configs, Scripts, Templates, Protocols
|
|
210
214
|
copyDir(path.join(ROOT, 'configs'), path.join(skillDir, 'configs'));
|
|
211
215
|
copyDir(path.join(ROOT, 'scripts'), path.join(skillDir, 'scripts'));
|
|
212
216
|
copyDir(path.join(ROOT, 'templates'), path.join(skillDir, 'templates'));
|
|
217
|
+
copyDir(path.join(ROOT, 'protocols'), path.join(skillDir, 'protocols'));
|
|
213
218
|
makeExecutable(path.join(skillDir, 'scripts', 'start-server.sh'));
|
|
214
219
|
makeExecutable(path.join(skillDir, 'scripts', 'stop-server.sh'));
|
|
215
220
|
makeExecutable(path.join(skillDir, 'scripts', 'detect-platform.sh'));
|
|
216
|
-
console.log(` ${green}✓${reset} Installed configs, scripts, templates`);
|
|
221
|
+
console.log(` ${green}✓${reset} Installed configs, scripts, templates, protocols`);
|
|
217
222
|
|
|
218
223
|
console.log(`\n ${green}Done!${reset} Open Windsurf and try: ${cyan}@deliberate${reset} or just ask a complex decision question.`);
|
|
219
224
|
}
|
|
@@ -231,10 +236,11 @@ function installCursor(isGlobal) {
|
|
|
231
236
|
copyDir(path.join(ROOT, 'configs'), path.join(skillDir, 'configs'));
|
|
232
237
|
copyDir(path.join(ROOT, 'scripts'), path.join(skillDir, 'scripts'));
|
|
233
238
|
copyDir(path.join(ROOT, 'templates'), path.join(skillDir, 'templates'));
|
|
239
|
+
copyDir(path.join(ROOT, 'protocols'), path.join(skillDir, 'protocols'));
|
|
234
240
|
makeExecutable(path.join(skillDir, 'scripts', 'start-server.sh'));
|
|
235
241
|
makeExecutable(path.join(skillDir, 'scripts', 'stop-server.sh'));
|
|
236
242
|
makeExecutable(path.join(skillDir, 'scripts', 'detect-platform.sh'));
|
|
237
|
-
console.log(` ${green}✓${reset} Installed skill, agents, configs, scripts, templates`);
|
|
243
|
+
console.log(` ${green}✓${reset} Installed skill, agents, configs, scripts, templates, protocols`);
|
|
238
244
|
|
|
239
245
|
console.log(`\n ${green}Done!${reset} Open Cursor and try: ${cyan}@deliberate${reset} or just ask a complex decision question.`);
|
|
240
246
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@faviovazquez/deliberate",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.6",
|
|
4
4
|
"description": "Multi-agent deliberation skill for AI coding assistants. Agreement is a bug.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Favio Vazquez",
|
|
@@ -32,7 +32,9 @@
|
|
|
32
32
|
"files": [
|
|
33
33
|
"bin/",
|
|
34
34
|
"agents/",
|
|
35
|
+
"assets/",
|
|
35
36
|
"configs/",
|
|
37
|
+
"protocols/",
|
|
36
38
|
"scripts/",
|
|
37
39
|
"templates/",
|
|
38
40
|
"SKILL.md",
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
# Research Grounding Protocol
|
|
2
|
+
|
|
3
|
+
This protocol is injected into deliberations and brainstorms when the `--research` flag is active. It runs **before Round 1 / Divergent Phase** and grounds each agent's analysis in real, retrieved evidence rather than parametric knowledge alone.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## When This Protocol Activates
|
|
8
|
+
|
|
9
|
+
Only when the user explicitly passes `--research` (or natural language equivalent on Windsurf: "with research", "do research first", "search before answering").
|
|
10
|
+
|
|
11
|
+
This is **opt-in only**. It is never the default. The flag exists because:
|
|
12
|
+
- Agents have a training cutoff — recent events, new libraries, current prices, live APIs are not in parametric memory
|
|
13
|
+
- The user's codebase is not in parametric memory — agents must read it to understand the actual context
|
|
14
|
+
- Some decisions require current external data (benchmark results, competitor pricing, regulatory text, recent CVEs, API specs)
|
|
15
|
+
|
|
16
|
+
Without `--research`, agents reason from internalized knowledge. With `--research`, agents ground first, reason second.
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## Coordinator Instructions: Pre-Round Grounding Phase
|
|
21
|
+
|
|
22
|
+
### Step R1: Classify the Research Needs
|
|
23
|
+
|
|
24
|
+
Before dispatching agents, the coordinator classifies what kind of grounding this deliberation needs. Announce this to the user:
|
|
25
|
+
|
|
26
|
+
```
|
|
27
|
+
Research mode active. Before agents analyze, I'll gather grounding context.
|
|
28
|
+
Classifying research needs for: "{problem restatement}"
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
Determine which of the following apply:
|
|
32
|
+
|
|
33
|
+
| Type | When to activate | Tools to use |
|
|
34
|
+
|------|-----------------|--------------|
|
|
35
|
+
| **Codebase scan** | Question involves existing code, architecture, tech debt, dependencies | Read files, grep, list dirs |
|
|
36
|
+
| **Web search** | Question involves current technology landscape, recent events, pricing, benchmarks, regulatory changes, competitor moves | Web search |
|
|
37
|
+
| **Documentation lookup** | Question involves a specific tool, library, API, or framework | Web search targeting official docs |
|
|
38
|
+
| **Both** | Complex technical decisions that involve current state of the codebase AND the external landscape | Both |
|
|
39
|
+
|
|
40
|
+
Announce what you're about to do:
|
|
41
|
+
```
|
|
42
|
+
I'll do a [codebase scan / web search / documentation lookup / full research pass] before agents speak.
|
|
43
|
+
This may take a moment. The grounding evidence will be shared with all agents.
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
---
|
|
47
|
+
|
|
48
|
+
### Step R2: Codebase Scan (if applicable)
|
|
49
|
+
|
|
50
|
+
If codebase research is needed, run the following in order, stopping when you have enough context:
|
|
51
|
+
|
|
52
|
+
**Level 1 — Orientation** (always run if codebase scan is active):
|
|
53
|
+
```
|
|
54
|
+
Read: AGENTS.md (if exists) — understand project soul and current state
|
|
55
|
+
Read: .planning/PROJECT.md or README.md — understand what's being built
|
|
56
|
+
List: top-level directory structure
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
**Level 2 — Focused scan** (run based on question domain):
|
|
60
|
+
- Architecture questions → read main entry points, config files, dependency manifests (`package.json`, `pyproject.toml`, `go.mod`, `pom.xml`, `Cargo.toml`)
|
|
61
|
+
- Debugging questions → read the failing file + its direct imports + relevant test files
|
|
62
|
+
- Tech debt questions → search for TODO/FIXME/HACK comments, read the most recently modified files
|
|
63
|
+
- Performance questions → read the hot path files + any profiling configs
|
|
64
|
+
- Security questions → read auth/middleware layers, dependency files for known vulnerable versions
|
|
65
|
+
|
|
66
|
+
**Level 3 — Deep dive** (only if Level 2 reveals something specific to pursue):
|
|
67
|
+
- Follow the specific file/module/function surfaced in Level 2
|
|
68
|
+
|
|
69
|
+
Cap the codebase scan at **10 files maximum**. If the codebase is larger, surface what you read and note what you skipped.
|
|
70
|
+
|
|
71
|
+
Produce a **Codebase Context Summary**:
|
|
72
|
+
```markdown
|
|
73
|
+
## Codebase Context
|
|
74
|
+
- Stack: {languages, frameworks, key libraries with versions}
|
|
75
|
+
- Relevant files read: {list}
|
|
76
|
+
- Current state relevant to the question: {3-5 bullet points of facts found}
|
|
77
|
+
- Gaps: {what exists in the codebase that wasn't read, if relevant}
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
---
|
|
81
|
+
|
|
82
|
+
### Step R3: Web Search (if applicable)
|
|
83
|
+
|
|
84
|
+
Perform targeted searches. Each search should be precise — bad searches waste context.
|
|
85
|
+
|
|
86
|
+
**Search strategy by question type:**
|
|
87
|
+
|
|
88
|
+
| Question type | Search queries to run |
|
|
89
|
+
|--------------|----------------------|
|
|
90
|
+
| Technology choice (A vs B) | "{tech A} vs {tech B} {year}" + "{tech A} production issues {year}" + "{tech B} benchmark {year}" |
|
|
91
|
+
| Library/framework | "{library name} changelog" + "{library name} known issues" + "{library name} alternatives {year}" |
|
|
92
|
+
| Architecture pattern | "{pattern name} at scale case study" + "{pattern name} failure modes" |
|
|
93
|
+
| Security/compliance | "{CVE or regulation} {year}" + "{tool name} security audit" |
|
|
94
|
+
| Pricing/vendor | "{vendor} pricing {year}" + "{vendor} enterprise SLA" |
|
|
95
|
+
| Competitor landscape | "{domain} tools comparison {year}" + "{competitor} recent updates" |
|
|
96
|
+
|
|
97
|
+
Run a **maximum of 5 searches**. Prioritize recency (last 12 months) and primary sources (official docs, engineering blogs, academic papers, CVE databases).
|
|
98
|
+
|
|
99
|
+
Produce a **Web Research Summary**:
|
|
100
|
+
```markdown
|
|
101
|
+
## Web Research
|
|
102
|
+
- Searches run: {list of queries}
|
|
103
|
+
- Key findings: {bullet points of facts found, each with source URL}
|
|
104
|
+
- Recency note: {newest source date found}
|
|
105
|
+
- Gaps: {what couldn't be found or verified}
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
---
|
|
109
|
+
|
|
110
|
+
### Step R4: Distribute Grounding Context to Agents
|
|
111
|
+
|
|
112
|
+
The coordinator packages the grounding evidence and includes it in every agent's Round 1 prompt, as an additional section:
|
|
113
|
+
|
|
114
|
+
```
|
|
115
|
+
## Grounding Evidence
|
|
116
|
+
{Codebase Context Summary if applicable}
|
|
117
|
+
{Web Research Summary if applicable}
|
|
118
|
+
|
|
119
|
+
Use this evidence in your analysis. You may cite specific findings.
|
|
120
|
+
If the evidence is insufficient for your analytical method, note what additional information would change your position.
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
**Critical rule**: Agents must treat grounding evidence as **facts to reason from**, not conclusions to agree with. The `assumption-breaker` in particular should scrutinize the sources and flag any evidence that looks cherry-picked, outdated, or from a biased source.
|
|
124
|
+
|
|
125
|
+
---
|
|
126
|
+
|
|
127
|
+
### Step R5: Evidence Quality Check
|
|
128
|
+
|
|
129
|
+
After agents complete Round 1, the coordinator scans for evidence misuse:
|
|
130
|
+
|
|
131
|
+
- Did any agent **over-cite** grounding evidence (treating search results as definitive when they're preliminary)?
|
|
132
|
+
- Did any agent **ignore** grounding evidence that was directly relevant to their analysis?
|
|
133
|
+
- Did `assumption-breaker` scrutinize the evidence quality, or just accept it?
|
|
134
|
+
|
|
135
|
+
If evidence was over-relied on, add to the coordinator's Round 2 dispatch:
|
|
136
|
+
```
|
|
137
|
+
Note to agents: The grounding evidence is current as of the search date but may be incomplete.
|
|
138
|
+
{agent name} may be over-weighting {specific finding}. Challenge this if your analysis warrants.
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
---
|
|
142
|
+
|
|
143
|
+
## Agent Instructions: Using Grounding Evidence
|
|
144
|
+
|
|
145
|
+
When `--research` is active, each agent receives the grounding context. Agents should:
|
|
146
|
+
|
|
147
|
+
1. **Ground your analysis in the evidence** — reference specific findings from the codebase scan or web research. "The codebase currently uses X version, which has Y implication" is stronger than generic analysis.
|
|
148
|
+
|
|
149
|
+
2. **Flag evidence gaps** — if the grounding evidence doesn't cover what your analytical method needs, say so explicitly. "The web research didn't surface benchmark data for >10M records/day — my risk analysis is therefore based on first principles rather than empirical data."
|
|
150
|
+
|
|
151
|
+
3. **Challenge evidence quality** (especially `assumption-breaker`) — search results can be wrong, outdated, or from biased sources. If you find a reason to distrust a finding, say so.
|
|
152
|
+
|
|
153
|
+
4. **Don't be anchored** — grounding evidence informs but doesn't determine your position. If the evidence points one way but your analytical method points another, hold your position and explain the discrepancy.
|
|
154
|
+
|
|
155
|
+
---
|
|
156
|
+
|
|
157
|
+
## Scope Limits
|
|
158
|
+
|
|
159
|
+
The research grounding phase has strict limits to prevent it from becoming a context-consuming sinkhole:
|
|
160
|
+
|
|
161
|
+
| Limit | Value |
|
|
162
|
+
|-------|-------|
|
|
163
|
+
| Max files read (codebase) | 10 |
|
|
164
|
+
| Max searches (web) | 5 |
|
|
165
|
+
| Max tokens in Codebase Context Summary | ~500 |
|
|
166
|
+
| Max tokens in Web Research Summary | ~500 |
|
|
167
|
+
| Max total grounding context per agent | ~1000 tokens |
|
|
168
|
+
|
|
169
|
+
If the research scope would exceed these limits, the coordinator surfaces the most relevant subset and notes what was excluded. More research is not always better — precision matters more than volume.
|
|
170
|
+
|
|
171
|
+
---
|
|
172
|
+
|
|
173
|
+
## Platform Notes
|
|
174
|
+
|
|
175
|
+
**Claude Code**: Agents run as parallel subagents. Each receives the same grounding context package prepared by the coordinator. The coordinator itself does the research before dispatching agents.
|
|
176
|
+
|
|
177
|
+
**Windsurf**: The coordinator does the research inline (using Windsurf's web search and file tools) before role-prompting each agent. The grounding context is included in every agent's prompt.
|
|
178
|
+
|
|
179
|
+
**No tool access**: If the platform has no web search or file reading capability, the coordinator announces:
|
|
180
|
+
```
|
|
181
|
+
Research mode requested but this platform doesn't have [web search / file access] available.
|
|
182
|
+
Falling back to parametric knowledge. Consider providing relevant context manually in your question.
|
|
183
|
+
```
|