Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions .claude/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,28 @@ Each entry: **what** changed, **why** it was needed, **files** touched.

---

## 2026-05-25 — v0.6.1 — OpenSpec (spec-driven development CLI)

**What**
- `lib/plugins.sh` — new `install_openspec()` (npm-global install of `@fission-ai/openspec`).
- `profiles/cli-bundle/09-plugins.sh` — `INSTALL_OPENSPEC=true` block, installs OpenSpec + appends `OPENSPEC_TELEMETRY=0` to `~/.bashrc` (default off; opt-in by setting `OPENSPEC_TELEMETRY=1`).
- `profiles/cli-bundle/.env.example` — `INSTALL_OPENSPEC`, `OPENSPEC_VERSION`, `OPENSPEC_TELEMETRY`.
- `profiles/cli-bundle/README.md` — OpenSpec section with `openspec init` + `/opsx:*` usage.
- `tests/test_plugins.bats` — 2 new tests (missing-npm error path; correct npm-install dispatch with PATH-isolated stub).

**Why**
- OpenSpec is universal — any AI CLI (Claude, Codex, Cursor, OpenCode, Antigravity) can invoke it via the `/opsx:*` slash commands once a project has run `openspec init`. No per-CLI binding needed.
- Single npm-global install + telemetry-off default = same pattern already used for Codex/Claude CLIs.

**Files**
- `lib/plugins.sh` (+ `install_openspec`)
- `profiles/cli-bundle/09-plugins.sh` (block)
- `profiles/cli-bundle/.env.example` (3 vars)
- `profiles/cli-bundle/README.md` (section)
- `tests/test_plugins.bats` (2 tests, total 31)

---

## 2026-05-25 — v0.6.0 — Official plugins (Linear/Slack/etc) + headless browser as base tool

**What**
Expand Down
14 changes: 14 additions & 0 deletions lib/plugins.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,20 @@ install_claude_plugin() {
claude_headless "/reload-plugins" || true
}

# Install OpenSpec — spec-driven development CLI. npm-global; works inside
# any AI assistant via /opsx:* slash commands (no per-CLI binding).
# Upstream: https://github.com/Fission-AI/OpenSpec
install_openspec() {
local version="${OPENSPEC_VERSION:-latest}"
if ! command -v npm >/dev/null 2>&1; then
echo "ERROR: npm not on PATH — OpenSpec requires Node.js."
return 1
fi
echo "==> Installing @fission-ai/openspec@${version} globally"
npm install -g "@fission-ai/openspec@${version}"
openspec --version 2>/dev/null || true
}

# Install gstack into a target CLI's skills dir.
# $1 = host name (claude, opencode, etc.)
install_gstack_for() {
Expand Down
8 changes: 8 additions & 0 deletions profiles/cli-bundle/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,14 @@ INSTALL_GSTACK=false
# Space-separated list. Valid: claude opencode
GSTACK_TARGETS=claude

# OpenSpec — spec-driven development. Universal (works in any AI CLI via
# /opsx:* slash commands once invoked from a project that ran `openspec init`).
# Upstream: https://github.com/Fission-AI/OpenSpec
INSTALL_OPENSPEC=false
OPENSPEC_VERSION=latest
# Telemetry off (industry standard). Set to 1 to opt in.
OPENSPEC_TELEMETRY=0

# --- Official Anthropic marketplace plugins (Claude-only) ---
# Bundle pre-configured MCP + skills + slash commands. Richer than the raw
# MCP registrations in 06-mcp.sh — either can be used (or both).
Expand Down
13 changes: 13 additions & 0 deletions profiles/cli-bundle/09-plugins.sh
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,19 @@ if [[ "${INSTALL_SUPERPOWERS:-false}" == "true" ]]; then
fi
fi

# --- OpenSpec (universal: works in any AI CLI via slash commands) ----------
if [[ "${INSTALL_OPENSPEC:-false}" == "true" ]]; then
install_openspec
# Telemetry off by default unless operator opts in.
if ! grep -q 'OPENSPEC_TELEMETRY' "$HOME/.bashrc" 2>/dev/null; then
cat >> "$HOME/.bashrc" <<EOF

# OpenSpec
export OPENSPEC_TELEMETRY="${OPENSPEC_TELEMETRY:-0}"
EOF
fi
fi

# --- Official Anthropic marketplace plugins (Claude-only) -----------------
# These bundle pre-configured MCP servers + skills + slash commands.
# Richer than the raw MCP registrations in 06-mcp.sh; either can be used.
Expand Down
23 changes: 23 additions & 0 deletions profiles/cli-bundle/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,29 @@ manual com palpite (padrão Gemini CLI). Sem tentativa automática.
**Manual hints**: Codex/Cursor/OpenCode imprimem mensagem com comando exato
pra colar dentro da sessão. Sem CLI flag headless documentada.

### OpenSpec (universal — funciona em qualquer CLI)

[OpenSpec](https://github.com/Fission-AI/OpenSpec) é framework de
spec-driven development. CLI standalone (`npm i -g @fission-ai/openspec`)
que cria pasta `openspec/` no projeto com proposals/specs/design/tasks.
Agentes (Claude, Codex, Cursor, OpenCode, Antigravity) invocam via slash
commands `/opsx:propose`, `/opsx:plan`, etc.

```env
INSTALL_OPENSPEC=true
OPENSPEC_VERSION=latest
OPENSPEC_TELEMETRY=0 # opt-in: 1
```

Uso inicial num projeto:
```bash
cd ~/myproject
openspec init
# depois, dentro de qualquer CLI agente:
# /opsx:propose <feature>
# /opsx:plan
```

### Plugins oficiais da Anthropic (Claude only)

Toggles separados pra cada plugin do marketplace `claude-plugins-official`:
Expand Down
19 changes: 19 additions & 0 deletions tests/test_plugins.bats
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,25 @@ EOF

# ---------- print_manual_install_hint ----------

@test "install_openspec: errors when npm missing" {
PATH="$STUB_DIR" run install_openspec
[ "$status" -ne 0 ]
[[ "$output" == *"npm not on PATH"* ]]
}

@test "install_openspec: invokes npm install -g with @fission-ai/openspec" {
CALLS_FILE="$TEST_HOME/npm-calls.txt"
cat > "$STUB_DIR/npm" <<EOF
#!/usr/bin/env bash
echo "\$*" >> "$CALLS_FILE"
EOF
chmod +x "$STUB_DIR/npm"
# Keep /usr/bin + /bin on PATH so the stub's shebang (`env bash`) resolves.
PATH="$STUB_DIR:/usr/bin:/bin" run install_openspec
[ -f "$CALLS_FILE" ]
grep -q "install -g @fission-ai/openspec@latest" "$CALLS_FILE"
}

@test "print_manual_install_hint: prints CLI name and instruction" {
run print_manual_install_hint "Codex CLI" "/plugins → search"
[ "$status" -eq 0 ]
Expand Down
Loading