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
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,6 @@ __marimo__/

# Claude Code
CLAUDE.md
AGENTS.md
.playwright-*/
.vercel
.mcp.json
Expand Down
207 changes: 120 additions & 87 deletions README.md

Large diffs are not rendered by default.

Binary file modified console/src/services/sqlite/SessionStore.ts
Binary file not shown.
Binary file modified console/src/services/worker-service.ts
Binary file not shown.
Binary file modified console/src/services/worker/http/middleware.ts
Binary file not shown.
Binary file modified console/src/services/worker/http/routes/DataRoutes.ts
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified console/src/services/worker/http/routes/SettingsRoutes.ts
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified console/src/shared/worker-utils.ts
Binary file not shown.
Binary file added console/src/shared/wsl.ts
Binary file not shown.
Binary file modified console/src/ui/viewer/App.tsx
Binary file not shown.
Binary file modified console/src/ui/viewer/components/CommandPalette.tsx
Binary file not shown.
Binary file modified console/src/ui/viewer/constants/shortcuts.ts
Binary file not shown.
Binary file modified console/src/ui/viewer/context/ProjectContext.tsx
Binary file not shown.
Binary file added console/src/ui/viewer/hooks/useExtensions.ts
Binary file not shown.
Binary file modified console/src/ui/viewer/hooks/useSettings.ts
Binary file not shown.
Binary file removed console/src/ui/viewer/hooks/useShare.ts
Binary file not shown.
Binary file modified console/src/ui/viewer/hooks/useStats.ts
Binary file not shown.
Binary file added console/src/ui/viewer/hooks/useTeamRemote.ts
Binary file not shown.
Binary file modified console/src/ui/viewer/layouts/Sidebar/SidebarNav.tsx
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified console/src/ui/viewer/views/Dashboard/PlanStatus.tsx
Binary file not shown.
Binary file not shown.
Binary file modified console/src/ui/viewer/views/Dashboard/StatsGrid.tsx
Binary file not shown.
Binary file modified console/src/ui/viewer/views/Dashboard/WorkerStatus.tsx
Binary file not shown.
Binary file modified console/src/ui/viewer/views/Dashboard/index.tsx
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added console/src/ui/viewer/views/Extensions/index.tsx
Binary file not shown.
Binary file modified console/src/ui/viewer/views/Memories/index.tsx
Binary file not shown.
Binary file modified console/src/ui/viewer/views/Sessions/SessionCard.tsx
Binary file not shown.
Binary file modified console/src/ui/viewer/views/Sessions/index.tsx
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed console/src/ui/viewer/views/Share/index.tsx
Binary file not shown.
Binary file modified console/src/ui/viewer/views/index.ts
Binary file not shown.
Binary file modified console/src/utils/project-name.ts
Binary file not shown.
Binary file removed console/tests/hooks/use-teams.test.ts
Binary file not shown.
Binary file added console/tests/hooks/useExtensions.test.ts
Binary file not shown.
Binary file added console/tests/hooks/useStats.test.ts
Binary file not shown.
Binary file added console/tests/shared/wsl.test.ts
Binary file not shown.
Binary file added console/tests/ui/ExtensionDetail.test.ts
Binary file not shown.
Binary file added console/tests/ui/ExtensionsGrid.test.ts
Binary file not shown.
Binary file added console/tests/ui/ExtensionsView.test.ts
Binary file not shown.
Binary file modified console/tests/ui/dashboard-project-filter.test.ts
Binary file not shown.
Binary file modified console/tests/ui/memories-search.test.ts
Binary file not shown.
Binary file modified console/tests/ui/project-selector.test.ts
Binary file not shown.
Binary file modified console/tests/ui/stats-grid-spec-cards.test.ts
Binary file not shown.
Binary file removed console/tests/ui/teams-install.test.ts
Binary file not shown.
Binary file modified console/tests/ui/teams-navigation.test.ts
Binary file not shown.
Binary file removed console/tests/ui/teams-view.test.ts
Binary file not shown.
Binary file added console/tests/ui/useTeamRemote.test.ts
Binary file not shown.
Binary file modified console/tests/ui/views-index.test.ts
Binary file not shown.
Binary file not shown.
Binary file added console/tests/worker/extension-routes.test.ts
Binary file not shown.
Binary file not shown.
Binary file removed console/tests/worker/share-routes-extras.test.ts
Binary file not shown.
Binary file added console/tests/worker/team-remote-routes.test.ts
Binary file not shown.
Binary file removed console/tests/worker/teams-routes.test.ts
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,35 +1,38 @@
---
sidebar_position: 4
title: Pilot CLI
description: Full command reference for the pilot binary at ~/.pilot/bin/pilot
description: Command reference for the pilot binary at ~/.pilot/bin/pilot
---

# Pilot CLI

Full command reference for the pilot binary at `~/.pilot/bin/pilot`.
Command reference for the `pilot` binary at `~/.pilot/bin/pilot`.

The `pilot` binary manages sessions, worktrees, licensing, and context. Run `pilot` or `ccp` with no arguments to start Claude with Pilot enhancements. All commands support `--json` for structured output. Multiple sessions can run in parallel on the same project — each tracks its own worktree and context state independently.
Run `pilot` or `ccp` with no arguments to start Claude with Pilot enhancements. Most commands support `--json` for structured output. Multiple sessions can run in parallel on the same project.

## Session & Context

| Command | Description |
|---------|-------------|
| `pilot` | Start Claude with Pilot enhancements, auto-update, and license check |
| `pilot run [args...]` | Same as above, with optional flags (`--skip-update-check`) |
| `ccp` | Alias for pilot — shorter to type |
| `pilot check-context --json` | Get current context usage percentage (informational) |
| `pilot register-plan <path> <status>` | Associate a plan file with the current session for statusline display |
| `ccp` | Alias for pilot |
| `pilot check-context --json` | Get current context usage percentage |
| `pilot register-plan <path> <status>` | Associate a plan file with the current session |
| `pilot sessions [--json]` | Show count of active Pilot sessions |
| `pilot statusline` | Run the status line formatter (called by Claude Code) |
| `pilot notify <event> [data]` | Send a notification to the Console dashboard |
| `pilot --version` | Show Pilot Shell version |

## Worktree Isolation

| Command | Description |
|---------|-------------|
| `pilot worktree create --json <slug>` | Create isolated git worktree for safe experimentation |
| `pilot worktree create --json <slug>` | Create isolated git worktree |
| `pilot worktree detect --json <slug>` | Check if a worktree already exists |
| `pilot worktree diff --json <slug>` | List changed files in the worktree |
| `pilot worktree sync --json <slug>` | Squash merge worktree changes back to base branch |
| `pilot worktree cleanup --json <slug>` | Remove worktree and branch when done |
| `pilot worktree cleanup --json <slug>` | Remove worktree and branch (`--force` to skip checks, `--discard` to drop changes) |
| `pilot worktree status --json` | Show active worktree info for current session |

## License & Auth
Expand Down
139 changes: 139 additions & 0 deletions docs/docusaurus/docs/features/console.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@
---
sidebar_position: 8
title: Pilot Console
description: Local web dashboard at localhost:41777 — monitor and manage your sessions
---

# Pilot Console

Local web dashboard at `localhost:41777` — monitor and manage your sessions.

The Console runs locally as a Bun/Express server with a React web UI. It's automatically started when you launch Pilot and stopped when all sessions close. All data — memories, sessions, usage — is stored in a local SQLite database. Nothing leaves your machine.

```bash
$ open http://localhost:41777
```

## 9 Views

| View | Description |
|------|-------------|
| **Dashboard** | Workspace status, active sessions, spec progress, git info, recent activity. Your real-time command center. |
| **Specifications** | All spec plans with task progress (checkboxes), phase tracking (PENDING/COMPLETE/VERIFIED), and iteration history. |
| **Extensions** | All extensions — local, plugin, and remote — with team sharing via git (push, pull, diff), color-coded categories, and scope filtering (All / Global / Project / Plugin / Remote). |
| **Changes** | Git diff viewer with staged/unstaged files, branch info, and worktree context. |
| **Memories** | Browsable observations — decisions, discoveries, bugfixes — with type filters, search, and timeline view. |
| **Sessions** | Active and past sessions with observation counts, duration, and the ability to browse session context. |
| **Usage** | Daily token costs, model routing breakdown (Opus vs Sonnet distribution), and usage trends over time. |
| **Settings** | Model selection per command and sub-agent (Sonnet 4.6 vs Opus 4.6). Spec workflow toggles (worktree support, ask questions, plan approval). Reviewer toggles (plan reviewer, spec reviewer). Context window size auto-detected from Claude Code. |
| **Help** | Embedded documentation from pilot-shell.com — full technical reference without leaving the Console. |

## Smart Notifications via SSE

The Console sends real-time alerts via Server-Sent Events when Claude needs your input or a significant phase completes. You don't need to watch the terminal constantly — the Console notifies you.

- Plan requires your approval — review and respond in the terminal or via notification
- Spec phase completed — implementation done, verification starting
- Clarification needed — Claude is waiting for design decisions before proceeding
- Session ended — completion summary with observation count

## Settings

The Settings tab (`localhost:41777/#/settings`) controls how Pilot Shell behaves. Changes are saved to `~/.pilot/config.json` and take effect after restarting Claude Code.

### Model Preferences

Choose between **Sonnet 4.6** ($3/$15 per MTok) and **Opus 4.6** ($5/$25 per MTok) for each component independently.

#### General

| Setting | Default | Description |
|---------|---------|-------------|
| **Main Session** | Opus | Quick mode and direct chat |

#### Spec Phases

| Phase | Default | Description |
|-------|---------|-------------|
| **Planning** | Opus | Codebase exploration, architecture design, plan writing |
| **Implementation** | Sonnet | TDD loop — write test, write code, verify |
| **Verification** | Sonnet | Test execution, code review orchestration |

#### Extended Context (1M)

Toggle for using the 1M token context window instead of 200K. Included at no additional cost with Max, Team, and Enterprise Claude plans. Disable only if your API plan doesn't support it.

### Spec Workflow

#### Review Agents

Two independent sub-agents that run in separate context windows during `/spec`:

| Agent | Default | Token cost | Description |
|-------|---------|------------|-------------|
| **Plan Review** | On | ~50k tokens | Validates plans before implementation. Checks alignment with requirements and flags risky assumptions. |
| **Spec Review** | On | ~100k tokens | Reviews code after implementation. Checks compliance, quality, and goal achievement. Reads all changed files. |

Each agent has its own model selector (Sonnet or Opus). Disabling an agent skips it entirely — no tokens consumed.

:::tip Non-Max users
During installation, Pilot automatically disables both review agents for Pro, Team, and Enterprise users to reduce token usage. You can re-enable them here if desired.
:::

#### Automation

Three toggles that control user interaction points during `/spec`. Disable all three for fully autonomous operation.

| Toggle | Default | When enabled | When disabled |
|--------|---------|-------------|---------------|
| **Worktree Support** | On | Asks whether to isolate changes in a git worktree at the start of `/spec` | Worktree is always skipped — changes go directly on the current branch |
| **Ask Questions** | On | Asks clarifying questions during planning to resolve ambiguities | Planning runs fully autonomous — makes default choices without asking |
| **Plan Approval** | On | Requires your approval before implementation starts | Implementation begins automatically after planning completes |

#### Fully Autonomous Mode

To make `/spec` run end-to-end without any user interaction:

1. Disable **Worktree Support** — skips the worktree prompt
2. Disable **Ask Questions** — planning makes autonomous decisions
3. Disable **Plan Approval** — implementation starts automatically

With all three off, typing `/spec add user authentication` will plan, implement, and verify the feature completely autonomously. You can review the output when it's done.

:::warning Token usage
Fully autonomous mode means no checkpoints — Claude will execute the entire workflow without asking. Make sure your prompt is specific enough to avoid misinterpretation. You can always interrupt with Escape.
:::

### Config File

All settings are stored in `~/.pilot/config.json`:

```json
{
"model": "opus",
"extendedContext": true,
"commands": {
"spec-plan": "opus",
"spec-implement": "sonnet",
"spec-verify": "sonnet",
"spec": "sonnet",
"setup-rules": "opus",
"create-skill": "opus"
},
"agents": {
"plan-reviewer": "sonnet",
"spec-reviewer": "sonnet"
},
"reviewerAgents": {
"planReviewer": true,
"specReviewer": true
},
"specWorkflow": {
"worktreeSupport": true,
"askQuestionsDuringPlanning": true,
"planApproval": true
}
}
```

You can edit this file directly — the Console Settings UI is a convenience wrapper. Changes require a Claude Code restart to take effect.
11 changes: 6 additions & 5 deletions docs/docusaurus/docs/features/context-preservation.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,13 @@ Pilot rescales the raw context usage to an **effective 0–100% range** so the s

## What Gets Preserved

The PreCompact hook captures:

- Active plan file path and current status (PENDING/COMPLETE/VERIFIED)
- Task list with completion state and in-progress task
- Key decisions made during the session
- Recently modified files and their context
- Error messages and debugging progress
- Memory observations from the Pilot Shell Console
- Task count and directory reference
- Custom instructions from the session

Memory observations (decisions, discoveries, bugfixes) persist independently in SQLite — they survive compaction regardless of hooks.

:::tip Never rush due to context warnings
Context limits are not an emergency — auto-compaction preserves everything and resumes seamlessly. Finish the current task with full quality. The only thing that matters is the output, not the context percentage.
Expand Down
149 changes: 149 additions & 0 deletions docs/docusaurus/docs/features/extensions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,149 @@
---
sidebar_position: 1
title: Extensions
description: Manage all Claude Code extensions — skills, rules, commands, and agents — from a unified interface with team sharing and plugin visibility
---

# Extensions

Extensions are the things that customize Claude Code behavior. Pilot Shell provides a unified view of all extensions across multiple scopes: **global** (your personal `~/.claude/` directory), **project** (the `.claude/` directory in each project), **plugin** (installed Claude Code plugins), and **remote** (a connected team git repository).

## Extension Categories

| Category | What it does | Location |
| ------------ | ----------------------------------------------------------- | -------------------------------- |
| **Skills** | Reusable workflows that load automatically when relevant | `.claude/skills/<name>/SKILL.md` |
| **Rules** | Instructions Claude follows every session (or by file type) | `.claude/rules/<name>.md` |
| **Commands** | Slash commands invoked on demand via `/<name>` | `.claude/commands/<name>.md` |
| **Agents** | Sub-agent definitions for specialized tasks | `.claude/agents/<name>.md` |

## Scope: Global vs Project

**Global extensions** live in `~/.claude/` and are available in every project. They're personal to you.

**Project extensions** live in `.claude/` inside a specific project directory. They're visible only when that project is active and can be committed to the repository so teammates get them automatically.

## Plugin Extensions

Installed Claude Code plugins are automatically discovered and their extensions appear on the Extensions page. Plugin extensions are **read-only** — they come from the marketplace and cannot be edited, renamed, or deleted.

- Plugins are tracked in `~/.claude/settings.json` under `enabledPlugins`
- Plugin assets live at `~/.claude/plugins/marketplaces/<marketplace>/plugins/<name>/`
- Each plugin extension shows its plugin name as a badge (e.g., "code-review", "feature-dev")
- Filter by the **Plugin** scope button to see only plugin extensions

Install plugins via the Claude Code CLI: `claude plugin install <name>`

## Team Sharing (Team Tier)

Share extensions with your team through a connected git repository. This feature is available on the Team plan.

### How It Works

Team sharing uses `~/.claude/` as a git repository with a scoped `.gitignore` that tracks **only** the four extension directories (skills, rules, commands, agents). Everything else in `~/.claude/` is ignored by git.

### Connecting a Remote

1. On the Console Extensions page, find the **Team Remote** card
2. Enter a git remote URL (e.g., `https://github.com/org/team-extensions.git`)
3. Optionally specify a **subfolder** if your extensions live in a subdirectory (e.g., `plugins/myteam`)
4. Click **Connect** — Pilot initializes the git repo and verifies connectivity

Authentication uses your existing system git credentials (SSH keys or credential helpers).

### Browsing Remote Extensions

After connecting, a **Remote** scope filter button appears in the filter bar. Select it to see all extensions available in the team repository. Each remote extension shows its file path in the repository.

### Push and Pull

- **Push to Remote** — From any local extension's detail modal, click the **Push** button to upload it to the team repository
- **Download from Remote** — Click any remote extension and choose **Download to Global** or **Download to Project**
- **Conflict detection** — If a local file differs from the remote version, Pilot shows a diff and lets you choose whether to overwrite

### Comparing Versions

When an extension exists both locally and in the remote, the detail modal shows a **Remote** compare button. This opens a side-by-side diff view (same as the project vs global diff) with options to sync in either direction:

- **Use Remote → Local** — overwrite your local version with the remote
- **Use Local → Remote** — push your local version to the remote

### Subfolder Support

Some teams organize their extensions repository with subfolder paths (e.g., `plugins/myteam/rules/`, `plugins/myteam/skills/`). When you specify a subfolder during connection, all browse/push/pull operations automatically translate between the subfolder-prefixed remote paths and your local `~/.claude/` paths.

## Console Extensions Page

The [Pilot Console](/docs/features/console) provides a full management interface at `http://localhost:41777/#/extensions`.

### Viewing Extensions

- All extensions from all scopes appear in a unified two-column grid
- Each category has a distinct color: Skills (violet), Rules (amber), Commands (green), Agents (blue)
- Filter by **scope** (All / Global / Project / Plugin / Remote) and **category** (Skills, Rules, Commands, Agents)
- Search by name in the top-right search bar
- Extensions that exist in both scopes show an "also in global/project" indicator so you can spot duplicates at a glance
- Plugin extensions display the plugin name as a badge
- Click any extension to see its full content

### Editing Extensions

Extensions support:

- **View** — rendered preview or raw source toggle
- **Edit** — in-place markdown editor, saved directly to disk
- **Rename** — rename the file/directory
- **Delete** — with confirmation prompt
- **Move** — transfer between project and global scope (physically moves the file, not a copy)
- **Compare** — diff between project and global versions, or between local and remote versions
- **Push** — upload a local extension to the connected team remote
- **Download** — pull a remote extension to local global or project scope

Plugin extensions are read-only — edit, rename, delete, and move are not available.

### Moving Between Scopes

Clicking "→ Global" on a project extension physically moves the file from `.claude/` to `~/.claude/`. Clicking "→ Project" moves it back. This is a move, not a copy — the original is removed.

## Creating Extensions

Create extensions manually or via Claude Code commands:

- **Rules:** `/setup-rules` — explores your codebase and generates project-specific rules
- **Skills:** `/create-skill` — builds a reusable skill interactively from any topic
- **Commands:** Create `.claude/commands/<name>.md` manually
- **Agents:** Create `.claude/agents/<name>.md` manually

## File Locations Reference

### Global Extensions

```
~/.claude/
├── skills/ ← global skills
├── rules/ ← global rules
├── commands/ ← global commands
└── agents/ ← global agents
```

### Project Extensions

```
<project>/
├── .claude/
│ ├── skills/ ← project skills
│ ├── rules/ ← project rules (committed to repo)
│ ├── commands/ ← project commands
│ └── agents/ ← project agents
```

### Plugin Extensions (read-only)

```
~/.claude/plugins/marketplaces/<marketplace>/plugins/<name>/
├── .claude-plugin/plugin.json ← plugin manifest
├── skills/ ← plugin skills
├── rules/ ← plugin rules
├── commands/ ← plugin commands
└── agents/ ← plugin agents
```
Loading
Loading