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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions .github/workflows/deploy-website.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ name: Deploy Website
- main
paths:
- "docs/site/**"
- "docs/docusaurus/**"
- ".github/workflows/deploy-website.yml"
workflow_dispatch:

Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/release-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,16 @@ jobs:

- name: Run Trivy filesystem scan
uses: aquasecurity/trivy-action@b6643a29fecd7f34b3597bc6acb0a98b03d33ff8 # 0.33.1
env:
TRIVY_SKIP_VERSION_CHECK: "true"
with:
scan-type: "fs"
scan-ref: "."
scanners: "vuln,secret"
severity: "CRITICAL,HIGH"
exit-code: "1"
ignore-unfixed: true
skip-dirs: ".venv,node_modules,console/node_modules,launcher,docs/site/api,console"
skip-dirs: ".venv,node_modules,console/node_modules,launcher,docs/site/api,console,docs/site/node_modules,docs/docusaurus/node_modules"
trivyignores: ".trivyignore"
format: "table"
output: trivy-results.txt
Expand All @@ -49,12 +51,9 @@ jobs:
if [[ -s trivy-results.txt ]]; then
{
echo "### Security Scan Results"
echo "<details><summary>Click to expand Trivy output</summary>"
echo ""
echo '```'
cat trivy-results.txt
echo '```'
echo "</details>"
} >> $GITHUB_STEP_SUMMARY
else
echo "### Security Scan: No issues found" >> $GITHUB_STEP_SUMMARY
Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,14 +81,16 @@ jobs:

- name: Run Trivy vulnerability and secret scanner
uses: aquasecurity/trivy-action@b6643a29fecd7f34b3597bc6acb0a98b03d33ff8 # 0.33.1
env:
TRIVY_SKIP_VERSION_CHECK: "true"
with:
scan-type: 'fs'
scan-ref: '.'
scanners: 'vuln,secret'
severity: 'CRITICAL,HIGH'
exit-code: '1'
ignore-unfixed: true
skip-dirs: '.venv,node_modules,console/node_modules,launcher,docs/site/api,console'
skip-dirs: '.venv,node_modules,console/node_modules,launcher,docs/site/api,console,docs/site/node_modules,docs/docusaurus/node_modules'
trivyignores: '.trivyignore'
format: 'table'
output: trivy-results.txt
Expand All @@ -99,12 +101,9 @@ jobs:
if [[ -s trivy-results.txt ]]; then
{
echo "### Security Scan Results"
echo "<details><summary>Click to expand Trivy output</summary>"
echo ""
echo '```'
cat trivy-results.txt
echo '```'
echo "</details>"
} >> $GITHUB_STEP_SUMMARY
else
echo "### Security Scan: No issues found" >> $GITHUB_STEP_SUMMARY
Expand Down
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
.devcontainer
.playwright-*/
.vercel
.mcp.json
Expand Down
222 changes: 127 additions & 95 deletions README.md

Large diffs are not rendered by default.

Binary file modified console/src/services/server/ErrorHandler.ts
Binary file not shown.
Binary file modified console/src/services/server/Server.ts
Binary file not shown.
Binary file modified console/src/services/server/middleware/auth.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/BaseRouteHandler.ts
Binary file not shown.
Binary file modified console/src/services/worker/http/routes/AuthRoutes.ts
Binary file not shown.
Binary file modified console/src/services/worker/http/routes/BackupRoutes.ts
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 removed console/src/services/worker/http/routes/TeamsTypes.ts
Binary file not shown.
Binary file modified console/src/services/worker/http/routes/utils/gitInfo.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/components/LogsModal.tsx
Binary file not shown.
Binary file modified console/src/ui/viewer/components/TerminalPreview.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/constants/timing.ts
Binary file not shown.
Binary file modified console/src/ui/viewer/hooks/useSettings.ts
Binary file not shown.
Binary file added 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 removed console/src/ui/viewer/hooks/useTeams.ts
Binary file not shown.
Binary file modified console/src/ui/viewer/layouts/DashboardLayout.tsx
Binary file not shown.
Binary file modified console/src/ui/viewer/layouts/Sidebar/SidebarFooter.tsx
Binary file not shown.
Binary file modified console/src/ui/viewer/layouts/Sidebar/SidebarNav.tsx
Binary file not shown.
Binary file modified console/src/ui/viewer/layouts/Sidebar/index.tsx
Binary file not shown.
Binary file modified console/src/ui/viewer/layouts/Topbar/index.tsx
Binary file not shown.
Binary file modified console/src/ui/viewer/styles/main.css
Binary file not shown.
Binary file modified console/src/ui/viewer/views/Changes/index.tsx
Binary file not shown.
Binary file modified console/src/ui/viewer/views/Dashboard/GitStatus.tsx
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 not shown.
Binary file modified console/src/ui/viewer/views/Dashboard/UsageSummary.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/charts/ProjectsChart.tsx
Binary file not shown.
Binary file modified console/src/ui/viewer/views/Dashboard/charts/TokensChart.tsx
Binary file not shown.
Binary file modified console/src/ui/viewer/views/Dashboard/index.tsx
Binary file not shown.
Binary file added console/src/ui/viewer/views/Help/index.tsx
Binary file not shown.
Binary file modified console/src/ui/viewer/views/Memories/MemoryCard.tsx
Binary file not shown.
Binary file modified console/src/ui/viewer/views/Sessions/SessionTimeline.tsx
Binary file not shown.
Binary file modified console/src/ui/viewer/views/Settings/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 added console/src/ui/viewer/views/Share/index.tsx
Binary file not shown.
Binary file modified console/src/ui/viewer/views/Spec/SpecSection.tsx
Binary file not shown.
Binary file modified console/src/ui/viewer/views/Spec/index.tsx
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed console/src/ui/viewer/views/Teams/TeamsHelpModal.tsx
Binary file not shown.
Binary file not shown.
Binary file removed console/src/ui/viewer/views/Teams/TeamsPushPanel.tsx
Binary file not shown.
Binary file removed console/src/ui/viewer/views/Teams/TeamsSetupTab.tsx
Binary file not shown.
Binary file not shown.
Binary file removed console/src/ui/viewer/views/Teams/index.tsx
Binary file not shown.
Binary file modified console/src/ui/viewer/views/index.ts
Binary file not shown.
Binary file modified console/tests/hooks/use-teams.test.ts
Binary file not shown.
Binary file modified console/tests/hooks/useSettings.test.ts
Binary file not shown.
Binary file modified console/tests/server/error-handler.test.ts
Binary file not shown.
Binary file modified console/tests/settings-routes.test.ts
Binary file not shown.
Binary file modified console/tests/ui/ChangesView.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/search-removal.test.ts
Binary file not shown.
Binary file modified 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 modified console/tests/ui/teams-view.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 modified console/tests/worker/teams-routes.test.ts
Binary file not shown.
5 changes: 5 additions & 0 deletions docs/docusaurus/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
node_modules/
build/
.docusaurus/
.cache-loader/
.playwright-cli/
38 changes: 38 additions & 0 deletions docs/docusaurus/docs/features/context-preservation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
sidebar_position: 3
title: Context Preservation
description: Seamless continuation across auto-compaction cycles
---

# Context Preservation

Seamless continuation across auto-compaction cycles.

Claude Code reserves ~16.5% of the context window as a compaction buffer, triggering auto-compaction at ~83.5% raw usage. Pilot hooks intercept this cycle to preserve state — you never lose progress mid-task. Multiple Pilot sessions can run in parallel on the same project without interference.

## The Compaction Cycle

```
PreCompact → Compact → SessionStart(compact)
```

1. **PreCompact** — `pre_compact.py` captures active plan, task list, recent decisions, and key context to Pilot Shell Console memory.
2. **Compact** — Claude Code auto-compaction summarizes conversation history. Preserves recent tool calls and conversation flow.
3. **SessionStart(compact)** — `post_compact_restore.py` re-injects Pilot context: active plan path, task state, key decisions. Work resumes seamlessly.

## Effective Context Display

Pilot rescales the raw context usage to an **effective 0–100% range** so the status bar fills naturally to 100% right before compaction fires. A `▓` buffer indicator at the end of the bar shows the reserved zone. The context monitor warns at ~80% effective (informational) and ~90%+ effective (caution) — no confusing raw percentages.

## What Gets Preserved

- 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

:::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.
:::
79 changes: 79 additions & 0 deletions docs/docusaurus/docs/features/hooks.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
---
sidebar_position: 2
title: Hooks Pipeline
description: 15 hooks across 7 lifecycle events — fire automatically at every stage
---

# Hooks Pipeline

15 hooks across 7 lifecycle events — fire automatically at every stage.

Hooks are the enforcement layer. They run at each stage of Claude's work cycle — automatically, without prompting. Blocking hooks can reject an action or force a fix. Non-blocking hooks warn without interrupting. Async hooks run in the background.

## SessionStart

*On startup, clear, or after compaction*

| Hook | Type | Description |
|------|------|-------------|
| Memory loader | Blocking | Loads persistent context from Console memory into the session |
| `post_compact_restore.py` | Blocking | Re-injects active plan, task state, and key context after compaction |
| Session tracker | Async | Initializes user message tracking for the session |

## UserPromptSubmit

*When the user sends a message*

| Hook | Type | Description |
|------|------|-------------|
| Session initializer | Async | Registers the session with the Console worker daemon on first message |

## PreToolUse

*Before search, web, or task tools*

| Hook | Type | Description |
|------|------|-------------|
| `tool_redirect.py` | Blocking | Redirects to MCP alternatives, blocks plan mode conflicts, hints Probe CLI for search |

## PostToolUse

*After every Write / Edit / MultiEdit*

| Hook | Type | Description |
|------|------|-------------|
| `file_checker.py` | Blocking | Python (ruff + basedpyright), TypeScript (Prettier + ESLint + tsc), Go (gofmt + golangci-lint). Auto-fixes formatting. |
| `tdd_enforcer.py` | Non-blocking | Warns when implementation files are edited without a failing test first |
| `context_monitor.py` | Non-blocking | Tracks context usage 0–100%. Warns at ~80%, caution at ~90%+ |
| Memory observer | Async | Captures decisions, discoveries, and bugfixes to persistent memory |

## PreCompact

*Before auto-compaction fires*

| Hook | Type | Description |
|------|------|-------------|
| `pre_compact.py` | Blocking | Snapshots active plan, task list, and key decisions to memory |

## Stop

*When Claude tries to finish*

| Hook | Type | Description |
|------|------|-------------|
| `spec_stop_guard.py` | Blocking | Blocks stopping if an active spec hasn't completed verification |
| `spec_plan_validator.py` | Blocking | Verifies plan file was created with required sections |
| `spec_verify_validator.py` | Blocking | Verifies plan status was updated to VERIFIED |
| Session summarizer | Async | Saves session observations to memory for future sessions |

## SessionEnd

*When the session closes*

| Hook | Type | Description |
|------|------|-------------|
| `session_end.py` | Blocking | Stops worker daemon if no other sessions active. Sends dashboard notification. |

:::info Closed loop
When compaction fires, **PreCompact** captures your active plan, task list, and key decisions to persistent memory. **SessionStart** restores everything afterward — work continues exactly where it left off. No progress lost, no manual intervention.
:::
31 changes: 31 additions & 0 deletions docs/docusaurus/docs/features/model-routing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
sidebar_position: 5
title: Model Routing
description: Opus where reasoning matters, Sonnet where speed and cost matter
---

# Model Routing

Opus where reasoning matters, Sonnet where speed and cost matter.

Pilot automatically routes each phase to the right model. Rather than always using the most powerful (and most expensive) model, it applies reasoning where reasoning has the highest impact — and uses fast, cost-effective execution where a clear spec makes quality predictable.

## Routing Table

| Phase | Model | Rationale |
|-------|-------|-----------|
| **Planning** | Opus | Exploring your codebase, designing architecture, and writing the spec requires deep reasoning. A good plan is the foundation — invest here. |
| **Plan Verification** | Sonnet | The plan-reviewer sub-agent validates completeness and challenges assumptions on every feature spec. |
| **Implementation** | Sonnet | With a solid plan, writing code is straightforward. Sonnet is fast, cost-effective, and produces high-quality code when guided by a clear spec and strong hooks. |
| **Code Verification** | Sonnet | The unified spec-reviewer agent handles deep code review (compliance + quality + goal). The orchestrator runs mechanical checks and applies fixes efficiently. |

## The Insight

- Implementation is the easy part when the plan is good and verification is thorough
- Pilot invests reasoning power (Opus) where it has the highest impact: planning
- Sonnet handles implementation and verification — guided by a solid plan and structured review agents
- The result: better output at lower cost than running Opus everywhere

:::tip Fully configurable
Configure via the Pilot Shell Console Settings tab (`localhost:41777/#/settings`). Choose between Sonnet 4.6 and Opus 4.6 for the main session, each command, and each sub-agent independently. Enable the **Extended Context (1M)** toggle to switch all models to the 1M token context window simultaneously — useful for very large codebases. Requires Max 20x or Enterprise subscription.
:::
53 changes: 53 additions & 0 deletions docs/docusaurus/docs/features/rules.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
---
sidebar_position: 4
title: Rules & Standards
description: Production-tested best practices loaded into every session
---

# Rules & Standards

Production-tested best practices loaded into every session.

Rules are loaded automatically at session start. They're not suggestions — they're enforced standards. Coding standards load conditionally based on the file type being edited, keeping context lean. Your project-level rules in `.claude/rules/` are loaded alongside Pilot's built-ins and take precedence when they overlap.

## Built-in Rule Categories

### Core Workflow (3 rules)

- `task-and-workflow.md` — Task management, /spec orchestration, deviation handling
- `testing.md` — TDD workflow, test strategy, coverage requirements (≥80%)
- `verification.md` — Execution verification, completion requirements

### Development Practices (3 rules)

- `development-practices.md` — Project policies, systematic debugging, git rules
- `context-management.md` — Auto-compaction and context preservation
- `pilot-memory.md` — Online learning triggers

### Tools (3 rules)

- `research-tools.md` — Search priority and tool selection guide
- `cli-tools.md` — Pilot CLI, Probe code search
- `playwright-cli.md` — Browser automation for E2E UI testing

### Collaboration (1 rule)

- `skill-sharing.md` — Skillshare CLI and three-tier sharing model

## Coding Standards — Activated by File Type

| Standard | Activates On | Coverage |
|----------|-------------|----------|
| Python | `*.py` | uv, pytest, ruff, basedpyright, type hints |
| TypeScript | `*.ts, *.tsx, *.js, *.jsx` | npm/pnpm, Jest, ESLint, Prettier, React patterns |
| Go | `*.go` | Modules, testing, formatting, error handling |
| Frontend | `*.tsx, *.jsx, *.html, *.vue, *.css` | Components, CSS, accessibility, responsive design |
| Backend | `**/models/**, **/routes/**, **/api/**` | API design, data models, query optimization, migrations |

:::tip Custom rules
Create `.claude/rules/my-rule.md` in your project. Add `paths: ["*.py"]` frontmatter to activate only for specific file types. Run `/sync` to auto-discover patterns and generate project-specific rules for you.
:::

:::info Monorepo support
Organize rules in nested subdirectories by product and team (e.g. `.claude/rules/my-product/team-x/`). Team-level rules must use `paths` frontmatter to scope to the right files. `/sync` generates a `README.md` in your rules directory to document the structure.
:::
Loading
Loading