# SkillFoundry v5.8.0 Release Notes

**Release Date:** 2026-05-06
**Codename:** Native IDE Shell

---

## Overview

v5.8.0 completes the VS Code extension as a fully standalone product shell. Three gaps that prevented out-of-box use are now closed: a setup wizard that stores API keys securely in VS Code SecretStorage, a CLI installation check that offers `npm install -g skillfoundry` when `sf` is missing from PATH, and a forge progress notification that stays open for the duration of every pipeline run.

---

## New Features

### Setup Wizard (`SkillFoundry: Setup — Configure API Key`)

When no SkillFoundry install is detected in the workspace, the extension now offers a guided setup instead of a dead-end info message.

**Flow:**
1. Provider quick-pick — Anthropic Claude or OpenAI
2. Password input — API key, validated for minimum length
3. Key stored in `vscode.SecretStorage` — never written to disk, never in config files
4. `.skillfoundry/config.toml` created with provider name only (`[core]\nprovider = "anthropic"`)
5. "Reload Window" prompt to activate the full extension

**Activation:** `onCommand:skillfoundry.setup` is registered as an activation event, so the command is reachable from the command palette even before any `.skillfoundry/config.toml` exists.

**Key storage:** Keys are loaded from SecretStorage at activation and injected into all subprocess env calls (`execFile` runner) and all terminal env (forge, prd, benchmark, hooks) via `SfBridge.setCredential()`. Keys never touch the filesystem.

---

### sf CLI Installation Check

At extension activation, `sf --version` is run against PATH via `execFile`. If `sf` is not found **and** `sf-runner.mjs` is also missing (meaning neither the global CLI nor the local runner is available), a warning is shown with an actionable button:

```
SkillFoundry CLI (sf) not found. Gate runs and forge require it.
[Install via npm]  [Not Now]
```

"Install via npm" opens an integrated terminal and runs `npm install -g skillfoundry`. The result is logged to the SkillFoundry output channel.

---

### Forge Progress Notification

`vscode.window.withProgress` wraps the entire forge terminal lifetime:

- Notification title shows the chosen mode (`Full Pipeline`, `Full Pipeline (Blitz/TDD)`, or `Dry Run`)
- Notification is **cancellable** — cancellation disposes the terminal immediately
- The notification stays open until the terminal closes naturally or is cancelled
- ForgeMonitor sidebar continues to show live phase/story progress via `forge-state.json` file watcher (unchanged from v1.2.0)
- The forge terminal receives the stored API key as an env var via `bridge.getCredentials()`

---

## Infrastructure Changes

### `SfBridge` Credential Injection

Two new methods added to `SfBridge`:

```typescript
setCredential(envVar: string, value: string): void
getCredentials(): Record<string, string>
```

- `setCredential` stores a key-value pair to be merged into subprocess env
- `getCredentials` returns the stored map for terminal `env:` injection
- `runRunner` now merges `{ ...process.env, ...this.credentials }` into every `execFile` call

### `extension.ts` Activation Refactor

- `loadAndInjectCredentials()` — reads provider from `config.toml`, loads key from SecretStorage, calls `bridge.setCredential()`
- `checkAndOfferSfCli()` — async PATH check, warning with install offer if missing
- `registerSetupCommand()` called in both the "no install detected" path and the full activation path, ensuring `skillfoundry.setup` is always available

---

## Migration Notes

No breaking changes. The extension remains backward-compatible with v1.2.0 workspaces.

**If upgrading from v1.2.0:**
- On first activation after upgrade, if a key was previously configured via `sf setup` CLI (stored in `.skillfoundry/credentials`), the extension will not pick it up automatically — run `SkillFoundry: Setup` once to store the key in SecretStorage for VS Code use.
- `config.toml` is not modified if it already exists.

**Extension version:** 1.2.0 → 1.3.0

---

## Test Impact

No new test files. The three new features (setup wizard, CLI check, forge progress) are UI-layer VS Code extension code — tested manually via extension activation in a fresh workspace.

---

## Version Alignment

| Component | Version |
|---|---|
| Framework | 5.8.0 |
| sf CLI | 5.8.0 |
| VS Code Extension | 1.3.0 |
| MCP Server | 5.8.0 |
