diff --git a/README.md b/README.md index e25377d..66fca3b 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ into shell-specific packages that can be inspected before they are installed. ## Capability check -Check the selected shell's minimum version and required Python and `jq` tools before setup. The command exits with an error when a requirement is missing. +Check the selected shell's minimum version and required Python tools before setup. Missing `jq` produces a warning because only Claude's Bash status line needs it. The command exits with an error when a requirement is missing. PowerShell: diff --git a/TODO.md b/TODO.md index b240a71..fa659d2 100644 --- a/TODO.md +++ b/TODO.md @@ -27,7 +27,7 @@ ## Rules, checks, and documentation -- [ ] Make `jq` conditional in capability checks. Both checks fail when it is absent, although the runtime doctor only warns and the requirement is limited to Claude's Bash status line. (`scripts/commands/check-capabilities.ps1:12`, `scripts/commands/check-capabilities.sh:19`, `README.md:110`) +- [x] Make `jq` conditional in capability checks. Both checks fail when it is absent, although the runtime doctor only warns and the requirement is limited to Claude's Bash status line. (`scripts/commands/check-capabilities.ps1:12`, `scripts/commands/check-capabilities.sh:19`, `README.md:110`) - [ ] Review the global MCPorter-only rule's failure behavior. It prohibits all direct MCP use and requires stopping when MCPorter is unavailable, even for a user-authorized native connection; decide whether this restriction should be scoped to managed servers. (`shared/global-instructions.md:7`) - [ ] Align Context7 selection with the MCPorter-only rule. If Context7 is selected without MCPorter, reconciliation installs its native client plugin even though the generated instructions forbid using native MCP connections. Either require MCPorter for this entry or change the rule and menu together. (`scripts/lib/managed-extensions.py:465`, `adapters/plugins.tsv:5`, `shared/global-instructions.md:7`) - [ ] Clarify the decision rule for minor reversible UI choices. Its broad instruction to ask when UI/UX behavior is open to interpretation can block routine choices that `general.md` says to make independently unless materially ambiguous. (`shared/rules/decision-rule.md:6`, `shared/rules/general.md:5`) diff --git a/scripts/commands/check-capabilities.ps1 b/scripts/commands/check-capabilities.ps1 index d46c031..1569742 100644 --- a/scripts/commands/check-capabilities.ps1 +++ b/scripts/commands/check-capabilities.ps1 @@ -9,7 +9,8 @@ function Version-AtLeast([string]$version, [version]$minimum) { try { return ([v function Check-Version([string]$name, [string]$version, [version]$minimum) { if (Version-AtLeast $version $minimum) { Pass "$name $version (minimum $minimum)" } else { Fail "$name $version is below minimum $minimum" } } Check-Version 'PowerShell' $PSVersionTable.PSVersion.ToString() ([version]'5.1') -Require-Command jq +if (Get-Command jq -ErrorAction SilentlyContinue) { Pass 'jq available for Claude Bash status line' } +else { Write-Warning 'jq unavailable; Claude Bash status line is disabled' } $pythonVersion = $null foreach ($python in @('python', 'python3')) { if (-not (Get-Command $python -ErrorAction SilentlyContinue)) { continue } diff --git a/scripts/commands/check-capabilities.sh b/scripts/commands/check-capabilities.sh index f95a8ba..d74c9de 100644 --- a/scripts/commands/check-capabilities.sh +++ b/scripts/commands/check-capabilities.sh @@ -16,7 +16,8 @@ check_version() { } check_version Bash "${BASH_VERSINFO[0]}.${BASH_VERSINFO[1]}" 4.3 -require_command awk; require_command sed; require_command sha256sum; require_command jq +require_command awk; require_command sed; require_command sha256sum +if command -v jq >/dev/null 2>&1; then pass 'jq available for Claude Bash status line'; else printf 'WARN jq unavailable; Claude Bash status line is disabled\n' >&2; fi require_command python3 if command -v python3 >/dev/null 2>&1 && python3 -c 'import sys; raise SystemExit(sys.version_info < (3, 11))' >/dev/null 2>&1; then pass "Python $(python3 --version 2>&1 | awk '{print $2}') (minimum 3.11)"