# Changelog

## [Unreleased]

### Added
- **`cli` npm bin** — `package.json` `bin.cli` points at `dist/cli.cjs` so **`npx @shipgate.dev/cli`** runs without extra args (same entry as `shipgate` / `isl`).
- **Assurance ladder (product copy)** — `shipgate doctor` JSON adds `assurance` (Baseline ready / Review needed / Enterprise blockers) plus human-readable **Where you stand** in pretty mode. **`shipgate next --summary-out` Markdown** repeats the same bootstrap section when the target is a Next app. **`pnpm run shipgate:ci` / PR Gate** prepends the same **Where you stand** block to `.shipgate/pr-comment.md` (runs `shipgate doctor` per scanned Next root). Docs: `docs/tier1-assurance-model.md`, `docs/flagship-next-bootstrap-demo.md`, `docs/external-bootstrap-field-notes.md`, `docs/samples/pr-gate-with-app-understanding.sample.md`.
- **`shipgate spec bootstrap [path]`** (alias **`shipgate next-bootstrap`**) — deterministic Next.js App Router scan: routes + HTTP methods, pages, middleware/auth signals, env usage vs `.env*`, integration/side-effect heuristics, unsupported-pattern flags. Writes **`.shipgate/next-bootstrap/manifest.json`**, **`routes-draft.isl`**, **`confirmation.json`** (first run). **Inferred** output aligns with baseline Tier‑1 SHIP (no hand-written ISL required); **reviewed** / **enterprise** tiers documented in manifest. See `packages/shipgate-dashboard/README.md` for the flagship ladder.
- **`shipgate doctor [path]`** — Next Tier‑1 readiness: `scripts.test` / `test:ci`, workflow hints, **bootstrap manifest** (missing / gaps / unsupported patterns / partial `.isl` coverage). Advisory only; run after **`spec bootstrap`** to review gaps before strict SHIP.
- **`shipgate next --strict` Tier‑1 SHIP evidence** — runs the app’s **`scripts.test`** (or **`scripts.test:ci`** when `CI=true`), merges **`extraSignals`** into the authoritative gate, applies documented Tier‑1 guardrail relaxations (`shipgate-cli:next-tier1`) and **`minScore` 68** for this command path. See `docs/tier1-ship-semantics.md`. Monorepo packages resolve **pnpm/yarn/npm** via the nearest lockfile walking up from the app root.
- **`shipgate provenance upload`** — POST provenance summary JSON to the dashboard (`/api/v1/provenance/upload`) via `--file <path>` or `--scan` (uses `defaultProjectId` from CLI config unless `--project-id` is set).
- **Golden-path evidence `schemaVersion` 2.0.0** — `generatedAt`, `scan`, `repository`, `support`, `execution`, `policy`, `findingsSummary`; Zod mirror + Ajv contract tests; docs in `docs/evidence-export-*.md`.

### Changed
- **npm package name** — published CLI is **`@shipgate.dev/cli`** (scoped). Global install: `npm i -g @shipgate.dev/cli`; **`shipgate`** / **`isl`** binaries unchanged. The unscoped `shipgate` package on npm is not owned by this repo — see `docs/PUBLISH_CLI_NEW_NPM_ACCOUNT.md`.
- **CLI esbuild** — default build logs are **quiet**: `logLevel: 'silent'` plus filtering of known bundled-dependency CJS/ESM noise; only **unexpected** warnings print. Set `SHIPGATE_VERBOSE_BUILD=1` to print all esbuild warnings when debugging.
- **Monorepo** — `pnpm run shipgate:ci:dogfood` runs the PR-gate script with **pinned** `SHIPGATE_PR_GATE_ROOTS` (same idea as `shipgate-pr-gate.yml`) so local runs do not scan every Next app.
- **`shipgate spec bootstrap`** pretty output — product-style summary (“What we inferred”, inferred vs reviewed vs enterprise explainer) and clearer failure messaging.
- **`shipgate doctor`** — checklist wording emphasizes gaps as **confidence** (not baseline SHIP blockers); command description references the three-band model.
- **CLI bundle** — `@isl-lang/errors` is **bundled** into `dist/cli.cjs` (no longer marked `external`) so `npm install @shipgate.dev/cli` and local `node dist/cli.cjs` runs do not hit `MODULE_NOT_FOUND` for that package.
- **`cli-contract.test.ts` snapshots** — updated to match the current CLI surface (e.g. `metrics` subcommands, `shipgate provenance` argument shape).
- **Monorepo CLI build** — `packages/cli/tsup.aliases.json` is **gitignored** and regenerated on **prebuild** (`resolve-workspace-deps.js`) so clones are not pinned to one developer’s absolute paths. **`@isl-lang/verify-pipeline`** now resolves to `packages/isl-verify-pipeline` (folder name fix).
- **`shipgate scan` dashboard upload in CI** — when automation is detected (`CI`, `GITHUB_ACTIONS`, `GITLAB_CI`, etc.) or you pass `--ci`, results are **not** uploaded to the dashboard by default. Use **`--upload`** to opt in (same privacy posture as procurement docs). Local interactive runs unchanged unless you pass `--no-upload`.
- **Golden-path evidence JSON Schema** — `$id` URL is synced from `package.json` `version` on every `pnpm --filter @shipgate.dev/cli run build` (`prebuild` runs `scripts/sync-golden-schema-id.mjs`). No manual unpkg version bump per release.
- **BREAKING:** Evidence JSON shape for `shipgate next --evidence-out` — consumers on 1.1.x must migrate (see repo `docs/evidence-export-migration.md`).

### CI
- **Consumer smoke** workflow (`.github/workflows/shipgate-consumer-smoke.yml`) installs the packed tarball in a clean directory and runs `shipgate next` plus `shipgate gate` on `tests/fixtures/smoke-fresh` with `--skip-policy` for a stable Tier-1 signal.

## [3.1.0] - 2026-03-02

### Added
- **Code Provenance** — line-level AI attribution engine (`@isl-lang/code-provenance`)
  - `shipgate provenance` — project-wide AI audit trail (every line → agent + author + timestamp)
  - `shipgate provenance <file>` — file-level blame view with agent badges
  - `shipgate provenance init` — installs pre-commit hook that auto-tags commits with AI-Tool trailers
  - `shipgate provenance --format csv|json` — compliance export for SOC 2 / audit teams
  - Detects 9 AI agents: Cursor, Copilot, Claude Code, Codex, Gemini, Windsurf, Aider, Cody
  - 5 detection methods: commit trailers (high), Co-authored-by (high), provenance session (high), commit message patterns (medium), config file heuristics (low)
- **Zero-config `shipgate go`** — works without API keys via specless mode
  - Automatically falls back to security checks when no ANTHROPIC_API_KEY or OPENAI_API_KEY is set
  - Provenance scan included in every `go` run
- **Dashboard Provenance page** — `/dashboard/provenance` with:
  - Summary cards, pie chart, agent distribution bar chart, trend line
  - File browser with search, pagination, and load-more
  - Line-level blame view with keyboard navigation (j/k, Esc, Ctrl+C to copy as JSON)
  - Confidence badges with color coding and hover tooltips
  - Date range filter and CSV/JSON export with loading states
- **Dashboard API** — 5 new provenance endpoints (`/api/v1/provenance/*`)
- **VS Code provenance panel** — per-file AI attribution in the sidebar
- **GitHub Action provenance output** — PR comments include AI % and top agent
- **Opt-in CLI analytics** via PostHog (disabled by default, `SHIPGATE_ANALYTICS=1`)
- **JSON Schema** for `.shipgate.yml` (`shipgate.schema.json`)
- **Error catalog** documentation (`docs/ERROR_CATALOG.md`) — all E0001-E0712 codes
- **Package maturity index** (`PACKAGES.md`) — tiers every package as Core/Stable/Beta/Experimental
- **Dependabot** configuration for automated dependency updates
- **Docker CI workflow** — builds and smoke-tests api-server and dashboard images

### Changed
- CLI package renamed from `@shipgate/cli` to `shipgate` (matches `npm install -g shipgate`)
- `pnpm audit` in CI is now blocking (removed `continue-on-error`)
- Dashboard nav restructured from 15 flat tabs to 6 primary + grouped "More" dropdown
- README leads with provenance (audit trail) instead of verification
- CLI help text updated to show `shipgate provenance` as second command after `shipgate go`

### Fixed
- Landing page routes wired via react-router-dom (14 pages: /pricing, /security, /about, etc.)
- Landing page route transitions with Framer Motion (shared layout, fade+slide animations)
- npm package name mismatch between docs and actual published name
- Fleshed out empty stub packages: `stdlib-ai`, `stdlib-scheduling`, `ci-docker`

## [2.1.1] - 2026-02-17

### Added
- `shipgate gate` end-to-end SHIP/NO-SHIP verdict with trust scoring
- `shipgate proof badge` — generate SVG/URL badges from proof bundles
- `shipgate proof attest` — SLSA-style attestation JSON for supply chain security
- `shipgate proof comment` — GitHub PR comment generation from proof bundles
- Full-stack ISL constructs: `api`, `storage`, `workflow`, `event`, `handler`, `screen`, `config`
- Execution-proof fallback runner for environments where Vitest cannot run
- Synthetic test suppression — skipped/synthetic tests never produce SHIP verdicts
- `verification_blocked` as a critical failure in the verdict engine

### Fixed
- Trust-score-first decision logic (removed false-positive TYPE_ERROR early exits)
- Test import path resolution (`../src/` → `./src/`)
- `vitest.config.mjs` plain-object format to avoid package resolution failures

### Changed
- Rebuilt CLI bundle with all upstream fixes

## 2.0.0

### Major Changes

- b67276d: # ISL v1.0.0 Release

  First stable release of the Intent Specification Language toolchain.

  ## Core Features
  - Full ISL parser supporting domains, entities, behaviors, types, and contracts
  - Type checker with refinement types and constraints
  - Expression evaluator (95%) for preconditions and postconditions with tri-state logic
  - Test scaffold generation for Vitest/Jest
  - TypeScript type generation from ISL specs
  - Trust score calculation and evidence reports
  - Proof bundles with evaluator traces and SMT transcripts

  ## CLI Commands
  - `isl init` - Initialize a new ISL project
  - `isl parse` - Parse ISL files and display AST
  - `isl check` - Type check ISL specifications
  - `isl gen` - Generate code (TypeScript, OpenAPI, GraphQL)
  - `isl verify` - Verify implementations against specs
  - `isl gate` - SHIP/NO-SHIP gate with evidence bundle
  - `isl heal` - Automatically fix violations
  - `isl build` - Full pipeline: parse → check → gen → verify → evidence
  - `isl fmt` - Format ISL files
  - `isl lint` - Lint ISL files for best practices
  - `isl repl` - Interactive REPL
  - `isl proof verify` - Verify proof bundle integrity

  ## Editor Support
  - VS Code extension (vscode-islstudio) with syntax highlighting
  - LSP server for any editor
  - Real-time diagnostics and completion
  - Heal Until Ship UI

  ## Proof Bundle Enhancements (v2.1)
  - Evaluator decision traces with unknown reason codes
  - SMT solver transcripts (when --smt enabled)
  - Run metadata for reproducibility
  - Import graph and stdlib version tracking

  ## Verified Output
  - "Verified by ShipGate ✓" badge for passing verification

  ## Known Limitations
  - Python/Go codegen generates scaffolds only (full implementation planned for v1.2)
  - SMT solver requires Z3 for external solver; builtin handles basic cases

All notable changes to this package will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

### Changed

- **`shipgate gate` policy errors:** If organization policy **enforcement throws** (I/O or unexpected errors), the gate now **fails closed** (NO_SHIP, `POLICY_LOAD_FAILURE`) instead of continuing silently. Use **`--policy-lenient`** to restore the previous permissive behavior (not recommended for CI).

### Added

- **Next.js golden-path evidence** — `shipgate next --evidence-out` / `--summary-out` writes JSON + Markdown (including **setup failures**: missing `package.json`, not a Next app); optional `.shipgate/next.yml`; JSON Schema at `schemas/golden-path-evidence.schema.json` (published in npm package).
- **Docs** — CLI reference page for `shipgate next` (`packages/docs` → CLI → next).
- **Trust (Phase 0)** — Tier-1 command matrix and Tier-1 exit code pages on docs site (`/trust/tier-1-surface`, `/trust/exit-codes`); README trust blurb; `gate` exit-code docs clarified.
- **Trust (Phase 1 partial)** — `shipgate gate` **fail-closed** when policy enforcement throws; `--policy-lenient` for legacy; CLI flags `--skip-policy`, `--policy-file`, `--policy-profile`. Golden-path evidence `$schema` uses **unpkg** + installed package version. Workflow `shipgate-consumer-smoke.yml` tarball + `next` fixture.

## [0.1.0] - 2024-01-31

### Added

- Initial release
- `isl init` - Project initialization
- `isl check` - Parse and type-check ISL files
- `isl generate` - Code generation for multiple targets
- `isl verify` - Formal verification
- `isl repl` - Interactive REPL
- `isl format` - Code formatting
- `isl lsp` - Language server
- Configuration file support (isl.config.yaml)
