Skip to content

Commit 7d41b73

Browse files
nyldnclaude
andcommitted
feat(setup): Add essential developer tools setup (v4.8.2)
Setup Wizard Step 10 - Essential Developer Tools: - jq: JSON processor (critical for AI workflows) - shellcheck: Shell script static analysis - gh: GitHub CLI for PR/issue automation - imagemagick: Screenshot compression (5MB API limits) - playwright: Modern browser automation & screenshots New functions (bash 3.2 compatible): - get_tool_description() - Human-readable descriptions - is_tool_installed() - Cross-platform detection - get_install_command() - Platform-specific install (brew/apt) - install_tool() - Interactive installation with progress Installation options: 1. Install all missing (recommended) 2. Install critical only (jq, shellcheck) 3. Skip for now Also includes: - v4.8.1 changelog (performance optimizations) - Removed declare -A for bash 3.2 (macOS) compatibility - Test suite expanded to 171 tests (+10 essential tools tests) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
1 parent 79c16d2 commit 7d41b73

6 files changed

Lines changed: 358 additions & 9 deletions

File tree

.claude-plugin/marketplace.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"name": "claude-octopus",
1313
"source": "./",
1414
"description": "Multi-tentacled orchestrator using Double Diamond methodology",
15-
"version": "4.8.0",
15+
"version": "4.8.2",
1616
"author": {
1717
"name": "nyldn"
1818
},
@@ -28,7 +28,10 @@
2828
"provider-routing",
2929
"openrouter",
3030
"crossfire",
31-
"adversarial-review"
31+
"adversarial-review",
32+
"essential-tools",
33+
"playwright",
34+
"shellcheck"
3235
],
3336
"category": "orchestration"
3437
}

.claude-plugin/plugin.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "claude-octopus",
3-
"version": "4.8.0",
3+
"version": "4.8.2",
44
"description": "Multi-tentacled orchestrator using Double Diamond methodology",
55
"author": {
66
"name": "nyldn"

CHANGELOG.md

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,68 @@ All notable changes to Claude Octopus will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [4.8.2] - 2026-01-16
9+
10+
### Added - Essential Developer Tools Setup
11+
12+
#### Setup Wizard Step 10: Essential Tools
13+
- **Tool categories**: Data processing, code auditing, Git, browser automation
14+
- **Included tools**:
15+
- `jq` - JSON processor (critical for AI workflows)
16+
- `shellcheck` - Shell script static analysis
17+
- `gh` - GitHub CLI for PR/issue automation
18+
- `imagemagick` - Screenshot compression (5MB API limits)
19+
- `playwright` - Modern browser automation & screenshots
20+
21+
#### New Functions
22+
- `get_tool_description()` - Get human-readable tool description
23+
- `is_tool_installed()` - Check if a tool is available
24+
- `get_install_command()` - Get platform-specific install command (macOS/Linux)
25+
- `install_tool()` - Install a single tool with progress output
26+
27+
#### Tool Installation Options
28+
- Option 1: Install all missing tools (recommended)
29+
- Option 2: Install critical only (jq, shellcheck)
30+
- Option 3: Skip for now
31+
32+
### Changed
33+
- Setup wizard expanded to 10 steps
34+
- Summary shows essential tools status
35+
- Test suite expanded to 171 tests (+10 essential tools tests)
36+
37+
### Fixed
38+
- Removed `declare -A` associative arrays for bash 3.2 (macOS) compatibility
39+
40+
---
41+
42+
## [4.8.1] - 2026-01-16
43+
44+
### Added - Performance Optimizations
45+
46+
#### JSON Parsing (~10x faster)
47+
- `json_extract()` - Single field extraction using bash regex
48+
- `json_extract_multi()` - Multi-field extraction in single pass
49+
- No subprocess spawning for simple JSON operations
50+
51+
#### Config Parsing (~5x faster)
52+
- Rewrote `load_providers_config()` to use single-pass while-read loop
53+
- Eliminated 30+ grep/sed chains in config parsing
54+
55+
#### Preflight Caching (~50-200ms saved per command)
56+
- `preflight_cache_valid()` - Check if cache is still valid
57+
- `preflight_cache_write()` - Write cache with TTL
58+
- `preflight_cache_invalidate()` - Invalidate on config change
59+
- 1-hour TTL prevents redundant preflight checks
60+
61+
#### Logging Optimization
62+
- Early return in `log()` for disabled DEBUG level
63+
- Skips expensive operations when not needed
64+
65+
### Changed
66+
- Test suite expanded to 161 tests (+15 performance tests)
67+
68+
---
69+
870
## [4.8.0] - 2026-01-16
971

1072
### Added - Subscription-Aware Multi-Provider Routing

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<img src="https://img.shields.io/badge/Claude_Code-Plugin-blueviolet" alt="Claude Code Plugin">
77
<img src="https://img.shields.io/badge/Double_Diamond-Design_Thinking-orange" alt="Double Diamond">
88
<img src="https://img.shields.io/badge/License-MIT-green" alt="MIT License">
9-
<img src="https://img.shields.io/badge/Version-4.8.0-blue" alt="Version 4.8.0">
9+
<img src="https://img.shields.io/badge/Version-4.8.2-blue" alt="Version 4.8.2">
1010
</p>
1111

1212
# Claude Octopus

scripts/orchestrate.sh

Lines changed: 180 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2462,8 +2462,7 @@ init_interactive() {
24622462
# Provides actionable error messages with unique codes
24632463
# ═══════════════════════════════════════════════════════════════════════════════
24642464

2465-
# Error code registry
2466-
declare -A ERROR_MESSAGES 2>/dev/null || true
2465+
# Error code registry (bash 3.2 compatible - uses regular array)
24672466
ERROR_CODES=(
24682467
"E001:OPENAI_API_KEY not set:export OPENAI_API_KEY=\"sk-...\" && orchestrate.sh preflight:help api-setup"
24692468
"E002:GEMINI_API_KEY not set:export GEMINI_API_KEY=\"AIza...\" && orchestrate.sh preflight:help api-setup"
@@ -5797,6 +5796,90 @@ open_browser() {
57975796
fi
57985797
}
57995798

5799+
# ═══════════════════════════════════════════════════════════════════════════════
5800+
# ESSENTIAL DEVELOPER TOOLS - Detection and Installation (v4.8.2)
5801+
# Tools that AI coding assistants rely on for auditing, testing, and browser work
5802+
# Compatible with bash 3.2+ (macOS default)
5803+
# ═══════════════════════════════════════════════════════════════════════════════
5804+
5805+
# Essential tools list (space-separated for bash 3.2 compat)
5806+
ESSENTIAL_TOOLS_LIST="jq shellcheck gh imagemagick playwright"
5807+
5808+
# Get tool description
5809+
get_tool_description() {
5810+
case "$1" in
5811+
jq) echo "JSON processor (critical for AI workflows)" ;;
5812+
shellcheck) echo "Shell script static analysis" ;;
5813+
gh) echo "GitHub CLI for PR/issue automation" ;;
5814+
imagemagick) echo "Screenshot compression (5MB API limits)" ;;
5815+
playwright) echo "Modern browser automation & screenshots" ;;
5816+
*) echo "Developer tool" ;;
5817+
esac
5818+
}
5819+
5820+
# Check if a tool is installed
5821+
is_tool_installed() {
5822+
local tool="$1"
5823+
case "$tool" in
5824+
imagemagick)
5825+
command -v convert &>/dev/null || command -v magick &>/dev/null
5826+
;;
5827+
playwright)
5828+
# Check for playwright in node_modules or global
5829+
command -v playwright &>/dev/null || [[ -f "node_modules/.bin/playwright" ]] || npx playwright --version &>/dev/null 2>&1
5830+
;;
5831+
*)
5832+
command -v "$tool" &>/dev/null
5833+
;;
5834+
esac
5835+
}
5836+
5837+
# Get install command for current platform
5838+
get_install_command() {
5839+
local tool="$1"
5840+
5841+
if [[ "$OSTYPE" == "darwin"* ]]; then
5842+
# macOS - prefer brew
5843+
case "$tool" in
5844+
jq) echo "brew install jq" ;;
5845+
shellcheck) echo "brew install shellcheck" ;;
5846+
gh) echo "brew install gh" ;;
5847+
imagemagick) echo "brew install imagemagick" ;;
5848+
playwright) echo "npx playwright install" ;;
5849+
esac
5850+
else
5851+
# Linux - apt-get
5852+
case "$tool" in
5853+
jq) echo "sudo apt-get install -y jq" ;;
5854+
shellcheck) echo "sudo apt-get install -y shellcheck" ;;
5855+
gh) echo "sudo apt-get install -y gh" ;;
5856+
imagemagick) echo "sudo apt-get install -y imagemagick" ;;
5857+
playwright) echo "npx playwright install" ;;
5858+
esac
5859+
fi
5860+
}
5861+
5862+
# Install a single tool
5863+
install_tool() {
5864+
local tool="$1"
5865+
local install_cmd
5866+
install_cmd=$(get_install_command "$tool")
5867+
5868+
if [[ -z "$install_cmd" ]]; then
5869+
echo -e " ${RED}${NC} No install command for $tool"
5870+
return 1
5871+
fi
5872+
5873+
echo -e " ${CYAN}${NC} $install_cmd"
5874+
if eval "$install_cmd" 2>&1 | sed 's/^/ /'; then
5875+
echo -e " ${GREEN}${NC} $tool installed"
5876+
return 0
5877+
else
5878+
echo -e " ${RED}${NC} Failed to install $tool"
5879+
return 1
5880+
fi
5881+
}
5882+
58005883
# Interactive setup wizard
58015884
setup_wizard() {
58025885
echo ""
@@ -5808,7 +5891,7 @@ setup_wizard() {
58085891
echo -e " This wizard will help you install dependencies and configure API keys."
58095892
echo ""
58105893

5811-
local total_steps=9
5894+
local total_steps=10
58125895
local current_step=0
58135896
local shell_profile=""
58145897
local keys_to_add=""
@@ -6150,6 +6233,89 @@ setup_wizard() {
61506233
preflight_cache_invalidate # Invalidate cache after config change
61516234
echo -e " ${GREEN}${NC} Provider configuration saved"
61526235

6236+
# ═══════════════════════════════════════════════════════════════════════════
6237+
# STEP 10: Essential Developer Tools (v4.8.2)
6238+
# ═══════════════════════════════════════════════════════════════════════════
6239+
((current_step++))
6240+
echo ""
6241+
echo -e "${CYAN}Step $current_step/$total_steps: Essential Developer Tools${NC}"
6242+
echo -e " ${YELLOW}Tools that AI coding assistants rely on for auditing, QA, and browser work.${NC}"
6243+
echo ""
6244+
6245+
# Detect tool status
6246+
local missing_tools=()
6247+
local installed_tools=()
6248+
local tool desc
6249+
6250+
for tool in jq shellcheck gh imagemagick playwright; do
6251+
desc=$(get_tool_description "$tool")
6252+
6253+
if is_tool_installed "$tool"; then
6254+
installed_tools+=("$tool")
6255+
echo -e " ${GREEN}${NC} $tool - $desc"
6256+
else
6257+
missing_tools+=("$tool")
6258+
echo -e " ${YELLOW}${NC} $tool - $desc"
6259+
fi
6260+
done
6261+
6262+
echo ""
6263+
6264+
if [[ ${#missing_tools[@]} -gt 0 ]]; then
6265+
echo -e " ${YELLOW}${#missing_tools[@]} tools missing.${NC} These improve AI agent capabilities:"
6266+
echo ""
6267+
echo -e " ${CYAN}Why these tools matter:${NC}"
6268+
echo -e "${GREEN}jq${NC} - Parse JSON from API responses (critical!)"
6269+
echo -e "${GREEN}shellcheck${NC} - Validate shell scripts before running"
6270+
echo -e "${GREEN}gh${NC} - Create PRs/issues directly from CLI"
6271+
echo -e "${GREEN}imagemagick${NC} - Compress screenshots for API limits (5MB)"
6272+
echo -e "${GREEN}playwright${NC} - Browser automation, screenshots, QA testing"
6273+
echo ""
6274+
6275+
echo -e " ${GREEN}[1]${NC} Install all missing tools ${CYAN}(Recommended)${NC}"
6276+
echo -e " ${GREEN}[2]${NC} Install critical only (jq, shellcheck)"
6277+
echo -e " ${GREEN}[3]${NC} Skip for now"
6278+
echo ""
6279+
read -p " Enter choice [1-3, default 1]: " tools_choice
6280+
tools_choice="${tools_choice:-1}"
6281+
6282+
local tools_to_install=()
6283+
case "$tools_choice" in
6284+
1)
6285+
tools_to_install=("${missing_tools[@]}")
6286+
;;
6287+
2)
6288+
for tool in jq shellcheck; do
6289+
if [[ " ${missing_tools[*]} " =~ " $tool " ]]; then
6290+
tools_to_install+=("$tool")
6291+
fi
6292+
done
6293+
;;
6294+
3)
6295+
echo -e " ${YELLOW}${NC} Skipped. Some AI features may be limited."
6296+
;;
6297+
esac
6298+
6299+
if [[ ${#tools_to_install[@]} -gt 0 ]]; then
6300+
echo ""
6301+
echo -e " ${CYAN}Installing ${#tools_to_install[@]} tools...${NC}"
6302+
echo ""
6303+
6304+
local installed_count=0
6305+
for tool in "${tools_to_install[@]}"; do
6306+
if install_tool "$tool"; then
6307+
((installed_count++))
6308+
fi
6309+
done
6310+
6311+
echo ""
6312+
echo -e " ${GREEN}${NC} Installed $installed_count/${#tools_to_install[@]} tools"
6313+
fi
6314+
else
6315+
echo -e " ${GREEN}All essential tools already installed!${NC}"
6316+
fi
6317+
echo ""
6318+
61536319
# ═══════════════════════════════════════════════════════════════════════════
61546320
# SUMMARY & PERSISTENCE
61556321
# ═══════════════════════════════════════════════════════════════════════════
@@ -6201,6 +6367,17 @@ setup_wizard() {
62016367
echo -e " Claude: ${GREEN}$PROVIDER_CLAUDE_TIER${NC} ($PROVIDER_CLAUDE_COST_TIER)"
62026368
echo -e " Strategy: ${GREEN}$COST_OPTIMIZATION_STRATEGY${NC}"
62036369
echo ""
6370+
echo -e " ${CYAN}Essential Tools (v4.8.2):${NC}"
6371+
local tool_status_count=0
6372+
for tool in jq shellcheck gh imagemagick playwright; do
6373+
if is_tool_installed "$tool"; then
6374+
echo -e " ${GREEN}${NC} $tool"
6375+
((tool_status_count++))
6376+
else
6377+
echo -e " ${YELLOW}${NC} $tool (optional)"
6378+
fi
6379+
done
6380+
echo ""
62046381

62056382
# Offer to persist keys
62066383
if [[ -n "$keys_to_add" ]]; then

0 commit comments

Comments
 (0)