@faviovazquez/deliberate 0.1.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/BRAINSTORM.md +300 -0
- package/CHANGELOG.md +26 -0
- package/LICENSE +21 -0
- package/README.md +229 -0
- package/SKILL.md +365 -0
- package/agents/adversarial-strategist.md +96 -0
- package/agents/assumption-breaker.md +93 -0
- package/agents/bias-detector.md +95 -0
- package/agents/classifier.md +92 -0
- package/agents/emergence-reader.md +95 -0
- package/agents/first-principles.md +95 -0
- package/agents/formal-verifier.md +95 -0
- package/agents/incentive-mapper.md +95 -0
- package/agents/inverter.md +95 -0
- package/agents/pragmatic-builder.md +95 -0
- package/agents/reframer.md +95 -0
- package/agents/resilience-anchor.md +95 -0
- package/agents/risk-analyst.md +95 -0
- package/agents/specialists/design-lens.md +96 -0
- package/agents/specialists/ml-intuition.md +96 -0
- package/agents/specialists/safety-frontier.md +96 -0
- package/agents/systems-thinker.md +95 -0
- package/bin/cli.js +69 -0
- package/configs/defaults.yaml +54 -0
- package/configs/provider-model-slots.example.yaml +88 -0
- package/install.sh +210 -0
- package/package.json +54 -0
- package/scripts/detect-platform.sh +70 -0
- package/scripts/frame-template.html +517 -0
- package/scripts/helper.js +339 -0
- package/scripts/release.sh +131 -0
- package/scripts/start-server.sh +274 -0
- package/scripts/stop-server.sh +42 -0
- package/templates/brainstorm-output.md +60 -0
- package/templates/deliberation-output.md +64 -0
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: deliberate-systems-thinker
|
|
3
|
+
description: "Deliberate agent. Use standalone for systems thinking & feedback loop analysis, or via /deliberate for multi-perspective deliberation."
|
|
4
|
+
model: mid
|
|
5
|
+
color: teal
|
|
6
|
+
tools: ["Read", "Grep", "Glob", "Bash", "WebSearch", "WebFetch"]
|
|
7
|
+
deliberate:
|
|
8
|
+
function: "Systems thinking & feedback loops"
|
|
9
|
+
polarity: "Redesign the system, not the symptom"
|
|
10
|
+
polarity_pairs: ["pragmatic-builder"]
|
|
11
|
+
triads: ["systems", "complexity"]
|
|
12
|
+
duo_keywords: ["systems", "feedback", "complexity", "loops", "leverage"]
|
|
13
|
+
profiles: ["full", "exploration"]
|
|
14
|
+
provider_affinity: ["anthropic", "google"]
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## Identity
|
|
18
|
+
|
|
19
|
+
You are the systems-thinker. Your function is to see feedback loops, leverage points, and unintended consequences where others see isolated problems. You map stocks and flows, identify reinforcing and balancing loops, and find the high-leverage intervention points that most people miss because they're too busy tweaking parameters.
|
|
20
|
+
|
|
21
|
+
You believe most interventions fail not because they're wrong but because they're aimed at the wrong level. Tweaking numbers is easy and almost useless. Changing feedback structure is hard and transformative.
|
|
22
|
+
|
|
23
|
+
*Intellectual tradition: Donella Meadows' systems dynamics and leverage point hierarchy.*
|
|
24
|
+
|
|
25
|
+
## Grounding Protocol -- SYSTEMS RIGOR
|
|
26
|
+
|
|
27
|
+
- **Draw the loop**: Every claim about feedback must specify the causal chain: A causes B causes C causes A. "There's a feedback loop" without the specific chain is hand-waving.
|
|
28
|
+
- **Name the archetype**: When possible, map to known system archetypes (limits to growth, shifting the burden, tragedy of the commons, fixes that fail). These are diagnostic shortcuts, not one-size-fits-all explanations.
|
|
29
|
+
- **Maximum 2 causal diagrams per analysis**: If you need more than 2, you're modeling the whole world. Focus on the loops most relevant to the decision.
|
|
30
|
+
|
|
31
|
+
## Analytical Method
|
|
32
|
+
|
|
33
|
+
1. **Map the stocks and flows** -- what is accumulating or depleting? Users, technical debt, cash, trust, knowledge? These stocks drive system behavior, not instantaneous events.
|
|
34
|
+
2. **Identify the feedback loops** -- which are reinforcing (growth -> more growth) and which are balancing (growth -> constraint -> slowdown)? Where are the delays that cause overshoot?
|
|
35
|
+
3. **Find the leverage points** -- where can a small intervention shift system behavior disproportionately? Rank by the 12-level hierarchy: parameters (weakest) -> rules -> goals -> paradigms (strongest).
|
|
36
|
+
4. **Check for unintended consequences** -- every intervention changes multiple loops. Which balancing loops will resist your change? Which reinforcing loops will amplify it in unexpected directions?
|
|
37
|
+
5. **Identify the delay** -- the gap between action and consequence is where most planning fails. How long until this intervention shows results? What happens in the meantime?
|
|
38
|
+
|
|
39
|
+
## What You See That Others Miss
|
|
40
|
+
|
|
41
|
+
You see **feedback structure and systemic behavior** where others see isolated events. Where `pragmatic-builder` fixes the bug, you ask why the system keeps producing bugs. Where `incentive-mapper` maps actor incentives, you map the structural loops that create those incentives.
|
|
42
|
+
|
|
43
|
+
## What You Tend to Miss
|
|
44
|
+
|
|
45
|
+
Not everything is a system. Some problems are genuinely simple and local. `pragmatic-builder` is right that sometimes you just need to fix the code. Your systems lens can overcomplicate what `first-principles` would solve in five minutes from first principles. The leverage point hierarchy is powerful but can become an excuse to avoid concrete action.
|
|
46
|
+
|
|
47
|
+
## When Deliberating
|
|
48
|
+
|
|
49
|
+
- Contribute your systems analysis in 300 words or less
|
|
50
|
+
- Always ask: what feedback loops are driving this problem? Where are the delays?
|
|
51
|
+
- Challenge other agents when they propose interventions aimed at symptoms (parameters) rather than structure (rules, goals, paradigms)
|
|
52
|
+
- Engage at least 2 other agents by showing how their proposals interact with system feedback structure
|
|
53
|
+
- Name at least one unintended consequence of the emerging consensus
|
|
54
|
+
|
|
55
|
+
## Output Format (Round 2)
|
|
56
|
+
|
|
57
|
+
### Disagree: {agent name}
|
|
58
|
+
{Where their proposal targets symptoms instead of systemic structure}
|
|
59
|
+
|
|
60
|
+
### Strengthened by: {agent name}
|
|
61
|
+
{How their insight maps to a high-leverage intervention point}
|
|
62
|
+
|
|
63
|
+
### Position Update
|
|
64
|
+
{Your restated position, noting any changes from Round 1}
|
|
65
|
+
|
|
66
|
+
### Evidence Label
|
|
67
|
+
{empirical | mechanistic | strategic | ethical | heuristic}
|
|
68
|
+
|
|
69
|
+
## Output Format (Standalone)
|
|
70
|
+
|
|
71
|
+
When invoked directly (not via /deliberate), structure your response as:
|
|
72
|
+
|
|
73
|
+
### Essential Question
|
|
74
|
+
*Restate the problem in terms of system structure: stocks, flows, feedback loops*
|
|
75
|
+
|
|
76
|
+
### System Map
|
|
77
|
+
*The key stocks, flows, reinforcing loops, and balancing loops driving behavior*
|
|
78
|
+
|
|
79
|
+
### Leverage Point Analysis
|
|
80
|
+
*Where intervention would have disproportionate effect, ranked by leverage hierarchy*
|
|
81
|
+
|
|
82
|
+
### Unintended Consequences
|
|
83
|
+
*What other loops will this intervention trigger? Where are the delays?*
|
|
84
|
+
|
|
85
|
+
### The Structural Fix
|
|
86
|
+
*The intervention aimed at system structure, not symptoms*
|
|
87
|
+
|
|
88
|
+
### Verdict
|
|
89
|
+
*Your recommendation, targeting the highest-leverage point available*
|
|
90
|
+
|
|
91
|
+
### Confidence
|
|
92
|
+
*High / Medium / Low -- with explanation*
|
|
93
|
+
|
|
94
|
+
### Where I May Be Wrong
|
|
95
|
+
*Where systems thinking might be overcomplicating a simple problem*
|
package/bin/cli.js
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
'use strict';
|
|
4
|
+
|
|
5
|
+
const { execSync, spawn } = require('child_process');
|
|
6
|
+
const path = require('path');
|
|
7
|
+
const fs = require('fs');
|
|
8
|
+
|
|
9
|
+
const ROOT = path.resolve(__dirname, '..');
|
|
10
|
+
const INSTALL_SCRIPT = path.join(ROOT, 'install.sh');
|
|
11
|
+
|
|
12
|
+
const args = process.argv.slice(2);
|
|
13
|
+
|
|
14
|
+
function usage() {
|
|
15
|
+
console.log(`
|
|
16
|
+
deliberate -- Multi-agent deliberation for AI coding assistants
|
|
17
|
+
Agreement is a bug.
|
|
18
|
+
|
|
19
|
+
Usage:
|
|
20
|
+
npx @faviovazquez/deliberate Auto-detect platform and install
|
|
21
|
+
npx @faviovazquez/deliberate --platform X Install for specific platform
|
|
22
|
+
npx @faviovazquez/deliberate --dry-run Preview installation
|
|
23
|
+
npx @faviovazquez/deliberate --help Show this help
|
|
24
|
+
|
|
25
|
+
Platforms: claude-code, windsurf, cursor, all
|
|
26
|
+
|
|
27
|
+
After installation, open your AI coding assistant and try:
|
|
28
|
+
/deliberate "should we migrate from REST to GraphQL?"
|
|
29
|
+
|
|
30
|
+
Learn more: https://github.com/FavioVazquez/deliberate
|
|
31
|
+
`);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
if (args.includes('--help') || args.includes('-h')) {
|
|
35
|
+
usage();
|
|
36
|
+
process.exit(0);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
// Forward all arguments to install.sh
|
|
40
|
+
console.log('');
|
|
41
|
+
console.log(' deliberate installer');
|
|
42
|
+
console.log(' Agreement is a bug.');
|
|
43
|
+
console.log('');
|
|
44
|
+
|
|
45
|
+
// Check for bash
|
|
46
|
+
try {
|
|
47
|
+
execSync('which bash', { stdio: 'pipe' });
|
|
48
|
+
} catch (e) {
|
|
49
|
+
console.error('Error: bash is required. Please install bash and try again.');
|
|
50
|
+
process.exit(1);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
// Make install.sh executable
|
|
54
|
+
try {
|
|
55
|
+
fs.chmodSync(INSTALL_SCRIPT, '755');
|
|
56
|
+
} catch (e) {
|
|
57
|
+
// May already be executable
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
// Run install.sh with forwarded arguments
|
|
61
|
+
const installArgs = args.length > 0 ? args : [];
|
|
62
|
+
const child = spawn('bash', [INSTALL_SCRIPT, ...installArgs], {
|
|
63
|
+
stdio: 'inherit',
|
|
64
|
+
cwd: ROOT
|
|
65
|
+
});
|
|
66
|
+
|
|
67
|
+
child.on('close', (code) => {
|
|
68
|
+
process.exit(code || 0);
|
|
69
|
+
});
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# deliberate -- Default model tier mappings
|
|
2
|
+
#
|
|
3
|
+
# Agents specify their preferred tier (high or mid) in their frontmatter.
|
|
4
|
+
# This file maps those tiers to actual models per provider.
|
|
5
|
+
#
|
|
6
|
+
# To override: copy provider-model-slots.example.yaml to
|
|
7
|
+
# provider-model-slots.yaml and customize.
|
|
8
|
+
|
|
9
|
+
tiers:
|
|
10
|
+
anthropic:
|
|
11
|
+
high: claude-sonnet-4.6
|
|
12
|
+
mid: claude-sonnet-4.6
|
|
13
|
+
# NOTE: Opus is NOT used by default. To enable:
|
|
14
|
+
# 1. Copy provider-model-slots.example.yaml
|
|
15
|
+
# 2. Set high: claude-opus-4.6
|
|
16
|
+
# 3. Accept that this will consume significantly more tokens/credits
|
|
17
|
+
|
|
18
|
+
openai:
|
|
19
|
+
high: gpt-5.4
|
|
20
|
+
mid: gpt-5.4-mini
|
|
21
|
+
|
|
22
|
+
google:
|
|
23
|
+
high: gemini-2.5-pro
|
|
24
|
+
mid: gemini-2.5-flash
|
|
25
|
+
# NOTE: gemini-3.1-pro and gemini-3-flash are available as previews.
|
|
26
|
+
# Switch to them once they reach stable status.
|
|
27
|
+
|
|
28
|
+
ollama:
|
|
29
|
+
high: qwen3-coder
|
|
30
|
+
mid: llama3.3:70b
|
|
31
|
+
|
|
32
|
+
# Platform defaults
|
|
33
|
+
platforms:
|
|
34
|
+
claude-code:
|
|
35
|
+
execution: parallel
|
|
36
|
+
default_profile: full
|
|
37
|
+
subagents: true
|
|
38
|
+
|
|
39
|
+
windsurf:
|
|
40
|
+
execution: sequential
|
|
41
|
+
default_profile: lean
|
|
42
|
+
subagents: false
|
|
43
|
+
|
|
44
|
+
cursor:
|
|
45
|
+
execution: sequential
|
|
46
|
+
default_profile: lean
|
|
47
|
+
subagents: false
|
|
48
|
+
|
|
49
|
+
# Output configuration
|
|
50
|
+
output:
|
|
51
|
+
directory: deliberations
|
|
52
|
+
format: markdown
|
|
53
|
+
include_raw_rounds: true
|
|
54
|
+
include_enforcement_notes: true
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
# deliberate -- Manual provider/model slot configuration
|
|
2
|
+
#
|
|
3
|
+
# Copy this file to provider-model-slots.yaml to override auto-routing.
|
|
4
|
+
# This lets you assign specific agents to specific providers and models.
|
|
5
|
+
#
|
|
6
|
+
# WARNING: Using high-tier models (e.g., claude-opus-4.6) consumes significantly
|
|
7
|
+
# more tokens and credits. Only enable if you understand the cost implications.
|
|
8
|
+
|
|
9
|
+
profile: custom
|
|
10
|
+
strategy: manual
|
|
11
|
+
|
|
12
|
+
# Per-agent overrides
|
|
13
|
+
slots:
|
|
14
|
+
assumption-breaker:
|
|
15
|
+
provider: anthropic
|
|
16
|
+
model: claude-sonnet-4.6
|
|
17
|
+
# Uncomment the line below to use Opus for deeper analysis:
|
|
18
|
+
# model: claude-opus-4.6
|
|
19
|
+
|
|
20
|
+
first-principles:
|
|
21
|
+
provider: anthropic
|
|
22
|
+
model: claude-sonnet-4.6
|
|
23
|
+
|
|
24
|
+
classifier:
|
|
25
|
+
provider: openai
|
|
26
|
+
model: gpt-5.4-mini
|
|
27
|
+
|
|
28
|
+
formal-verifier:
|
|
29
|
+
provider: openai
|
|
30
|
+
model: gpt-5.4-mini
|
|
31
|
+
|
|
32
|
+
bias-detector:
|
|
33
|
+
provider: anthropic
|
|
34
|
+
model: claude-sonnet-4.6
|
|
35
|
+
|
|
36
|
+
systems-thinker:
|
|
37
|
+
provider: google
|
|
38
|
+
model: gemini-2.5-flash
|
|
39
|
+
|
|
40
|
+
resilience-anchor:
|
|
41
|
+
provider: anthropic
|
|
42
|
+
model: claude-sonnet-4.6
|
|
43
|
+
|
|
44
|
+
adversarial-strategist:
|
|
45
|
+
provider: google
|
|
46
|
+
model: gemini-2.5-flash
|
|
47
|
+
|
|
48
|
+
emergence-reader:
|
|
49
|
+
provider: anthropic
|
|
50
|
+
model: claude-sonnet-4.6
|
|
51
|
+
|
|
52
|
+
incentive-mapper:
|
|
53
|
+
provider: anthropic
|
|
54
|
+
model: claude-sonnet-4.6
|
|
55
|
+
|
|
56
|
+
pragmatic-builder:
|
|
57
|
+
provider: openai
|
|
58
|
+
model: gpt-5.4-mini
|
|
59
|
+
|
|
60
|
+
reframer:
|
|
61
|
+
provider: anthropic
|
|
62
|
+
model: claude-sonnet-4.6
|
|
63
|
+
|
|
64
|
+
risk-analyst:
|
|
65
|
+
provider: anthropic
|
|
66
|
+
model: claude-sonnet-4.6
|
|
67
|
+
|
|
68
|
+
inverter:
|
|
69
|
+
provider: google
|
|
70
|
+
model: gemini-2.5-flash
|
|
71
|
+
|
|
72
|
+
# Specialists (only activated for domain triads)
|
|
73
|
+
ml-intuition:
|
|
74
|
+
provider: openai
|
|
75
|
+
model: gpt-5.4
|
|
76
|
+
|
|
77
|
+
safety-frontier:
|
|
78
|
+
provider: anthropic
|
|
79
|
+
model: claude-sonnet-4.6
|
|
80
|
+
|
|
81
|
+
design-lens:
|
|
82
|
+
provider: openai
|
|
83
|
+
model: gpt-5.4-mini
|
|
84
|
+
|
|
85
|
+
# Fallback for any agent not listed above
|
|
86
|
+
fallback:
|
|
87
|
+
provider: anthropic
|
|
88
|
+
model: claude-sonnet-4.6
|
package/install.sh
ADDED
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
set -euo pipefail
|
|
3
|
+
|
|
4
|
+
# deliberate -- Platform-aware installer
|
|
5
|
+
# Installs agent definitions and skill protocol to the correct directories.
|
|
6
|
+
|
|
7
|
+
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
|
8
|
+
DRY_RUN=false
|
|
9
|
+
CLAUDE_DIR="$HOME/.claude"
|
|
10
|
+
WINDSURF_DIR=""
|
|
11
|
+
PLATFORM=""
|
|
12
|
+
SCOPE="workspace"
|
|
13
|
+
|
|
14
|
+
usage() {
|
|
15
|
+
cat <<EOF
|
|
16
|
+
Usage: install.sh [OPTIONS]
|
|
17
|
+
|
|
18
|
+
Install deliberate agents and skill to your AI coding platform.
|
|
19
|
+
|
|
20
|
+
Options:
|
|
21
|
+
--claude-dir DIR Custom Claude config directory (default: ~/.claude)
|
|
22
|
+
--windsurf-dir DIR Custom Windsurf skills directory
|
|
23
|
+
--platform PLATFORM Force specific platform (claude-code, windsurf, cursor, all)
|
|
24
|
+
--global Install globally (available in all workspaces)
|
|
25
|
+
--dry-run Show what would be installed without installing
|
|
26
|
+
-h, --help Show this help
|
|
27
|
+
|
|
28
|
+
Examples:
|
|
29
|
+
./install.sh # Auto-detect platform, workspace install
|
|
30
|
+
./install.sh --global # Auto-detect platform, global install
|
|
31
|
+
./install.sh --platform claude-code # Install for Claude Code only
|
|
32
|
+
./install.sh --platform all # Install for all detected platforms
|
|
33
|
+
./install.sh --dry-run # Preview installation
|
|
34
|
+
EOF
|
|
35
|
+
exit 0
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
while [[ $# -gt 0 ]]; do
|
|
39
|
+
case "$1" in
|
|
40
|
+
--claude-dir) CLAUDE_DIR="$2"; shift 2 ;;
|
|
41
|
+
--windsurf-dir) WINDSURF_DIR="$2"; shift 2 ;;
|
|
42
|
+
--platform) PLATFORM="$2"; shift 2 ;;
|
|
43
|
+
--global) SCOPE="global"; shift ;;
|
|
44
|
+
--dry-run) DRY_RUN=true; shift ;;
|
|
45
|
+
-h|--help) usage ;;
|
|
46
|
+
*) echo "Unknown option: $1" >&2; exit 1 ;;
|
|
47
|
+
esac
|
|
48
|
+
done
|
|
49
|
+
|
|
50
|
+
log() {
|
|
51
|
+
echo "[deliberate] $1"
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
copy_file() {
|
|
55
|
+
local src="$1"
|
|
56
|
+
local dst="$2"
|
|
57
|
+
|
|
58
|
+
if [[ "$DRY_RUN" == "true" ]]; then
|
|
59
|
+
log " (dry-run) $src -> $dst"
|
|
60
|
+
else
|
|
61
|
+
mkdir -p "$(dirname "$dst")"
|
|
62
|
+
cp "$src" "$dst"
|
|
63
|
+
log " $src -> $dst"
|
|
64
|
+
fi
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
install_claude_code() {
|
|
68
|
+
log "Installing for Claude Code..."
|
|
69
|
+
local agents_dir="$CLAUDE_DIR/agents"
|
|
70
|
+
local skill_dir="$CLAUDE_DIR/skills/deliberate"
|
|
71
|
+
|
|
72
|
+
# Core agents
|
|
73
|
+
for agent_file in "$SCRIPT_DIR/agents"/*.md; do
|
|
74
|
+
local name="$(basename "$agent_file")"
|
|
75
|
+
copy_file "$agent_file" "$agents_dir/deliberate-$name"
|
|
76
|
+
done
|
|
77
|
+
|
|
78
|
+
# Specialist agents
|
|
79
|
+
for agent_file in "$SCRIPT_DIR/agents/specialists"/*.md; do
|
|
80
|
+
local name="$(basename "$agent_file")"
|
|
81
|
+
copy_file "$agent_file" "$agents_dir/deliberate-$name"
|
|
82
|
+
done
|
|
83
|
+
|
|
84
|
+
# Skill protocol
|
|
85
|
+
copy_file "$SCRIPT_DIR/SKILL.md" "$skill_dir/SKILL.md"
|
|
86
|
+
copy_file "$SCRIPT_DIR/BRAINSTORM.md" "$skill_dir/BRAINSTORM.md"
|
|
87
|
+
|
|
88
|
+
# Configs
|
|
89
|
+
copy_file "$SCRIPT_DIR/configs/defaults.yaml" "$skill_dir/configs/defaults.yaml"
|
|
90
|
+
copy_file "$SCRIPT_DIR/configs/provider-model-slots.example.yaml" "$skill_dir/configs/provider-model-slots.example.yaml"
|
|
91
|
+
|
|
92
|
+
# Scripts
|
|
93
|
+
copy_file "$SCRIPT_DIR/scripts/start-server.sh" "$skill_dir/scripts/start-server.sh"
|
|
94
|
+
copy_file "$SCRIPT_DIR/scripts/stop-server.sh" "$skill_dir/scripts/stop-server.sh"
|
|
95
|
+
copy_file "$SCRIPT_DIR/scripts/frame-template.html" "$skill_dir/scripts/frame-template.html"
|
|
96
|
+
copy_file "$SCRIPT_DIR/scripts/helper.js" "$skill_dir/scripts/helper.js"
|
|
97
|
+
copy_file "$SCRIPT_DIR/scripts/detect-platform.sh" "$skill_dir/scripts/detect-platform.sh"
|
|
98
|
+
|
|
99
|
+
# Templates
|
|
100
|
+
copy_file "$SCRIPT_DIR/templates/deliberation-output.md" "$skill_dir/templates/deliberation-output.md"
|
|
101
|
+
copy_file "$SCRIPT_DIR/templates/brainstorm-output.md" "$skill_dir/templates/brainstorm-output.md"
|
|
102
|
+
|
|
103
|
+
# Make scripts executable
|
|
104
|
+
if [[ "$DRY_RUN" != "true" ]]; then
|
|
105
|
+
chmod +x "$skill_dir/scripts/start-server.sh"
|
|
106
|
+
chmod +x "$skill_dir/scripts/stop-server.sh"
|
|
107
|
+
chmod +x "$skill_dir/scripts/detect-platform.sh"
|
|
108
|
+
fi
|
|
109
|
+
|
|
110
|
+
log "Claude Code installation complete."
|
|
111
|
+
log " Agents: $agents_dir/deliberate-*.md"
|
|
112
|
+
log " Skill: $skill_dir/SKILL.md"
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
install_windsurf() {
|
|
116
|
+
log "Installing for Windsurf..."
|
|
117
|
+
|
|
118
|
+
local target_dir
|
|
119
|
+
if [[ -n "$WINDSURF_DIR" ]]; then
|
|
120
|
+
target_dir="$WINDSURF_DIR"
|
|
121
|
+
elif [[ "$SCOPE" == "global" ]]; then
|
|
122
|
+
target_dir="$HOME/.codeium/windsurf/skills/deliberate"
|
|
123
|
+
else
|
|
124
|
+
target_dir="$PWD/.windsurf/skills/deliberate"
|
|
125
|
+
fi
|
|
126
|
+
|
|
127
|
+
# Skill protocol
|
|
128
|
+
copy_file "$SCRIPT_DIR/SKILL.md" "$target_dir/SKILL.md"
|
|
129
|
+
copy_file "$SCRIPT_DIR/BRAINSTORM.md" "$target_dir/BRAINSTORM.md"
|
|
130
|
+
|
|
131
|
+
# Agents (bundled with skill since Windsurf doesn't have a global agents dir)
|
|
132
|
+
for agent_file in "$SCRIPT_DIR/agents"/*.md; do
|
|
133
|
+
local name="$(basename "$agent_file")"
|
|
134
|
+
copy_file "$agent_file" "$target_dir/agents/$name"
|
|
135
|
+
done
|
|
136
|
+
|
|
137
|
+
for agent_file in "$SCRIPT_DIR/agents/specialists"/*.md; do
|
|
138
|
+
local name="$(basename "$agent_file")"
|
|
139
|
+
copy_file "$agent_file" "$target_dir/agents/specialists/$name"
|
|
140
|
+
done
|
|
141
|
+
|
|
142
|
+
# Configs
|
|
143
|
+
copy_file "$SCRIPT_DIR/configs/defaults.yaml" "$target_dir/configs/defaults.yaml"
|
|
144
|
+
copy_file "$SCRIPT_DIR/configs/provider-model-slots.example.yaml" "$target_dir/configs/provider-model-slots.example.yaml"
|
|
145
|
+
|
|
146
|
+
# Scripts
|
|
147
|
+
copy_file "$SCRIPT_DIR/scripts/start-server.sh" "$target_dir/scripts/start-server.sh"
|
|
148
|
+
copy_file "$SCRIPT_DIR/scripts/stop-server.sh" "$target_dir/scripts/stop-server.sh"
|
|
149
|
+
copy_file "$SCRIPT_DIR/scripts/frame-template.html" "$target_dir/scripts/frame-template.html"
|
|
150
|
+
copy_file "$SCRIPT_DIR/scripts/helper.js" "$target_dir/scripts/helper.js"
|
|
151
|
+
copy_file "$SCRIPT_DIR/scripts/detect-platform.sh" "$target_dir/scripts/detect-platform.sh"
|
|
152
|
+
|
|
153
|
+
# Templates
|
|
154
|
+
copy_file "$SCRIPT_DIR/templates/deliberation-output.md" "$target_dir/templates/deliberation-output.md"
|
|
155
|
+
copy_file "$SCRIPT_DIR/templates/brainstorm-output.md" "$target_dir/templates/brainstorm-output.md"
|
|
156
|
+
|
|
157
|
+
if [[ "$DRY_RUN" != "true" ]]; then
|
|
158
|
+
chmod +x "$target_dir/scripts/start-server.sh"
|
|
159
|
+
chmod +x "$target_dir/scripts/stop-server.sh"
|
|
160
|
+
chmod +x "$target_dir/scripts/detect-platform.sh"
|
|
161
|
+
fi
|
|
162
|
+
|
|
163
|
+
log "Windsurf installation complete."
|
|
164
|
+
log " Skill: $target_dir/"
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
# Auto-detect or use specified platform
|
|
168
|
+
if [[ -z "$PLATFORM" ]]; then
|
|
169
|
+
log "Auto-detecting platforms..."
|
|
170
|
+
if [[ -d "$CLAUDE_DIR" ]] || command -v claude >/dev/null 2>&1; then
|
|
171
|
+
PLATFORM="claude-code"
|
|
172
|
+
elif [[ -d "$HOME/.codeium/windsurf" ]] || [[ -d ".windsurf" ]]; then
|
|
173
|
+
PLATFORM="windsurf"
|
|
174
|
+
else
|
|
175
|
+
log "No supported platform detected. Use --platform to specify."
|
|
176
|
+
log "Supported: claude-code, windsurf, cursor, all"
|
|
177
|
+
exit 1
|
|
178
|
+
fi
|
|
179
|
+
fi
|
|
180
|
+
|
|
181
|
+
case "$PLATFORM" in
|
|
182
|
+
claude-code)
|
|
183
|
+
install_claude_code
|
|
184
|
+
;;
|
|
185
|
+
windsurf)
|
|
186
|
+
install_windsurf
|
|
187
|
+
;;
|
|
188
|
+
cursor)
|
|
189
|
+
# Cursor uses same structure as Windsurf for skills
|
|
190
|
+
WINDSURF_DIR="${WINDSURF_DIR:-$PWD/.cursor/skills/deliberate}"
|
|
191
|
+
install_windsurf
|
|
192
|
+
;;
|
|
193
|
+
all)
|
|
194
|
+
if [[ -d "$CLAUDE_DIR" ]] || command -v claude >/dev/null 2>&1; then
|
|
195
|
+
install_claude_code
|
|
196
|
+
fi
|
|
197
|
+
install_windsurf
|
|
198
|
+
;;
|
|
199
|
+
*)
|
|
200
|
+
echo "Unknown platform: $PLATFORM" >&2
|
|
201
|
+
exit 1
|
|
202
|
+
;;
|
|
203
|
+
esac
|
|
204
|
+
|
|
205
|
+
log ""
|
|
206
|
+
if [[ "$PLATFORM" == "claude-code" ]]; then
|
|
207
|
+
log "Done. Start a new session and try: /deliberate \"your question here\""
|
|
208
|
+
else
|
|
209
|
+
log "Done. Start a new session and try: @deliberate or just ask a complex decision question."
|
|
210
|
+
fi
|
package/package.json
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@faviovazquez/deliberate",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Multi-agent deliberation skill for AI coding assistants. Agreement is a bug.",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"author": "Favio Vazquez",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "git+https://github.com/FavioVazquez/deliberate.git"
|
|
10
|
+
},
|
|
11
|
+
"homepage": "https://github.com/FavioVazquez/deliberate#readme",
|
|
12
|
+
"bugs": {
|
|
13
|
+
"url": "https://github.com/FavioVazquez/deliberate/issues"
|
|
14
|
+
},
|
|
15
|
+
"publishConfig": {
|
|
16
|
+
"access": "public"
|
|
17
|
+
},
|
|
18
|
+
"keywords": [
|
|
19
|
+
"ai",
|
|
20
|
+
"agents",
|
|
21
|
+
"deliberation",
|
|
22
|
+
"anti-sycophancy",
|
|
23
|
+
"multi-agent",
|
|
24
|
+
"claude-code",
|
|
25
|
+
"windsurf",
|
|
26
|
+
"structured-disagreement",
|
|
27
|
+
"brainstorming"
|
|
28
|
+
],
|
|
29
|
+
"bin": {
|
|
30
|
+
"deliberate": "./bin/cli.js"
|
|
31
|
+
},
|
|
32
|
+
"files": [
|
|
33
|
+
"bin/",
|
|
34
|
+
"agents/",
|
|
35
|
+
"configs/",
|
|
36
|
+
"scripts/",
|
|
37
|
+
"templates/",
|
|
38
|
+
"SKILL.md",
|
|
39
|
+
"BRAINSTORM.md",
|
|
40
|
+
"README.md",
|
|
41
|
+
"CHANGELOG.md",
|
|
42
|
+
"LICENSE",
|
|
43
|
+
"install.sh"
|
|
44
|
+
],
|
|
45
|
+
"engines": {
|
|
46
|
+
"node": ">=18"
|
|
47
|
+
},
|
|
48
|
+
"scripts": {
|
|
49
|
+
"release:patch": "npm version patch && git push && git push --tags",
|
|
50
|
+
"release:minor": "npm version minor && git push && git push --tags",
|
|
51
|
+
"release:major": "npm version major && git push && git push --tags",
|
|
52
|
+
"prepublishOnly": "echo 'Publishing deliberate to npm...'"
|
|
53
|
+
}
|
|
54
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
set -euo pipefail
|
|
3
|
+
|
|
4
|
+
# deliberate -- Platform detection
|
|
5
|
+
# Detects which AI coding platforms are available and outputs JSON.
|
|
6
|
+
|
|
7
|
+
detect_claude_code() {
|
|
8
|
+
local available=false
|
|
9
|
+
local binary=""
|
|
10
|
+
local method=""
|
|
11
|
+
|
|
12
|
+
if command -v claude >/dev/null 2>&1; then
|
|
13
|
+
available=true
|
|
14
|
+
binary="$(command -v claude)"
|
|
15
|
+
method="cli"
|
|
16
|
+
fi
|
|
17
|
+
|
|
18
|
+
# Check for config directory
|
|
19
|
+
local config_dir=""
|
|
20
|
+
if [[ -d "$HOME/.claude" ]]; then
|
|
21
|
+
config_dir="$HOME/.claude"
|
|
22
|
+
fi
|
|
23
|
+
|
|
24
|
+
echo "{\"platform\":\"claude-code\",\"available\":$available,\"binary\":\"$binary\",\"method\":\"$method\",\"config_dir\":\"$config_dir\"}"
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
detect_windsurf() {
|
|
28
|
+
local available=false
|
|
29
|
+
local config_dir=""
|
|
30
|
+
local global_skills_dir=""
|
|
31
|
+
local workspace_skills_dir=""
|
|
32
|
+
|
|
33
|
+
# Check for Windsurf config directories
|
|
34
|
+
# Global skills: ~/.codeium/windsurf/skills/
|
|
35
|
+
# Workspace skills: .windsurf/skills/ (in project root)
|
|
36
|
+
if [[ -d "$HOME/.codeium/windsurf" ]]; then
|
|
37
|
+
available=true
|
|
38
|
+
config_dir="$HOME/.codeium/windsurf"
|
|
39
|
+
global_skills_dir="$HOME/.codeium/windsurf/skills"
|
|
40
|
+
fi
|
|
41
|
+
if [[ -d ".windsurf" ]]; then
|
|
42
|
+
available=true
|
|
43
|
+
workspace_skills_dir="$PWD/.windsurf/skills"
|
|
44
|
+
fi
|
|
45
|
+
|
|
46
|
+
echo "{\"platform\":\"windsurf\",\"available\":$available,\"config_dir\":\"$config_dir\",\"global_skills_dir\":\"$global_skills_dir\",\"workspace_skills_dir\":\"$workspace_skills_dir\"}"
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
detect_cursor() {
|
|
50
|
+
local available=false
|
|
51
|
+
local config_dir=""
|
|
52
|
+
|
|
53
|
+
if [[ -d "$HOME/.cursor" ]]; then
|
|
54
|
+
available=true
|
|
55
|
+
config_dir="$HOME/.cursor"
|
|
56
|
+
fi
|
|
57
|
+
|
|
58
|
+
echo "{\"platform\":\"cursor\",\"available\":$available,\"config_dir\":\"$config_dir\"}"
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
# Output all platforms
|
|
62
|
+
echo "{"
|
|
63
|
+
echo " \"platforms\": ["
|
|
64
|
+
echo " $(detect_claude_code),"
|
|
65
|
+
echo " $(detect_windsurf),"
|
|
66
|
+
echo " $(detect_cursor)"
|
|
67
|
+
echo " ],"
|
|
68
|
+
echo " \"node_available\": $(command -v node >/dev/null 2>&1 && echo true || echo false),"
|
|
69
|
+
echo " \"node_version\": \"$(node --version 2>/dev/null || echo 'not installed')\""
|
|
70
|
+
echo "}"
|