From 96de947aeae8ba9b6efa869924c933b3003372a6 Mon Sep 17 00:00:00 2001 From: Anurag Garg Date: Tue, 2 Jun 2026 20:28:11 +0530 Subject: [PATCH] fix: remove session-start hooks and using-ia bootstrap (v1.0.1) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The SessionStart hooks ran `bash hooks/session-start`, which errored on startup in any environment without bash on PATH (e.g. Windows without Git Bash or WSL). The auto-trigger isn't worth a hard error every session, so the hooks are removed. That makes the using-ia bootstrap skill obsolete — it only loaded via the hook — so it's removed too. The ia skill's own description drives discovery. - delete hooks/ (hooks.json, hooks-cursor.json, session-start, run-hook.cmd) - delete skills/using-ia/ - drop hook/using-ia refs from manifests, validate.yml, README - bump all manifests to 1.0.1; add CHANGELOG 1.0.1 entry --- .agents/plugins/marketplace.json | 2 +- .claude-plugin/marketplace.json | 2 +- .claude-plugin/plugin.json | 5 ++-- .codex-plugin/plugin.json | 2 +- .cursor-plugin/plugin.json | 5 ++-- .github/plugin/marketplace.json | 2 +- .github/workflows/validate.yml | 4 --- CHANGELOG.md | 7 +++++ README.md | 3 +- gemini-extension.json | 2 +- hooks/hooks-cursor.json | 10 ------- hooks/hooks.json | 16 ----------- hooks/run-hook.cmd | 44 ---------------------------- hooks/session-start | 49 -------------------------------- package.json | 2 +- plugin.json | 2 +- skills/using-ia/SKILL.md | 11 ------- 17 files changed, 19 insertions(+), 149 deletions(-) delete mode 100644 hooks/hooks-cursor.json delete mode 100644 hooks/hooks.json delete mode 100644 hooks/run-hook.cmd delete mode 100755 hooks/session-start delete mode 100644 skills/using-ia/SKILL.md diff --git a/.agents/plugins/marketplace.json b/.agents/plugins/marketplace.json index 9cb4f73..2fe4ff3 100644 --- a/.agents/plugins/marketplace.json +++ b/.agents/plugins/marketplace.json @@ -8,7 +8,7 @@ "plugins": [ { "name": "ia", - "version": "1.0.0", + "version": "1.0.1", "description": "IBM i Impact Analysis — dependency tracing, field impact, call hierarchy, program documentation.", "source": "./" } diff --git a/.claude-plugin/marketplace.json b/.claude-plugin/marketplace.json index 9cb4f73..2fe4ff3 100644 --- a/.claude-plugin/marketplace.json +++ b/.claude-plugin/marketplace.json @@ -8,7 +8,7 @@ "plugins": [ { "name": "ia", - "version": "1.0.0", + "version": "1.0.1", "description": "IBM i Impact Analysis — dependency tracing, field impact, call hierarchy, program documentation.", "source": "./" } diff --git a/.claude-plugin/plugin.json b/.claude-plugin/plugin.json index 6e5b8e4..7f01d31 100644 --- a/.claude-plugin/plugin.json +++ b/.claude-plugin/plugin.json @@ -1,6 +1,6 @@ { "name": "ia", - "version": "1.0.0", + "version": "1.0.1", "description": "IBM i Impact Analysis — dependency tracing, field impact, call hierarchy, program documentation.", "homepage": "https://github.com/programmersio-ibmi/skills", "license": "MIT", @@ -10,7 +10,6 @@ "url": "https://programmers.io" }, "skills": [ - "./skills/ia", - "./skills/using-ia" + "./skills/ia" ] } diff --git a/.codex-plugin/plugin.json b/.codex-plugin/plugin.json index d9aae96..69bec2c 100644 --- a/.codex-plugin/plugin.json +++ b/.codex-plugin/plugin.json @@ -1,6 +1,6 @@ { "name": "ia", - "version": "1.0.0", + "version": "1.0.1", "description": "IBM i Impact Analysis for coding agents.", "homepage": "https://github.com/programmersio-ibmi/skills", "license": "MIT", diff --git a/.cursor-plugin/plugin.json b/.cursor-plugin/plugin.json index fcee47e..8be46ef 100644 --- a/.cursor-plugin/plugin.json +++ b/.cursor-plugin/plugin.json @@ -1,11 +1,10 @@ { "name": "ia", "displayName": "iA — IBM i Impact Analysis", - "version": "1.0.0", + "version": "1.0.1", "description": "IBM i Impact Analysis — dependency tracing, field impact, call hierarchy, program documentation.", "publisher": "programmersio", "homepage": "https://github.com/programmersio-ibmi/skills", "license": "MIT", - "skills": "./skills/", - "hooks": "./hooks/hooks-cursor.json" + "skills": "./skills/" } diff --git a/.github/plugin/marketplace.json b/.github/plugin/marketplace.json index 9cb4f73..2fe4ff3 100644 --- a/.github/plugin/marketplace.json +++ b/.github/plugin/marketplace.json @@ -8,7 +8,7 @@ "plugins": [ { "name": "ia", - "version": "1.0.0", + "version": "1.0.1", "description": "IBM i Impact Analysis — dependency tracing, field impact, call hierarchy, program documentation.", "source": "./" } diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index a8472e9..5654f27 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -59,11 +59,7 @@ jobs: "package.json" ".version-bump.json" "scripts/bump-version.sh" - "hooks/hooks.json" - "hooks/hooks-cursor.json" - "hooks/session-start" "skills/ia/SKILL.md" - "skills/using-ia/SKILL.md" "CLAUDE.md" "AGENTS.md" "GEMINI.md" diff --git a/CHANGELOG.md b/CHANGELOG.md index f9cd7cd..8f5783c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,13 @@ All notable changes to this project are documented here. The format is loosely based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and the project uses [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [1.0.1] — 2026-06-02 + +### Removed + +- Session-start hooks (Claude Code, Cursor, GitHub Copilot CLI). They ran `bash hooks/session-start`, which errored on startup in any environment without `bash` on `PATH` (e.g. Windows without Git Bash or WSL). +- `using-ia` bootstrap meta-skill. It only loaded via the session-start hook, so it no longer served a purpose; the `ia` skill's own description drives discovery. + ## [1.0.0] — 2026-05-17 ### Added diff --git a/README.md b/README.md index bd4f9a5..1426e29 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,6 @@ Agent skills for **IBM i**. Drop-in plugins for Claude Code, GitHub Copilot, Cur | Skill | What it does | |-------|--------------| | **ia** | IBM i Impact Analysis — where-used, call hierarchy, field impact, file dependents, program-spec generation. | -| **using-ia** | Tiny bootstrap that primes the agent to reach for `ia` on any IBM i task. Loads automatically via session-start hook. | ## Install @@ -66,7 +65,7 @@ Once installed, ask the agent something like: > *Trace where field `CUSTNO` is used in `CUSTMAST`.* -The agent should invoke the `ia` skill automatically (no `/ia` prefix needed) and answer in 1–2 tool calls. +The agent should invoke the `ia` skill and answer in 1–2 tool calls (type `/ia` first if your harness doesn't surface it automatically). ## How it works diff --git a/gemini-extension.json b/gemini-extension.json index 1cbeaca..442174b 100644 --- a/gemini-extension.json +++ b/gemini-extension.json @@ -1,6 +1,6 @@ { "name": "ia", - "version": "1.0.0", + "version": "1.0.1", "description": "IBM i Impact Analysis — dependency tracing, field impact, call hierarchy, program documentation.", "contextFileName": "GEMINI.md" } diff --git a/hooks/hooks-cursor.json b/hooks/hooks-cursor.json deleted file mode 100644 index 20bde48..0000000 --- a/hooks/hooks-cursor.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "version": 1, - "hooks": { - "sessionStart": [ - { - "command": "bash ./hooks/session-start" - } - ] - } -} diff --git a/hooks/hooks.json b/hooks/hooks.json deleted file mode 100644 index 7018be4..0000000 --- a/hooks/hooks.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "hooks": { - "SessionStart": [ - { - "matcher": "startup|clear|compact", - "hooks": [ - { - "type": "command", - "command": "bash \"${CLAUDE_PLUGIN_ROOT}/hooks/session-start\"", - "async": false - } - ] - } - ] - } -} diff --git a/hooks/run-hook.cmd b/hooks/run-hook.cmd deleted file mode 100644 index b688974..0000000 --- a/hooks/run-hook.cmd +++ /dev/null @@ -1,44 +0,0 @@ -@echo off -REM Windows wrapper: invokes the named hook script under Git Bash or WSL. -REM Used when Claude Code / Cursor / Copilot CLI cannot launch a POSIX -REM script directly because Windows path expansion would break the -REM ${CLAUDE_PLUGIN_ROOT} substitution. -REM -REM Usage: run-hook.cmd -REM Example: run-hook.cmd session-start - -SETLOCAL - -SET "HOOK_DIR=%~dp0" -SET "HOOK_NAME=%~1" - -IF "%HOOK_NAME%"=="" ( - ECHO Usage: %~nx0 ^ 1>&2 - EXIT /B 2 -) - -SET "SCRIPT=%HOOK_DIR%%HOOK_NAME%" - -IF NOT EXIST "%SCRIPT%" ( - ECHO Error: hook script not found: %SCRIPT% 1>&2 - EXIT /B 2 -) - -REM Prefer Git Bash if installed on PATH. -WHERE bash >NUL 2>&1 -IF %ERRORLEVEL%==0 ( - bash "%SCRIPT%" - EXIT /B %ERRORLEVEL% -) - -REM Fall back to WSL. -WHERE wsl >NUL 2>&1 -IF %ERRORLEVEL%==0 ( - FOR /F "usebackq delims=" %%i IN (`wsl wslpath -u "%SCRIPT%"`) DO SET "WSL_SCRIPT=%%i" - wsl bash "%WSL_SCRIPT%" - EXIT /B %ERRORLEVEL% -) - -ECHO Error: neither Git Bash nor WSL is available on PATH. 1>&2 -ECHO Install Git for Windows (https://git-scm.com/) or enable WSL. 1>&2 -EXIT /B 1 diff --git a/hooks/session-start b/hooks/session-start deleted file mode 100755 index 1aa54c6..0000000 --- a/hooks/session-start +++ /dev/null @@ -1,49 +0,0 @@ -#!/usr/bin/env bash -# Session-start bootstrap: primes the agent with the using-ia meta-skill so -# the iA skill is volunteered for any IBM i task on the first turn. -# -# Detects host platform via env vars and emits the matching JSON envelope: -# Cursor -> {"additional_context": "..."} (top-level snake_case) -# Claude Code -> {"hookSpecificOutput": {"hookEventName": "SessionStart", "additionalContext": "..."}} -# Copilot CLI -> {"additionalContext": "..."} (top-level camelCase) - -set -euo pipefail - -HOOK_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" -SKILL_FILE="${HOOK_DIR}/../skills/using-ia/SKILL.md" - -if [[ -f "$SKILL_FILE" ]]; then - # Strip YAML frontmatter (everything between the first two `---` markers). - PRIMER=$(awk ' - /^---[[:space:]]*$/ { fm++; next } - fm < 2 { next } - { print } - ' "$SKILL_FILE") -else - PRIMER="You have an iA skill for IBM i. Invoke it before any RPG, CL, DDS, or program analysis task." -fi - -# JSON-escape the primer string. Python reads stdin as raw bytes and decodes -# UTF-8 explicitly so locale (LC_ALL=C, cp1252 on Windows, etc.) doesn't -# mangle multi-byte characters in the bootstrap text. -if command -v python3 >/dev/null 2>&1; then - PRIMER_JSON=$(printf '%s' "$PRIMER" | python3 -c "import json,sys; sys.stdout.write(json.dumps(sys.stdin.buffer.read().decode('utf-8')))") -elif command -v python >/dev/null 2>&1; then - PRIMER_JSON=$(printf '%s' "$PRIMER" | python -c "import json,sys; sys.stdout.write(json.dumps(sys.stdin.buffer.read().decode('utf-8') if hasattr(sys.stdin,'buffer') else sys.stdin.read()))") -elif command -v jq >/dev/null 2>&1; then - PRIMER_JSON=$(printf '%s' "$PRIMER" | jq -Rs .) -else - # Last-resort: minimal escape for backslashes, double quotes, and newlines. - # ASCII-only — non-ASCII characters get lost. - esc=$(printf '%s' "$PRIMER" | sed -e 's/\\/\\\\/g' -e 's/"/\\"/g' | awk 'BEGIN{ORS=""} {if(NR>1) printf "\\n"; print}') - PRIMER_JSON="\"${esc}\"" -fi - -# Platform detection (in priority order). -if [[ -n "${CURSOR_WORKSPACE:-}${CURSOR_HOOK:-}${CURSOR_AGENT:-}" ]]; then - printf '{"additional_context": %s}\n' "$PRIMER_JSON" -elif [[ -n "${GITHUB_COPILOT_CLI:-}${COPILOT_AGENT:-}${COPILOT_CLI:-}" ]]; then - printf '{"additionalContext": %s}\n' "$PRIMER_JSON" -else - printf '{"hookSpecificOutput": {"hookEventName": "SessionStart", "additionalContext": %s}}\n' "$PRIMER_JSON" -fi diff --git a/package.json b/package.json index 6328638..afbb3cc 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ia-tools-skill", - "version": "1.0.0", + "version": "1.0.1", "description": "IBM i Impact Analysis — dependency tracing, field impact, call hierarchy, program documentation.", "license": "MIT", "type": "module", diff --git a/plugin.json b/plugin.json index 3325034..14e5dc9 100644 --- a/plugin.json +++ b/plugin.json @@ -1,6 +1,6 @@ { "name": "ia", - "version": "1.0.0", + "version": "1.0.1", "description": "IBM i Impact Analysis — dependency tracing, field impact, call hierarchy, program documentation.", "publisher": "programmersio", "homepage": "https://github.com/programmersio-ibmi/skills", diff --git a/skills/using-ia/SKILL.md b/skills/using-ia/SKILL.md deleted file mode 100644 index cd9aa16..0000000 --- a/skills/using-ia/SKILL.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -name: using-ia -description: Use when starting any conversation about IBM i. Establishes that the /ia skill exists and must be invoked for RPG, CL, DDS, programs, files, fields, where-used, call hierarchy, impact analysis, or program documentation tasks. ---- - -You have an `ia` skill for IBM i Impact Analysis. - -For ANY IBM i task — RPG, CL, DDS, program analysis, where-used, call hierarchy, -field impact, file dependents, program documentation — invoke the Skill tool -with `ia` BEFORE doing anything else. Do not grep RPG source manually. Do not -guess at call relationships. Use the `ia_*` MCP tools the skill teaches you.