From 848e5d30a3efe59885be5dcac2cce05c5e1ffab9 Mon Sep 17 00:00:00 2001 From: Darshit Patel Date: Tue, 26 May 2026 15:46:26 +0530 Subject: [PATCH] chore: align assets and docs with agentskills runtime model Remove CLI snapshot drift automation and keep only result-template.md in assets. Update CLI reference timeout wording and README maintainer workflow. --- .github/workflows/sync-cli-updates.yml | 156 ------------------ README.md | 60 ++++--- assets/claude-snapshot.txt | 81 --------- assets/codex-snapshot.txt | 127 -------------- assets/cursor-snapshot.txt | 81 --------- assets/gemini-snapshot.txt | 49 ------ assets/junie-snapshot.txt | 91 ---------- assets/opencode-snapshot.txt | 59 ------- assets/qwen-snapshot.txt | 69 -------- codex/references/cli-codex.md | 2 +- ...2026-05-26-skill-creator-cleanup-design.md | 51 ++++++ opencode/references/cli-opencode.md | 2 +- qwen/references/cli-qwen.md | 2 +- references/cli-codex.md | 2 +- references/cli-opencode.md | 2 +- references/cli-qwen.md | 2 +- scripts/detect-updates.sh | 82 --------- scripts/query-cli.sh | 3 +- scripts/run-workflow.sh | 2 +- tests/bats/detect_updates.bats | 155 ----------------- 20 files changed, 93 insertions(+), 985 deletions(-) delete mode 100644 .github/workflows/sync-cli-updates.yml delete mode 100644 assets/claude-snapshot.txt delete mode 100644 assets/codex-snapshot.txt delete mode 100644 assets/cursor-snapshot.txt delete mode 100644 assets/gemini-snapshot.txt delete mode 100644 assets/junie-snapshot.txt delete mode 100644 assets/opencode-snapshot.txt delete mode 100644 assets/qwen-snapshot.txt create mode 100644 docs/superpowers/specs/2026-05-26-skill-creator-cleanup-design.md delete mode 100755 scripts/detect-updates.sh delete mode 100644 tests/bats/detect_updates.bats diff --git a/.github/workflows/sync-cli-updates.yml b/.github/workflows/sync-cli-updates.yml deleted file mode 100644 index bf17b25..0000000 --- a/.github/workflows/sync-cli-updates.yml +++ /dev/null @@ -1,156 +0,0 @@ -name: Sync CLI Updates - -on: - schedule: - - cron: '0 6 * * 1' - workflow_dispatch: - -permissions: - contents: write - pull-requests: write - -jobs: - # Job 1: Per-CLI — install, snapshot diff, and check GitHub Releases - check-cli: - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - include: - - cli: codex - install: "npm install -g @openai/codex" - repo: openai/codex - - cli: claude - install: "npm install -g @anthropic-ai/claude-code" - repo: anthropics/claude-code - - cli: gemini - install: "npm install -g @google/gemini-cli" - repo: google-gemini/gemini-cli - - cli: cursor - install: "curl https://cursor.com/install -fsS | bash" - repo: "" - - cli: junie - install: "curl -fsSL https://junie.jetbrains.com/install.sh | bash" - repo: JetBrains/junie - - cli: qwen - install: "npm install -g @qwen-code/qwen" - repo: QwenLM/qwen-code - - cli: opencode - install: "npm install -g opencode-ai" - repo: "anomalyco/opencode" - steps: - - uses: actions/checkout@v4 - - - name: Install CLI - run: '${{ matrix.install }} 2>/dev/null || echo "SKIP: ${{ matrix.cli }} install failed"' - continue-on-error: true - - - name: Run snapshot detection - id: detect - run: | - set +e - # shellcheck disable=SC1090,SC1091 - source ~/.bashrc 2>/dev/null || source ~/.profile 2>/dev/null || true - export PATH="$HOME/.local/bin:$HOME/bin:$HOME/.junie/bin:$HOME/.cursor/bin:$PATH" - mkdir -p ~/.gemini && echo '{}' > ~/.gemini/projects.json - chmod +x scripts/detect-updates.sh - if ./scripts/detect-updates.sh ${{ matrix.cli }}; then - echo "changed=false" >> "$GITHUB_OUTPUT" - else - echo "changed=true" >> "$GITHUB_OUTPUT" - fi - continue-on-error: true - - - name: Check GitHub Releases - if: matrix.repo != '' - id: release - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - LATEST=$(gh api repos/${{ matrix.repo }}/releases/latest --jq '.tag_name' 2>/dev/null || echo "unknown") - SNAPSHOT_FILE="assets/${{ matrix.cli }}-snapshot.txt" - STORED=$(grep -m1 'LAST_RELEASE=' "$SNAPSHOT_FILE" 2>/dev/null | cut -d= -f2 || echo "none") - if [ "$LATEST" != "$STORED" ] && [ "$LATEST" != "unknown" ]; then - echo "changed=true" >> "$GITHUB_OUTPUT" - sed -i '/LAST_RELEASE=/d' "$SNAPSHOT_FILE" 2>/dev/null || true - [ -n "$(tail -c 1 "$SNAPSHOT_FILE")" ] && printf '\n' >> "$SNAPSHOT_FILE" - printf 'LAST_RELEASE=%s\n' "$LATEST" >> "$SNAPSHOT_FILE" - else - echo "changed=false" >> "$GITHUB_OUTPUT" - fi - continue-on-error: true - - - name: Upload snapshot - if: steps.detect.outputs.changed == 'true' || steps.release.outputs.changed == 'true' - uses: actions/upload-artifact@v4 - with: - name: snapshot-${{ matrix.cli }} - path: assets/${{ matrix.cli }}-snapshot.txt - - # Job 2: Collect changes and open a single PR - open-pr: - needs: check-cli - runs-on: ubuntu-latest - if: always() - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - uses: actions/download-artifact@v4 - with: - merge-multiple: true - continue-on-error: true - - - name: Apply snapshot updates - run: | - shopt -s nullglob - for f in *-snapshot.txt; do - [ -f "$f" ] && cp "$f" "assets/$f" - done - - - name: Check for changes and create PR - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - git config user.name "github-actions[bot]" - git config user.email "github-actions[bot]@users.noreply.github.com" - DEFAULT_BRANCH="${{ github.event.repository.default_branch }}" - - if git diff --quiet assets/; then - echo "No changes detected" - exit 0 - fi - - CHANGED_CLIS=$(git diff --name-only assets/ | sed 's|assets/||;s|-snapshot.txt||' | sort -u) - BRANCH="cli-update/weekly" - - EXISTING=$(gh pr list --label "cli-update" --head "$BRANCH" --json number --jq '.[0].number' 2>/dev/null || echo "") - - git checkout -B "$BRANCH" origin/"$DEFAULT_BRANCH" - - for CLI in $CHANGED_CLIS; do - git add "assets/${CLI}-snapshot.txt" - done - - CLI_LIST=$(echo "$CHANGED_CLIS" | tr '\n' ', ' | sed 's/,$//') - git commit -m "chore: update CLI snapshots for ${CLI_LIST}" || exit 0 - git push origin "$BRANCH" --force - - if [ -n "$EXISTING" ]; then - echo "Updated existing PR #${EXISTING}" - else - PR_BODY="## Summary - Snapshots updated for: ${CLI_LIST} - - ## Action Required - For each updated CLI: - - Review version matrix in \`references/cli-.md\` - - Check for new/changed CLI flags - - Verify tier classification for any new models" - - gh pr create \ - --title "chore: update CLI snapshots (${CLI_LIST})" \ - --body "$PR_BODY" \ - --label "cli-update" - fi diff --git a/README.md b/README.md index a1af50f..85c773c 100644 --- a/README.md +++ b/README.md @@ -152,43 +152,46 @@ x-agent/ │ ├── cli-qwen.md # Qwen Code CLI identity, invocation, version matrix │ └── cli-opencode.md # OpenCode CLI identity, invocation, version matrix ├── scripts/ -│ ├── validate-metadata.py # Validates SKILL.md frontmatter -│ ├── detect-updates.sh # Diffs CLI snapshots against stored versions -│ ├── query-cli.sh # Uniform wrapper for querying any CLI +│ ├── validate-metadata.py # Validates SKILL.md frontmatter (authoring + CI) +│ ├── query-cli.sh # Maintainer-only CLI wrapper (not used by skills at runtime) │ └── run-workflow.sh # Run GitHub Actions workflows locally via act ├── assets/ -│ ├── codex-snapshot.txt # Codex --help/--version output -│ ├── cursor-snapshot.txt # Cursor --help/--version output -│ ├── claude-snapshot.txt # Claude --help/--version output -│ ├── gemini-snapshot.txt # Gemini --help/--version output -│ ├── junie-snapshot.txt # Junie --help/--version output -│ ├── qwen-snapshot.txt # Qwen --help/--version output -│ ├── opencode-snapshot.txt # OpenCode --help/--version output -│ └── result-template.md # Output template for validation/delegation results +│ └── result-template.md # Output template for validation/delegation (read at runtime) ├── tests/ │ ├── bats/ # BATS shell script tests -│ └── pytest/ # Python tests for validate-metadata.py +│ └── pytest/ # Python tests (metadata, skill integrity) ├── .github/workflows/ -│ ├── sync-cli-updates.yml # Weekly CLI update detection + PR creation -│ └── run-tests.yml # CI test suite (BATS + pytest, ubuntu + macOS) +│ ├── run-tests.yml # CI test suite (BATS + pytest, ubuntu + macOS) +│ └── lint-workflows.yml # actionlint on workflow YAML +├── docs/superpowers/ # Design specs and implementation history ├── README.md ├── LICENSE └── .gitignore ``` -## GitHub Actions Update Workflow +## CI -The included workflow (`.github/workflows/sync-cli-updates.yml`) runs weekly on Monday at 06:00 UTC: +GitHub Actions runs on every push and pull request to `main`: -1. **Release watch** — Checks GitHub Releases API for each CLI's repo -2. **Snapshot diff** — Installs CLIs (best-effort) and runs `--version`/`--help` to detect changes -3. **PR creation** — Opens a PR for each CLI with updated snapshots, labeled `cli-update` +- **`run-tests.yml`** — BATS tests for `query-cli.sh` (mocked CLIs) and pytest for metadata validation, canonical/per-skill file drift, and self-contained installs (ubuntu + macOS). +- **`lint-workflows.yml`** — [actionlint](https://github.com/rhysd/actionlint) on workflow YAML when `.github/workflows/` changes. -Trigger manually anytime from **Actions > Sync CLI Updates > Run workflow**. +Run workflows locally with [act](https://github.com/nektos/act): `./scripts/run-workflow.sh run-tests.yml` + +## Maintaining CLI references + +When a target CLI changes flags or defaults, update manually: + +1. Run ` --version` and ` --help` (and `--list-models` if available). +2. Edit `references/cli-.md` (identity, invocation template, version matrix). +3. Copy into the skill bundle: `cp references/cli-.md /references/` +4. Run the test suite. + +Skills do not use repo-root `scripts/` at runtime — each install is self-contained under `/` with its own `references/` and `assets/result-template.md`. ## Testing -The test suite covers all four scripts with no external CLI dependencies — everything is mocked. +The test suite has no external CLI dependencies — shell and Python tests use mocks. **Prerequisites:** @@ -215,12 +218,15 @@ Tests also run automatically on every PR via GitHub Actions (ubuntu + macOS). 1. Create `/SKILL.md` following the existing pattern (copy any existing one) 2. Create `references/cli-.md` with the four required sections (Identity, Model Selection, Invocation Template, Version Matrix) -3. Add the CLI to `scripts/detect-updates.sh` arrays (`CLIS`, `CLI_COMMANDS`, `LIST_MODELS_SUPPORTED`) -4. Add the CLI's invocation case to `scripts/query-cli.sh` -5. Add the CLI to the GitHub Actions workflow matrix in `sync-cli-updates.yml` -6. Run `scripts/detect-updates.sh ` to generate the initial snapshot -7. Validate frontmatter: `python3 scripts/validate-metadata.py --name --description ""` -8. Add tests for the new CLI in `tests/bats/query_cli.bats` and run the test suite +3. Copy shared files into the skill bundle: + ```bash + mkdir -p /references /assets + cp references/shared-procedure.md references/cli-.md /references/ + cp assets/result-template.md /assets/ + ``` +4. Validate frontmatter: `python3 scripts/validate-metadata.py --name --description ""` +5. Optionally add the CLI to `scripts/query-cli.sh` for maintainer testing and extend `tests/bats/query_cli.bats` +6. Run the full test suite (`bats` + `pytest`) ## Usage with Different Agents diff --git a/assets/claude-snapshot.txt b/assets/claude-snapshot.txt deleted file mode 100644 index 462530a..0000000 --- a/assets/claude-snapshot.txt +++ /dev/null @@ -1,81 +0,0 @@ -=== VERSION === -2.1.143 (Claude Code) - -=== HELP === -Usage: claude [options] [command] [prompt] - -Claude Code - starts an interactive session by default, use -p/--print for -non-interactive output - -Arguments: - prompt Your prompt - -Options: - --add-dir Additional directories to allow tool access to - --agent Agent for the current session. Overrides the 'agent' setting. - --agents JSON object defining custom agents (e.g. '{"reviewer": {"description": "Reviews code", "prompt": "You are a code reviewer"}}') - --allow-dangerously-skip-permissions Enable bypassing all permission checks as an option, without it being enabled by default. Recommended only for sandboxes with no internet access. - --allowedTools, --allowed-tools Comma or space-separated list of tool names to allow (e.g. "Bash(git *) Edit") - --append-system-prompt Append a system prompt to the default system prompt - --bare Minimal mode: skip hooks, LSP, plugin sync, attribution, auto-memory, background prefetches, keychain reads, and CLAUDE.md auto-discovery. Sets CLAUDE_CODE_SIMPLE=1. Anthropic auth is strictly ANTHROPIC_API_KEY or apiKeyHelper via --settings (OAuth and keychain are never read). 3P providers (Bedrock/Vertex/Foundry) use their own credentials. Skills still resolve via /skill-name. Explicitly provide context via: --system-prompt[-file], --append-system-prompt[-file], --add-dir (CLAUDE.md dirs), --mcp-config, --settings, --agents, --plugin-dir. - --betas Beta headers to include in API requests (API key users only) - --brief Enable SendUserMessage tool for agent-to-user communication - --chrome Enable Claude in Chrome integration - -c, --continue Continue the most recent conversation in the current directory - --dangerously-skip-permissions Bypass all permission checks. Recommended only for sandboxes with no internet access. - -d, --debug [filter] Enable debug mode with optional category filtering (e.g., "api,hooks" or "!1p,!file") - --debug-file Write debug logs to a specific file path (implicitly enables debug mode) - --disable-slash-commands Disable all skills - --disallowedTools, --disallowed-tools Comma or space-separated list of tool names to deny (e.g. "Bash(git *) Edit") - --effort Effort level for the current session (low, medium, high, xhigh, max) - --exclude-dynamic-system-prompt-sections Move per-machine sections (cwd, env info, memory paths, git status) from the system prompt into the first user message. Improves cross-user prompt-cache reuse. Only applies with the default system prompt (ignored with --system-prompt). (default: false) - --fallback-model Enable automatic fallback to specified model when default model is overloaded (only works with --print) - --file File resources to download at startup. Format: file_id:relative_path (e.g., --file file_abc:doc.txt file_def:img.png) - --fork-session When resuming, create a new session ID instead of reusing the original (use with --resume or --continue) - --from-pr [value] Resume a session linked to a PR by PR number/URL, or open interactive picker with optional search term - -h, --help Display help for command - --ide Automatically connect to IDE on startup if exactly one valid IDE is available - --include-hook-events Include all hook lifecycle events in the output stream (only works with --output-format=stream-json) - --include-partial-messages Include partial message chunks as they arrive (only works with --print and --output-format=stream-json) - --input-format Input format (only works with --print): "text" (default), or "stream-json" (realtime streaming input) (choices: "text", "stream-json") - --json-schema JSON Schema for structured output validation. Example: {"type":"object","properties":{"name":{"type":"string"}},"required":["name"]} - --max-budget-usd Maximum dollar amount to spend on API calls (only works with --print) - --mcp-config Load MCP servers from JSON files or strings (space-separated) - --mcp-debug [DEPRECATED. Use --debug instead] Enable MCP debug mode (shows MCP server errors) - --model Model for the current session. Provide an alias for the latest model (e.g. 'sonnet' or 'opus') or a model's full name (e.g. 'claude-sonnet-4-6'). - -n, --name Set a display name for this session (shown in the prompt box, /resume picker, and terminal title) - --no-chrome Disable Claude in Chrome integration - --no-session-persistence Disable session persistence - sessions will not be saved to disk and cannot be resumed (only works with --print) - --output-format Output format (only works with --print): "text" (default), "json" (single result), or "stream-json" (realtime streaming) (choices: "text", "json", "stream-json") - --permission-mode Permission mode to use for the session (choices: "acceptEdits", "auto", "bypassPermissions", "default", "dontAsk", "plan") - --plugin-dir Load a plugin from a directory or .zip for this session only (repeatable: --plugin-dir A --plugin-dir B.zip) (default: []) - --plugin-url Fetch a plugin .zip from a URL for this session only (repeatable: --plugin-url A --plugin-url B) (default: []) - -p, --print Print response and exit (useful for pipes). Note: The workspace trust dialog is skipped when Claude is run in non-interactive mode (via -p, or when stdout is not a TTY, e.g. piped or redirected output). Only use this in directories you trust. Settings files that fail validation are silently ignored in this mode (no error dialog is shown). - --remote-control [name] Start an interactive session with Remote Control enabled (optionally named) - --remote-control-session-name-prefix Prefix for auto-generated Remote Control session names (default: hostname) - --replay-user-messages Re-emit user messages from stdin back on stdout for acknowledgment (only works with --input-format=stream-json and --output-format=stream-json) - -r, --resume [value] Resume a conversation by session ID, or open interactive picker with optional search term - --session-id Use a specific session ID for the conversation (must be a valid UUID) - --setting-sources Comma-separated list of setting sources to load (user, project, local). - --settings Path to a settings JSON file or a JSON string to load additional settings from - --strict-mcp-config Only use MCP servers from --mcp-config, ignoring all other MCP configurations - --system-prompt System prompt to use for the session - --tmux Create a tmux session for the worktree (requires --worktree). Uses iTerm2 native panes when available; use --tmux=classic for traditional tmux. - --tools Specify the list of available tools from the built-in set. Use "" to disable all tools, "default" to use all tools, or specify tool names (e.g. "Bash,Edit,Read"). - --verbose Override verbose mode setting from config - -v, --version Output the version number - -w, --worktree [name] Create a new git worktree for this session (optionally specify a name) - -Commands: - agents [options] Manage background agents - auth Manage authentication - auto-mode Inspect auto mode classifier configuration - doctor Check the health of your Claude Code auto-updater. Note: The workspace trust dialog is skipped and stdio servers from .mcp.json are spawned for health checks. Only use this command in directories you trust. - install [options] [target] Install Claude Code native build. Use [target] to specify version (stable, latest, or specific version) - mcp Configure and manage MCP servers - plugin|plugins Manage Claude Code plugins - project Manage Claude Code project state - setup-token Set up a long-lived authentication token (requires Claude subscription) - ultrareview [options] [target] Run a cloud-hosted multi-agent code review of the current branch (or a PR number / base branch) and print the findings - update|upgrade Check for updates and install if available -LAST_RELEASE=v2.1.143 diff --git a/assets/codex-snapshot.txt b/assets/codex-snapshot.txt deleted file mode 100644 index b17bbaa..0000000 --- a/assets/codex-snapshot.txt +++ /dev/null @@ -1,127 +0,0 @@ -=== VERSION === -codex-cli 0.130.0 - -=== HELP === -Codex CLI - -If no subcommand is specified, options will be forwarded to the interactive CLI. - -Usage: codex [OPTIONS] [PROMPT] - codex [OPTIONS] [ARGS] - -Commands: - exec Run Codex non-interactively [aliases: e] - review Run a code review non-interactively - login Manage login - logout Remove stored authentication credentials - mcp Manage external MCP servers for Codex - plugin Manage Codex plugins - mcp-server Start Codex as an MCP server (stdio) - app-server [experimental] Run the app server or related tooling - remote-control [experimental] Start a headless app-server with remote control enabled - completion Generate shell completion scripts - update Update Codex to the latest version - sandbox Run commands within a Codex-provided sandbox - debug Debugging tools - apply Apply the latest diff produced by Codex agent as a `git apply` to your local - working tree [aliases: a] - resume Resume a previous interactive session (picker by default; use --last to continue - the most recent) - fork Fork a previous interactive session (picker by default; use --last to fork the - most recent) - cloud [EXPERIMENTAL] Browse tasks from Codex Cloud and apply changes locally - exec-server [EXPERIMENTAL] Run the standalone exec-server service - features Inspect feature flags - help Print this message or the help of the given subcommand(s) - -Arguments: - [PROMPT] - Optional user prompt to start the session - -Options: - -c, --config - Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. - Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed - as TOML. If it fails to parse as TOML, the raw string is used as a literal. - - Examples: - `-c model="o3"` - `-c 'sandbox_permissions=["disk-full-read-access"]'` - `-c - shell_environment_policy.inherit=all` - - --enable - Enable a feature (repeatable). Equivalent to `-c features.=true` - - --disable - Disable a feature (repeatable). Equivalent to `-c features.=false` - - --remote - Connect the TUI to a remote app server websocket endpoint. - - Accepted forms: `ws://host:port` or `wss://host:port`. - - --remote-auth-token-env - Name of the environment variable containing the bearer token to send to a remote app - server websocket - - -i, --image ... - Optional image(s) to attach to the initial prompt - - -m, --model - Model the agent should use - - --oss - Use open-source provider - - --local-provider - Specify which local provider to use (lmstudio or ollama). If not specified with --oss, - will use config default or show selection - - -p, --profile - Configuration profile from config.toml to specify default options - - -s, --sandbox - Select the sandbox policy to use when executing model-generated shell commands - - [possible values: read-only, workspace-write, danger-full-access] - - --dangerously-bypass-approvals-and-sandbox - Skip all confirmation prompts and execute commands without sandboxing. EXTREMELY - DANGEROUS. Intended solely for running in environments that are externally sandboxed - - -C, --cd - Tell the agent to use the specified directory as its working root - - --add-dir - Additional directories that should be writable alongside the primary workspace - - -a, --ask-for-approval - Configure when the model requires human approval before executing a command - - Possible values: - - untrusted: Only run "trusted" commands (e.g. ls, cat, sed) without asking for user - approval. Will escalate to the user if the model proposes a command that is not in the - "trusted" set - - on-failure: DEPRECATED: Run all commands without asking for user approval. Only asks for - approval if a command fails to execute, in which case it will escalate to the user to - ask for un-sandboxed execution. Prefer `on-request` for interactive runs or `never` for - non-interactive runs - - on-request: The model decides when to ask the user for approval - - never: Never ask for user approval Execution failures are immediately returned to - the model - - --search - Enable live web search. When enabled, the native Responses `web_search` tool is available - to the model (no per‑call approval) - - --no-alt-screen - Disable alternate screen mode - - Runs the TUI in inline mode, preserving terminal scrollback history. This is useful in - terminal multiplexers like Zellij that follow the xterm spec strictly and disable - scrollback in alternate screen buffers. - - -h, --help - Print help (see a summary with '-h') - - -V, --version - Print version -LAST_RELEASE=rust-v0.130.0 diff --git a/assets/cursor-snapshot.txt b/assets/cursor-snapshot.txt deleted file mode 100644 index 275f2b5..0000000 --- a/assets/cursor-snapshot.txt +++ /dev/null @@ -1,81 +0,0 @@ -=== VERSION === -2026.05.16-0338208 - -=== HELP === -Usage: agent [options] [command] [prompt...] - -Start the Cursor Agent - -Arguments: - prompt Initial prompt for the agent - -Options: - -v, --version Output the version number - --api-key API key for authentication (can also use - CURSOR_API_KEY env var) - -H, --header
Add custom header to agent requests (format: - 'Name: Value', can be used multiple times) - -p, --print Print responses to console (for scripts or - non-interactive use). Has access to all tools, - including write and shell. (default: false) - --output-format Output format (only works with --print): text | - json | stream-json (default: "text") - --stream-partial-output Stream partial output as individual text deltas - (only works with --print and stream-json format) - (default: false) - --mode Start in the given execution mode. plan: - read-only/planning (analyze, propose plans, no - edits). ask: Q&A style for explanations and - questions (read-only). (choices: "plan", "ask") - --plan Start in plan mode (shorthand for --mode=plan). - (default: false) - --resume [chatId] Select a session to resume (default: false) - --continue Continue previous session (default: false) - --model Model to use (e.g., gpt-5, sonnet-4, - sonnet-4-thinking) - --list-models List available models and exit (default: false) - -f, --force Force allow commands unless explicitly denied - (default: false) - --yolo Alias for --force (Run Everything) (default: - false) - --sandbox Explicitly enable or disable sandbox mode - (overrides config) (choices: "enabled", - "disabled") - --approve-mcps Automatically approve all MCP servers (default: - false) - --trust Trust the current workspace without prompting - (only works with --print/headless mode) (default: - false) - --workspace Workspace directory to use (defaults to current - working directory) - --plugin-dir Load a local plugin directory (can be specified - multiple times) - -w, --worktree [name] Start in an isolated git worktree at - ~/.cursor/worktrees//. If - omitted, a name is generated. - --worktree-base Branch or ref to base the new worktree on - (default: current HEAD) - --skip-worktree-setup Skip running worktree setup scripts from - .cursor/worktrees.json (default: false) - -h, --help Display help for command - -Commands: - install-shell-integration Install shell integration to ~/.zshrc - uninstall-shell-integration Remove shell integration from ~/.zshrc - login Authenticate with Cursor. Set NO_OPEN_BROWSER to - disable browser opening. - logout Sign out and clear stored authentication - mcp Manage MCP servers - worker [options] Start a private cloud worker that connects to - Cursor to run agents in your environment - status|whoami [options] View authentication status - models List available models for this account - about [options] Display version, system, and account information - update Update Cursor Agent to the latest version - create-chat Create a new empty chat and return its ID - generate-rule|rule Generate a new Cursor rule with interactive - prompts - agent [prompt...] Start the Cursor Agent - ls Resume a chat session - resume Resume the latest chat session - help [command] Display help for command diff --git a/assets/gemini-snapshot.txt b/assets/gemini-snapshot.txt deleted file mode 100644 index efd68ee..0000000 --- a/assets/gemini-snapshot.txt +++ /dev/null @@ -1,49 +0,0 @@ -=== VERSION === -0.42.0 - -=== HELP === -Usage: gemini [options] [command] - -Gemini CLI - Defaults to interactive mode. Use -p/--prompt for non-interactive (headless) mode. - -Commands: - gemini mcp Manage MCP servers - gemini extensions Manage Gemini CLI extensions. [aliases: extension] - gemini skills Manage agent skills. [aliases: skill] - gemini hooks Manage Gemini CLI hooks. [aliases: hook] - gemini gemma Manage local Gemma model routing - gemini [query..] Launch Gemini CLI [default] - -Positionals: - query Initial prompt. Runs in interactive mode by default; use -p/--prompt for non-interactive. - -Options: - -d, --debug Run in debug mode (open debug console with F12) [boolean] [default: false] - -m, --model Model [string] - -p, --prompt Run in non-interactive (headless) mode with the given prompt. Appended to input on stdin (if any). [string] - -i, --prompt-interactive Execute the provided prompt and continue in interactive mode [string] - --skip-trust Trust the current workspace for this session. [boolean] [default: false] - -w, --worktree Start Gemini in a new git worktree. If no name is provided, one is generated automatically. [string] - -s, --sandbox Run in sandbox? [boolean] - -y, --yolo Automatically accept all actions (aka YOLO mode, see https://www.youtube.com/watch?v=xvFZjo5PgG0 for more details)? [boolean] [default: false] - --approval-mode Set the approval mode: default (prompt for approval), auto_edit (auto-approve edit tools), yolo (auto-approve all tools), plan (read-only mode) [string] [choices: "default", "auto_edit", "yolo", "plan"] - --policy Additional policy files or directories to load (comma-separated or multiple --policy) [array] - --admin-policy Additional admin policy files or directories to load (comma-separated or multiple --admin-policy) [array] - --acp Starts the agent in ACP mode [boolean] - --experimental-acp Starts the agent in ACP mode (deprecated, use --acp instead) [boolean] - --allowed-mcp-server-names Allowed MCP server names [array] - --allowed-tools [DEPRECATED: Use Policy Engine instead See https://geminicli.com/docs/core/policy-engine] Tools that are allowed to run without confirmation [array] - -e, --extensions A list of extensions to use. If not provided, all extensions are used. [array] - -l, --list-extensions List all available extensions and exit. [boolean] - -r, --resume Resume a previous session. Use "latest" for most recent or index number (e.g. --resume 5) [string] - --session-id Start a new session with a manually provided UUID. [string] - --list-sessions List available sessions for the current project and exit. [boolean] - --delete-session Delete a session by index number (use --list-sessions to see available sessions). [string] - --include-directories Additional directories to include in the workspace (comma-separated or multiple --include-directories) [array] - --screen-reader Enable screen reader mode for accessibility. [boolean] - -o, --output-format The format of the CLI output. [string] [choices: "text", "json", "stream-json"] - --raw-output Disable sanitization of model output (e.g. allow ANSI escape sequences). WARNING: This can be a security risk if the model output is untrusted. [boolean] - --accept-raw-output-risk Suppress the security warning when using --raw-output. [boolean] - -v, --version Show version number [boolean] - -h, --help Show help [boolean] -LAST_RELEASE=v0.42.0 diff --git a/assets/junie-snapshot.txt b/assets/junie-snapshot.txt deleted file mode 100644 index b7e82c6..0000000 --- a/assets/junie-snapshot.txt +++ /dev/null @@ -1,91 +0,0 @@ -=== VERSION === -Junie version: build 1588.21 - -=== HELP === -Usage: junie [] [] - - /////// /// /// - /////// /// /// - /////// /// /// /// ///////// /////// -/////// /////// /// /// /// ////////// /// ////////// -/////// /////// /// /// /// /// /// /// /// //// -/////// //////// /// /// /// /// /// /// //////////// - /////////// /// /// //// /// /// /// /// - ///////// //////// ////////// /// /// /// /////////// - ////// ////// //////// /// /// /// //////// - -A command-line Junie interface for running code tasks. - -Interactive mode: junie -Non-interactive mode: junie "Fix the bug in the login function" - junie --task "Fix the bug" - -Core: - --task= Task description (alternative to positional argument) - --session-id= Id of the previously executed session to follow up - --resume Resume the last session (or the session specified by --session-id) - --brave Turns on Brave Mode (interactive only) - --use-local-cache Enable local AI caches even when config.hasLocalCache is false - -p, --project= Project directory (default: current directory) - -Authentication: - -a, --auth= Authentication token, visit https://junie.jetbrains.com/cli to generate a token. - --openai-api-key= OpenAI API key. - --anthropic-api-key= Anthropic API key. - --grok-api-key= Grok API key. - --openrouter-api-key= OpenRouter API key. - --google-api-key= Google API key. - -System (non-interactive only): - --input-format= Input format: text or json - --output-format= Output format: text, json, json-stream - --json-output-file= The file where JSON output is written. If not specified, output is printed to stdout - -t, --timeout= Time limit in millis - -c, --cache-dir= Caching directory for Junie - --version Show version - --skip-update-check Skip the automatic update check on startup. Useful for CI or automation - -Misc: - --guidelines-filename= - --ide-guidelines= Path to a file whose content will be prepended to the existing guidelines. - --review Run a code review - -h, --help Show this message and exit - -Configuration: - --config-location= Additional configuration file location (can be specified multiple times) - --config-default-locations=<[true|false]> Whether to load configuration from default locations (~/.junie/config.json and /.junie/config.json) - -Acp: - --acp=<[true|false]> Run in ACP mode (Agent Communication Protocol) for IDE integrations. - -Model: - --model= Model to use for the primary agent - --effort= Effort level to use. Possible values: low, medium, high. - --provider= BYOK provider to use. Possible values: openai, anthropic, google, xai, openrouter, copilot. If not set, the Junie or Custom model provider is used. - --model-default-locations= Enable or disable adding custom models from default locations (per user / per project). - --model-location= Additional folders where custom models should be found. Can be specified multiple times. - -MCP: - --mcp-default-locations= Enable or disable adding MCP servers from default locations (per user / per project). - --mcp-location= Additional folders where MCP servers should be found. Can be specified multiple times. - -Extensions: - --extensions-default-location= Override the default extensions directory (default: ~/.junie/extensions). - -Skills: - --skill-default-locations= Enable or disable adding skills from default locations (per user / per project). - --skill-location= Additional folders where skills should be found. Can be specified multiple times. - -Commands: - --command-default-location= Enable or disable adding commands from default locations (per user / per project). - --command-location= Additional folders where commands should be found. Can be specified multiple times. - -Custom agents: - --agent-default-location= Enable or disable adding agents from default locations (per user / per project). - --agent-location= Additional folders where agents should be found. Can be specified multiple times. - -Arguments: - Task description (optional positional argument) - Example: junie "Fix the bug in the login function" - -LAST_RELEASE=1731.1 diff --git a/assets/opencode-snapshot.txt b/assets/opencode-snapshot.txt deleted file mode 100644 index 0b45ecf..0000000 --- a/assets/opencode-snapshot.txt +++ /dev/null @@ -1,59 +0,0 @@ -=== VERSION === -1.15.4 - -=== HELP === -Performing one time database migration, may take a few minutes... -sqlite-migration:done -Database migration complete. -⠀ ▄ -█▀▀█ █▀▀█ █▀▀█ █▀▀▄ █▀▀▀ █▀▀█ █▀▀█ █▀▀█ -█ █ █ █ █▀▀▀ █ █ █ █ █ █ █ █▀▀▀ -▀▀▀▀ █▀▀▀ ▀▀▀▀ ▀ ▀ ▀▀▀▀ ▀▀▀▀ ▀▀▀▀ ▀▀▀▀ - -Commands: - opencode completion generate shell completion script - opencode acp start ACP (Agent Client Protocol) server - opencode mcp manage MCP (Model Context Protocol) servers - opencode [project] start opencode tui [default] - opencode attach attach to a running opencode server - opencode run [message..] run opencode with a message - opencode debug debugging and troubleshooting tools - opencode providers manage AI providers and credentials [aliases: auth] - opencode agent manage agents - opencode upgrade [target] upgrade opencode to the latest or a specific version - opencode uninstall uninstall opencode and remove all related files - opencode serve starts a headless opencode server - opencode web start opencode server and open web interface - opencode models [provider] list all available models - opencode stats show token usage and cost statistics - opencode export [sessionID] export session data as JSON - opencode import import session data from JSON file or URL - opencode github manage GitHub agent - opencode pr fetch and checkout a GitHub PR branch, then run opencode - opencode session manage sessions - opencode plugin install plugin and update config [aliases: plug] - opencode db database tools - -Positionals: - project path to start opencode in [string] - -Options: - -h, --help show help [boolean] - -v, --version show version number [boolean] - --print-logs print logs to stderr [boolean] - --log-level log level [string] [choices: "DEBUG", "INFO", "WARN", "ERROR"] - --pure run without external plugins [boolean] - --port port to listen on [number] [default: 0] - --hostname hostname to listen on [string] [default: "127.0.0.1"] - --mdns enable mDNS service discovery (defaults hostname to 0.0.0.0) - [boolean] [default: false] - --mdns-domain custom domain name for mDNS service (default: opencode.local) - [string] [default: "opencode.local"] - --cors additional domains to allow for CORS [array] [default: []] - -m, --model model to use in the format of provider/model [string] - -c, --continue continue the last session [boolean] - -s, --session session id to continue [string] - --fork fork the session when continuing (use with --continue or --session) [boolean] - --prompt prompt to use [string] - --agent agent to use [string] -LAST_RELEASE=v1.15.4 diff --git a/assets/qwen-snapshot.txt b/assets/qwen-snapshot.txt deleted file mode 100644 index 97b2eec..0000000 --- a/assets/qwen-snapshot.txt +++ /dev/null @@ -1,69 +0,0 @@ -=== VERSION === -0.14.0 - -=== HELP === -Usage: qwen [options] [command] - -Qwen Code - Launch an interactive CLI, use -p/--prompt for non-interactive mode - -Commands: - qwen [query..] Launch Qwen Code CLI [default] - qwen mcp Manage MCP servers - qwen extensions Manage Qwen Code extensions. - qwen auth Configure Qwen authentication information with Qwen-OAuth or Alibaba Cloud Coding Plan - qwen hooks Manage Qwen Code hooks (use /hooks in interactive mode). [aliases: hook] - qwen channel Manage messaging channels (Telegram, Discord, etc.) - -Positionals: - query Positional prompt. Defaults to one-shot; use -i/--prompt-interactive for interactive. - -Options: - --telemetry Enable telemetry? This flag specifically controls if telemetry is sent. Other --telemetry-* flags set specific values but do not enable telemetry on their own. [deprecated: Use the "telemetry.enabled" setting in settings.json instead. This flag will be removed in a future version.] [boolean] - --telemetry-target Set the telemetry target (local or gcp). Overrides settings files. [deprecated: Use the "telemetry.target" setting in settings.json instead. This flag will be removed in a future version.] [string] [choices: "local", "gcp"] - --telemetry-otlp-endpoint Set the OTLP endpoint for telemetry. Overrides environment variables and settings files. [deprecated: Use the "telemetry.otlpEndpoint" setting in settings.json instead. This flag will be removed in a future version.] [string] - --telemetry-otlp-protocol Set the OTLP protocol for telemetry (grpc or http). Overrides settings files. [deprecated: Use the "telemetry.otlpProtocol" setting in settings.json instead. This flag will be removed in a future version.] [string] [choices: "grpc", "http"] - --telemetry-log-prompts Enable or disable logging of user prompts for telemetry. Overrides settings files. [deprecated: Use the "telemetry.logPrompts" setting in settings.json instead. This flag will be removed in a future version.] [boolean] - --telemetry-outfile Redirect all telemetry output to the specified file. [deprecated: Use the "telemetry.outfile" setting in settings.json instead. This flag will be removed in a future version.] [string] - -d, --debug Run in debug mode? [boolean] [default: false] - --proxy Proxy for Qwen Code, like schema://user:password@host:port [deprecated: Use the "proxy" setting in settings.json instead. This flag will be removed in a future version.] [string] - --chat-recording Enable chat recording to disk. If false, chat history is not saved and --continue/--resume will not work. [boolean] - -m, --model Model [string] - -p, --prompt Prompt. Appended to input on stdin (if any). [deprecated: Use the positional prompt instead. This flag will be removed in a future version.] [string] - -i, --prompt-interactive Execute the provided prompt and continue in interactive mode [string] - --system-prompt Override the main session system prompt for this run. Can be combined with --append-system-prompt. [string] - --append-system-prompt Append instructions to the main session system prompt for this run. Can be combined with --system-prompt. [string] - -s, --sandbox Run in sandbox? [boolean] - --sandbox-image Sandbox image URI. [deprecated: Use the "tools.sandbox" setting in settings.json instead. This flag will be removed in a future version.] [string] - -y, --yolo Automatically accept all actions (aka YOLO mode, see https://www.youtube.com/watch?v=xvFZjo5PgG0 for more details)? [boolean] [default: false] - --approval-mode Set the approval mode: plan (plan only), default (prompt for approval), auto-edit (auto-approve edit tools), yolo (auto-approve all tools) [string] [choices: "plan", "default", "auto-edit", "yolo"] - --checkpointing Enables checkpointing of file edits [deprecated: Use the "general.checkpointing.enabled" setting in settings.json instead. This flag will be removed in a future version.] [boolean] [default: false] - --acp Starts the agent in ACP mode [boolean] - --experimental-lsp Enable experimental LSP (Language Server Protocol) feature for code intelligence [boolean] [default: false] - --channel Channel identifier (VSCode, ACP, SDK, CI) [string] [choices: "VSCode", "ACP", "SDK", "CI"] - --allowed-mcp-server-names Allowed MCP server names [array] - --allowed-tools Tools to allow, will bypass confirmation [array] - -e, --extensions A list of extensions to use. If not provided, all extensions are used. [array] - -l, --list-extensions List all available extensions and exit. [boolean] - --include-directories, --add-dir Additional directories to include in the workspace (comma-separated or multiple --include-directories) [array] - --openai-logging Enable logging of OpenAI API calls for debugging and analysis [boolean] - --openai-logging-dir Custom directory path for OpenAI API logs. Overrides settings files. [string] - --openai-api-key OpenAI API key to use for authentication [string] - --openai-base-url OpenAI base URL (for custom endpoints) [string] - --tavily-api-key Tavily API key for web search [string] - --google-api-key Google Custom Search API key [string] - --google-search-engine-id Google Custom Search Engine ID [string] - --web-search-default Default web search provider (dashscope, tavily, google) [string] - --screen-reader Enable screen reader mode for accessibility. [boolean] - --input-format The format consumed from standard input. [string] [choices: "text", "stream-json"] [default: "text"] - -o, --output-format The format of the CLI output. [string] [choices: "text", "json", "stream-json"] - --include-partial-messages Include partial assistant messages when using stream-json output. [boolean] [default: false] - -c, --continue Resume the most recent session for the current project. [boolean] [default: false] - -r, --resume Resume a specific session by its ID. Use without an ID to show session picker. [string] - --session-id Specify a session ID for this run. [string] - --max-session-turns Maximum number of session turns [number] - --core-tools Core tool paths [array] - --exclude-tools Tools to exclude [array] - --auth-type Authentication type [string] [choices: "openai", "anthropic", "qwen-oauth", "gemini", "vertex-ai"] - -v, --version Show version number [boolean] - -h, --help Show help [boolean] -LAST_RELEASE=v0.15.11 diff --git a/codex/references/cli-codex.md b/codex/references/cli-codex.md index 76a0b37..a61969f 100644 --- a/codex/references/cli-codex.md +++ b/codex/references/cli-codex.md @@ -37,4 +37,4 @@ execution. Add `--ephemeral` to skip session persistence for one-off queries. | Version | Exec Subcommand | Model Flag | Full-Auto Flag | Stdin | Notes | |----------------------------------------------------------|-----------------|------------------|----------------|-------|---------| -| (pending — populate from first snapshot or npm registry) | `codex exec` | `-m` / `--model` | `--full-auto` | `-` | Current | +| (confirm via `codex --version` and `codex --help`) | `codex exec` | `-m` / `--model` | `--full-auto` | `-` | Current | diff --git a/docs/superpowers/specs/2026-05-26-skill-creator-cleanup-design.md b/docs/superpowers/specs/2026-05-26-skill-creator-cleanup-design.md new file mode 100644 index 0000000..4b6afd8 --- /dev/null +++ b/docs/superpowers/specs/2026-05-26-skill-creator-cleanup-design.md @@ -0,0 +1,51 @@ +# Skill-creator cleanup design + +**Date:** 2026-05-26 +**Status:** Implemented (validated by Claude Sonnet 2.1.x, 2026-05-26) + +## Problem + +x-agent mixed **runtime skill assets** (`result-template.md`) with **maintainer drift baselines** (`*-snapshot.txt`) and automated them via `sync-cli-updates.yml`. CLI reference docs mentioned repo-only `query-cli.sh`, which is not bundled in self-contained skill installs. + +## Goal + +Align the repo with agentskills.io / skill-creator: `assets/` holds only files agents read at runtime; maintainer-only tooling stays out of skill paths and optional automation. + +## Approach (recommended) + +**Strip snapshot pipeline; keep quality gates.** + +| Action | Rationale | +|--------|-----------| +| Remove `assets/*-snapshot.txt` | Not referenced by any skill procedure | +| Remove `scripts/detect-updates.sh` + BATS tests | Only existed for snapshots | +| Remove `.github/workflows/sync-cli-updates.yml` | Only updated snapshots | +| Keep `assets/result-template.md` | Required at validation runtime | +| Keep `scripts/validate-metadata.py` + `run-tests.yml` | Enforces skill-creator metadata checklist | +| Keep `scripts/query-cli.sh` | Maintainer/local testing; remove from skill docs | +| Reword `cli-qwen.md` / `cli-opencode.md` timeout notes | Replace `query-cli.sh` mention with explicit agent responsibility per shared-procedure Step 6 (120s kill) | +| Sync bundled copies | Apply CLI reference edits to `references/` **and** `qwen/references/`, `opencode/references/` (and `codex/references/cli-codex.md`) | +| Fix `cli-codex.md` version matrix | Replace “populate from first snapshot” with npm/help-based wording | +| Update README + `run-workflow.sh` | Remove snapshot/sync-cli docs; drop `sync-cli-updates.yml` from `run-workflow.sh` examples; note `query-cli.sh` is maintainer-only | + +## Validation (Claude Sonnet) + +**Verdict:** Approve with changes. + +- Deleting snapshot pipeline is sound; snapshots were only consumed by weekly GHA. +- Keep `query-cli.sh` as maintainer tooling (timeout wrapper still useful); do not delete. +- Do not only delete timeout sentences in CLI refs — **replace** with shared-procedure Step 6 wording so agents retain guidance. +- `run-tests.yml` runs `bats tests/bats/ --recursive`; deleting `detect_updates.bats` is safe (no hardcoded path). +- Bring `cli-codex.md` snapshot placeholder into scope. + +## Out of scope + +- Per-skill `scripts/` bundles +- Removing `query-cli.sh` or its BATS tests +- Changing shared-procedure behavior (Step 6 already defines 120s timeout) + +## Success criteria + +- All pytest and BATS tests pass +- No `*-snapshot` or `sync-cli` references remain in repo +- Seven skills remain self-contained with `assets/result-template.md` only diff --git a/opencode/references/cli-opencode.md b/opencode/references/cli-opencode.md index b8a4579..0f3546a 100644 --- a/opencode/references/cli-opencode.md +++ b/opencode/references/cli-opencode.md @@ -22,7 +22,7 @@ | **Validation** | `cat "$PROMPT_FILE" \| opencode run -m --format default 2>/dev/null` | | **Delegation** | `cat "$PROMPT_FILE" \| opencode run -m --format default 2>/dev/null` | -Note: Both modes use the same command because OpenCode auto-approves all actions in non-interactive `run` mode. Prompt is piped via stdin. OpenCode does not expose an internal `--timeout` flag; the external process kill wrapper in `query-cli.sh` enforces the 120s limit. Stderr is suppressed (`2>/dev/null`) to remove ANSI codes and session header from output. +Note: Both modes use the same command because OpenCode auto-approves all actions in non-interactive `run` mode. Prompt is piped via stdin. OpenCode does not expose an internal `--timeout` flag; enforce the 120-second limit per `references/shared-procedure.md` Step 6 (kill the process if it does not exit). Stderr is suppressed (`2>/dev/null`) to remove ANSI codes and session header from output. ## 4. Version Compatibility Matrix diff --git a/qwen/references/cli-qwen.md b/qwen/references/cli-qwen.md index 7e383cf..23c1942 100644 --- a/qwen/references/cli-qwen.md +++ b/qwen/references/cli-qwen.md @@ -22,7 +22,7 @@ | **Validation** | `cat "$PROMPT_FILE" \| qwen --model ` | | **Delegation** | `cat "$PROMPT_FILE" \| qwen --model --yolo` | -Note: `--yolo` enables auto-approve for delegation. Validation runs without it (read-only perspective). Prompt is piped via stdin. Qwen Code does not expose an internal `--timeout` flag; the external process kill wrapper in `query-cli.sh` enforces the 120s limit. +Note: `--yolo` enables auto-approve for delegation. Validation runs without it (read-only perspective). Prompt is piped via stdin. Qwen Code does not expose an internal `--timeout` flag; enforce the 120-second limit per `references/shared-procedure.md` Step 6 (kill the process if it does not exit). ## 4. Version Compatibility Matrix diff --git a/references/cli-codex.md b/references/cli-codex.md index 76a0b37..a61969f 100644 --- a/references/cli-codex.md +++ b/references/cli-codex.md @@ -37,4 +37,4 @@ execution. Add `--ephemeral` to skip session persistence for one-off queries. | Version | Exec Subcommand | Model Flag | Full-Auto Flag | Stdin | Notes | |----------------------------------------------------------|-----------------|------------------|----------------|-------|---------| -| (pending — populate from first snapshot or npm registry) | `codex exec` | `-m` / `--model` | `--full-auto` | `-` | Current | +| (confirm via `codex --version` and `codex --help`) | `codex exec` | `-m` / `--model` | `--full-auto` | `-` | Current | diff --git a/references/cli-opencode.md b/references/cli-opencode.md index b8a4579..0f3546a 100644 --- a/references/cli-opencode.md +++ b/references/cli-opencode.md @@ -22,7 +22,7 @@ | **Validation** | `cat "$PROMPT_FILE" \| opencode run -m --format default 2>/dev/null` | | **Delegation** | `cat "$PROMPT_FILE" \| opencode run -m --format default 2>/dev/null` | -Note: Both modes use the same command because OpenCode auto-approves all actions in non-interactive `run` mode. Prompt is piped via stdin. OpenCode does not expose an internal `--timeout` flag; the external process kill wrapper in `query-cli.sh` enforces the 120s limit. Stderr is suppressed (`2>/dev/null`) to remove ANSI codes and session header from output. +Note: Both modes use the same command because OpenCode auto-approves all actions in non-interactive `run` mode. Prompt is piped via stdin. OpenCode does not expose an internal `--timeout` flag; enforce the 120-second limit per `references/shared-procedure.md` Step 6 (kill the process if it does not exit). Stderr is suppressed (`2>/dev/null`) to remove ANSI codes and session header from output. ## 4. Version Compatibility Matrix diff --git a/references/cli-qwen.md b/references/cli-qwen.md index 7e383cf..23c1942 100644 --- a/references/cli-qwen.md +++ b/references/cli-qwen.md @@ -22,7 +22,7 @@ | **Validation** | `cat "$PROMPT_FILE" \| qwen --model ` | | **Delegation** | `cat "$PROMPT_FILE" \| qwen --model --yolo` | -Note: `--yolo` enables auto-approve for delegation. Validation runs without it (read-only perspective). Prompt is piped via stdin. Qwen Code does not expose an internal `--timeout` flag; the external process kill wrapper in `query-cli.sh` enforces the 120s limit. +Note: `--yolo` enables auto-approve for delegation. Validation runs without it (read-only perspective). Prompt is piped via stdin. Qwen Code does not expose an internal `--timeout` flag; enforce the 120-second limit per `references/shared-procedure.md` Step 6 (kill the process if it does not exit). ## 4. Version Compatibility Matrix diff --git a/scripts/detect-updates.sh b/scripts/detect-updates.sh deleted file mode 100755 index a1d7fe9..0000000 --- a/scripts/detect-updates.sh +++ /dev/null @@ -1,82 +0,0 @@ -#!/usr/bin/env bash -# detect-updates.sh — Detect CLI changes by diffing current output against stored snapshots -# Usage: ./detect-updates.sh [cli-name] -# If cli-name is omitted, checks all seven CLIs. -# Exits 0 if no changes, 1 if changes detected. Outputs changed CLI names to stdout. - -set -euo pipefail - -SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)" -ASSETS_DIR="$SCRIPT_DIR/../assets" - -CLIS=("codex" "cursor" "claude" "gemini" "junie" "qwen" "opencode") -CLI_COMMANDS=("codex" "agent" "claude" "gemini" "junie" "qwen" "opencode") -# Which CLIs support --list-models without auth in CI -# cursor has --list-models but requires auth — skip in CI, rely on runtime discovery -LIST_MODELS_SUPPORTED=("false" "false" "false" "false" "false" "false" "false") - -if [ "${1:-}" != "" ]; then - case "$1" in - codex) CLIS=("codex"); CLI_COMMANDS=("codex"); LIST_MODELS_SUPPORTED=("false") ;; - cursor) CLIS=("cursor"); CLI_COMMANDS=("agent"); LIST_MODELS_SUPPORTED=("false") ;; - claude) CLIS=("claude"); CLI_COMMANDS=("claude"); LIST_MODELS_SUPPORTED=("false") ;; - gemini) CLIS=("gemini"); CLI_COMMANDS=("gemini"); LIST_MODELS_SUPPORTED=("false") ;; - junie) CLIS=("junie"); CLI_COMMANDS=("junie"); LIST_MODELS_SUPPORTED=("false") ;; - qwen) CLIS=("qwen"); CLI_COMMANDS=("qwen"); LIST_MODELS_SUPPORTED=("false") ;; - opencode) CLIS=("opencode"); CLI_COMMANDS=("opencode"); LIST_MODELS_SUPPORTED=("false") ;; - *) echo "Unknown CLI: $1" >&2; exit 2 ;; - esac -fi - -CHANGED=0 -for i in "${!CLIS[@]}"; do - CLI="${CLIS[$i]}" - CMD="${CLI_COMMANDS[$i]}" - HAS_LIST_MODELS="${LIST_MODELS_SUPPORTED[$i]}" - SNAPSHOT="$ASSETS_DIR/${CLI}-snapshot.txt" - - # Check if CLI is installed - if ! command -v "$CMD" &>/dev/null; then - echo "SKIP: $CLI ($CMD not found)" >&2 - continue - fi - - # Capture current output - CURRENT=$(mktemp) - { - echo "=== VERSION ===" - $CMD --version 2>&1 | sed 's/\x1b\[[0-9;]*m//g' || echo "(version unavailable)" - echo "" - echo "=== HELP ===" - $CMD --help 2>&1 | sed 's/\x1b\[[0-9;]*m//g' || echo "(help unavailable)" - if [ "$HAS_LIST_MODELS" = "true" ]; then - echo "" - echo "=== LIST MODELS ===" - $CMD --list-models 2>&1 | sed 's/\x1b\[[0-9;]*m//g' || echo "(list-models unavailable)" - fi - } > "$CURRENT" - - # Compare (filter out metadata lines like LAST_RELEASE= from stored snapshot) - if [ ! -f "$SNAPSHOT" ]; then - echo "NEW: $CLI (no previous snapshot)" - cp "$CURRENT" "$SNAPSHOT" - CHANGED=1 - else - SNAPSHOT_FILTERED=$(mktemp) - grep -v 'LAST_RELEASE=' "$SNAPSHOT" > "$SNAPSHOT_FILTERED" || true - if ! diff -q "$CURRENT" "$SNAPSHOT_FILTERED" &>/dev/null; then - echo "CHANGED: $CLI" - # Preserve metadata lines from existing snapshot, ensuring they start on a new line - # Only add a newline if file doesn't already end with one - [ -n "$(tail -c 1 "$CURRENT")" ] && printf '\n' >> "$CURRENT" - grep 'LAST_RELEASE=' "$SNAPSHOT" >> "$CURRENT" 2>/dev/null || true - cp "$CURRENT" "$SNAPSHOT" - CHANGED=1 - fi - rm -f "$SNAPSHOT_FILTERED" - fi - - rm -f "$CURRENT" -done - -exit $CHANGED diff --git a/scripts/query-cli.sh b/scripts/query-cli.sh index 814c42e..3f9a181 100755 --- a/scripts/query-cli.sh +++ b/scripts/query-cli.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash -# query-cli.sh — Uniform wrapper for querying any CLI in print mode +# query-cli.sh — Maintainer-only wrapper for querying any CLI in print mode. +# Not bundled in skill installs; agents invoke CLIs per references/cli-*.md and shared-procedure.md. # Usage: ./query-cli.sh [timeout] # # cli-name: codex | cursor | claude | gemini | junie | qwen | opencode diff --git a/scripts/run-workflow.sh b/scripts/run-workflow.sh index 0296255..e8c9755 100755 --- a/scripts/run-workflow.sh +++ b/scripts/run-workflow.sh @@ -8,7 +8,7 @@ # Examples: # ./scripts/run-workflow.sh lint-workflows.yml # Run entire workflow # ./scripts/run-workflow.sh lint-workflows.yml --job actionlint # Run specific job -# ./scripts/run-workflow.sh sync-cli-updates.yml -e # List events only (dry-run) +# ./scripts/run-workflow.sh run-tests.yml -e # List events only (dry-run) set -euo pipefail diff --git a/tests/bats/detect_updates.bats b/tests/bats/detect_updates.bats deleted file mode 100644 index 82917ce..0000000 --- a/tests/bats/detect_updates.bats +++ /dev/null @@ -1,155 +0,0 @@ -#!/usr/bin/env bats -# Tests for scripts/detect-updates.sh -# -# The script derives ASSETS_DIR from its own location (SCRIPT_DIR/../assets). -# We copy it into $BATS_TEST_TMPDIR/scripts/ so assets resolve to a temp dir. - -setup() { - load test_helper/common-setup - _common_setup - - # Copy script into isolated temp structure - mkdir -p "$BATS_TEST_TMPDIR/scripts" "$BATS_TEST_TMPDIR/assets" - cp "$REPO_ROOT/scripts/detect-updates.sh" "$BATS_TEST_TMPDIR/scripts/" - DETECT_UPDATES="$BATS_TEST_TMPDIR/scripts/detect-updates.sh" - ASSETS_DIR="$BATS_TEST_TMPDIR/assets" -} - -# --------------------------------------------------------------------------- -# Input validation -# --------------------------------------------------------------------------- - -@test "exits 2 for unknown CLI argument" { - run "$DETECT_UPDATES" foobar - [ "$status" -eq 2 ] - assert_output --partial "Unknown CLI" -} - -# --------------------------------------------------------------------------- -# CLI not found -# --------------------------------------------------------------------------- - -@test "skips CLI when command not found" { - # No mock created — codex is not on PATH - run "$DETECT_UPDATES" codex - assert_success - assert_output --partial "SKIP:" -} - -# --------------------------------------------------------------------------- -# New snapshot (no previous) -# --------------------------------------------------------------------------- - -@test "creates new snapshot when none exists" { - create_mock_cli codex - run "$DETECT_UPDATES" codex - assert_failure # exit 1 = changes detected - assert_output --partial "NEW: codex" - # Snapshot file should exist with expected sections - [ -f "$ASSETS_DIR/codex-snapshot.txt" ] - grep -q "=== VERSION ===" "$ASSETS_DIR/codex-snapshot.txt" - grep -q "=== HELP ===" "$ASSETS_DIR/codex-snapshot.txt" -} - -# --------------------------------------------------------------------------- -# ANSI stripping -# --------------------------------------------------------------------------- - -@test "strips ANSI escape codes from snapshot" { - # Create a mock that outputs ANSI-colored text - cat > "$BATS_TEST_TMPDIR/bin/codex" <<'MOCK' -#!/usr/bin/env bash -case "$1" in - --version) printf '\033[31mcodex 1.0.0\033[0m\n' ;; - --help) printf '\033[32mUsage: codex\033[0m\n' ;; -esac -MOCK - chmod +x "$BATS_TEST_TMPDIR/bin/codex" - - run "$DETECT_UPDATES" codex - assert_failure # NEW snapshot - - # Snapshot should contain clean text without ANSI codes - grep -q "codex 1.0.0" "$ASSETS_DIR/codex-snapshot.txt" - # Verify no ANSI escape sequences remain (use $'\x1b' for portability — BSD grep lacks -P) - run grep -c $'\x1b' "$ASSETS_DIR/codex-snapshot.txt" - assert_failure -} - -# --------------------------------------------------------------------------- -# Changed output -# --------------------------------------------------------------------------- - -@test "reports CHANGED when output differs from snapshot" { - create_mock_cli codex - - # Create an old snapshot with different content - cat > "$ASSETS_DIR/codex-snapshot.txt" <<'EOF' -=== VERSION === -codex 0.9.0 - -=== HELP === -Old help text -EOF - - run "$DETECT_UPDATES" codex - assert_failure - assert_output --partial "CHANGED: codex" -} - -# --------------------------------------------------------------------------- -# No change -# --------------------------------------------------------------------------- - -@test "reports no change when output matches snapshot" { - create_mock_cli codex - - # Run once to create the snapshot - run "$DETECT_UPDATES" codex - assert_failure # NEW - - # Run again — same mock output, should match - run "$DETECT_UPDATES" codex - assert_success - refute_output --partial "CHANGED" - refute_output --partial "NEW" -} - -# --------------------------------------------------------------------------- -# LAST_RELEASE metadata preservation -# --------------------------------------------------------------------------- - -@test "preserves LAST_RELEASE metadata across updates" { - create_mock_cli codex - - # Create an old snapshot with LAST_RELEASE metadata and different content - cat > "$ASSETS_DIR/codex-snapshot.txt" <<'EOF' -=== VERSION === -codex 0.9.0 - -=== HELP === -Old help text -LAST_RELEASE=v1.2.3 -EOF - - run "$DETECT_UPDATES" codex - assert_failure # CHANGED - - # Updated snapshot should contain the LAST_RELEASE line - grep -q "LAST_RELEASE=v1.2.3" "$ASSETS_DIR/codex-snapshot.txt" -} - -@test "LAST_RELEASE is filtered during comparison" { - create_mock_cli codex - - # Run once to create snapshot - run "$DETECT_UPDATES" codex - assert_failure # NEW - - # Append LAST_RELEASE to snapshot (content otherwise identical) - echo 'LAST_RELEASE=v1.0.0' >> "$ASSETS_DIR/codex-snapshot.txt" - - # Should still report no change since LAST_RELEASE is filtered before diff - run "$DETECT_UPDATES" codex - assert_success -}