# kaochenlong/spectra-app architecture

> Architecture diagram of the GitHub repository kaochenlong/spectra-app, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-07-21). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/kaochenlong/spectra-app
- Repository: https://github.com/kaochenlong/spectra-app

## Overview

#### Purpose and Distribution

Spectra is a packaged desktop application for OpenSpec-compatible, spec-driven development. It manages `openspec/` Markdown/YAML project data through a GUI and optional CLI, covering change proposals, specs, tasks, and archives. This repository contains release artifacts rather than application source. Distribution entry points are platform installers: `releases/2.3.1/Spectra_2.3.1_aarch64.dmg`, `releases/2.3.1/Spectra_2.3.1_x64.dmg`, and `releases/2.3.1/Spectra_2.3.1_x64-setup.exe`.

#### Runtime and Platform Boundary

The executable runtime is encapsulated in signed/bundled macOS `.dmg` and Windows `.exe` packages; no source-level process, UI, or CLI entry point is present in the tree. Supported targets are macOS ARM64, macOS x64, and Windows x64, represented under `releases/2.2.5/` and `releases/2.3.0/`.

#### OpenSpec Data Lifecycle

At runtime, Spectra opens an existing or newly created OpenSpec project directory and treats its specs, change proposals, designs, and task documents as the durable project boundary. It is compatible with directories generated by OpenSpec CLI. The core lifecycle is: create/edit change documents → parse Markdown checklists for task progress → apply/track work → archive completed changes. No implementation paths for this layer are available in the supplied tree.

#### AI-Assisted Workflow Boundary

Spectra integrates with Claude Code through named skills/slash commands for discussion, proposal creation, task execution, ingestion, archiving, debugging, and spec Q&A. Parallel execution is an experimental opt-in path: independent `[P]` tasks may be delegated to Claude Code subagents. This is an external-tool boundary; source/configuration for the integration is not included.

#### Search and Knowledge Retrieval

The product provides full-text search and RAG-backed natural-language questions across specifications and changes. This subsystem indexes OpenSpec content and supports English, Japanese, Traditional Chinese, and Simplified Chinese. Its AI/vector-search runtime is constrained to Apple Silicon or Windows, but the repository exposes only installers, not index, model, or service implementation.

#### Workspace Isolation and Parking

Optional Git worktree integration creates isolated directories and `spx/<change-name>` branches per change, detects current worktrees, and switches context. The park/unpark mechanism temporarily shelves in-progress specs outside the Git working tree through the optional CLI. Both define boundaries between Spectra-managed workflow state and the user’s Git repository.

#### Product Assets and Release Management

Branding is stored at `assets/logo.png`. Versioned binary delivery is organized by release folders, with historical platform packages in `releases/2.2.5/`, `releases/2.3.0/`, and `releases/2.3.1/`. Repository-level feedback routes through GitHub issue templates in `.github/ISSUE_TEMPLATE/`.

Main entry points: [`releases/2.3.1`](https://github.com/kaochenlong/spectra-app/tree/main/releases/2.3.1) (Release 2.3.1), [`releases/2.3.1/Spectra_2.3.1_aarch64.dmg`](https://github.com/kaochenlong/spectra-app/blob/main/releases/2.3.1/Spectra_2.3.1_aarch64.dmg) (macOS ARM64 installer), [`releases/2.3.1/Spectra_2.3.1_x64.dmg`](https://github.com/kaochenlong/spectra-app/blob/main/releases/2.3.1/Spectra_2.3.1_x64.dmg) (macOS x64 installer), [`releases/2.3.1/Spectra_2.3.1_x64-setup.exe`](https://github.com/kaochenlong/spectra-app/blob/main/releases/2.3.1/Spectra_2.3.1_x64-setup.exe) (Windows x64 installer)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_distribution["Distribution"]
  node_release_225["Release 2.2.5<br/>release folder<br/>[2.2.5]"]
  node_release_230["Release 2.3.0<br/>release folder<br/>[2.3.0]"]
  node_release_231["Release 2.3.1<br/>release folder<br/>[2.3.1]"]
  node_mac_arm_installer["macOS ARM64 installer<br/>DMG"]
  node_mac_x64_installer["macOS x64 installer<br/>DMG"]
  node_windows_installer["Windows x64 installer<br/>EXE"]
  node_issue_templates["Issue templates<br/>feedback channel<br/>[ISSUE_TEMPLATE]"]
end

subgraph group_workflow["OpenSpec Workflow"]
  node_spectra_runtime{{"Spectra runtime<br/>bundled desktop app"}}
  node_change_lifecycle["Change lifecycle<br/>workflow"]
  node_task_progress["Task progress<br/>Markdown checklist parser"]
  node_search_rag["Search and RAG<br/>knowledge retrieval"]
end

subgraph group_integrations["External Boundaries"]
  node_openspec_project[("OpenSpec project<br/>durable project data")]
  node_claude_code{{"Claude Code<br/>external AI tool"}}
  node_git_worktrees["Git worktrees<br/>Git integration"]
  node_parked_state["Parked specs<br/>workflow state"]
end

node_release_231 -->|"ships"| node_mac_arm_installer
node_release_231 -->|"ships"| node_mac_x64_installer
node_release_231 -->|"ships"| node_windows_installer
node_mac_arm_installer -->|"installs"| node_spectra_runtime
node_mac_x64_installer -->|"installs"| node_spectra_runtime
node_windows_installer -->|"installs"| node_spectra_runtime
node_spectra_runtime -->|"opens and manages"| node_openspec_project
node_spectra_runtime -->|"supports"| node_change_lifecycle
node_change_lifecycle -->|"tracks via"| node_task_progress
node_change_lifecycle -->|"reads and writes"| node_openspec_project
node_spectra_runtime -->|"provides"| node_search_rag
node_search_rag -->|"indexes"| node_openspec_project
node_spectra_runtime -->|"integrates with"| node_claude_code
node_spectra_runtime -->|"manages"| node_git_worktrees
node_git_worktrees -->|"isolates work for"| node_openspec_project
node_spectra_runtime -->|"parks and unparks"| node_parked_state
node_parked_state -.->|"shelves"| node_openspec_project

click node_release_225 "https://github.com/kaochenlong/spectra-app/tree/main/releases/2.2.5"
click node_release_230 "https://github.com/kaochenlong/spectra-app/tree/main/releases/2.3.0"
click node_release_231 "https://github.com/kaochenlong/spectra-app/tree/main/releases/2.3.1"
click node_mac_arm_installer "https://github.com/kaochenlong/spectra-app/blob/main/releases/2.3.1/Spectra_2.3.1_aarch64.dmg"
click node_mac_x64_installer "https://github.com/kaochenlong/spectra-app/blob/main/releases/2.3.1/Spectra_2.3.1_x64.dmg"
click node_windows_installer "https://github.com/kaochenlong/spectra-app/blob/main/releases/2.3.1/Spectra_2.3.1_x64-setup.exe"
click node_issue_templates "https://github.com/kaochenlong/spectra-app/tree/main/.github/ISSUE_TEMPLATE"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_release_225,node_release_230,node_release_231,node_mac_arm_installer,node_mac_x64_installer,node_windows_installer,node_issue_templates toneBlue
class node_spectra_runtime,node_change_lifecycle,node_task_progress,node_search_rag toneAmber
class node_openspec_project,node_claude_code,node_git_worktrees,node_parked_state toneMint
```

## Components

### Distribution

Versioned installer artifacts.

- [Release 2.2.5](https://github.com/kaochenlong/spectra-app/tree/main/releases/2.2.5): release folder · Historical macOS and Windows packages. · `releases/2.2.5`
- [Release 2.3.0](https://github.com/kaochenlong/spectra-app/tree/main/releases/2.3.0): release folder · Historical macOS and Windows packages. · `releases/2.3.0`
- [Release 2.3.1](https://github.com/kaochenlong/spectra-app/tree/main/releases/2.3.1): release folder · Current packaged distribution. · `releases/2.3.1`
- [macOS ARM64 installer](https://github.com/kaochenlong/spectra-app/blob/main/releases/2.3.1/Spectra_2.3.1_aarch64.dmg): DMG · `releases/2.3.1/Spectra_2.3.1_aarch64.dmg`
- [macOS x64 installer](https://github.com/kaochenlong/spectra-app/blob/main/releases/2.3.1/Spectra_2.3.1_x64.dmg): DMG · `releases/2.3.1/Spectra_2.3.1_x64.dmg`
- [Windows x64 installer](https://github.com/kaochenlong/spectra-app/blob/main/releases/2.3.1/Spectra_2.3.1_x64-setup.exe): EXE · `releases/2.3.1/Spectra_2.3.1_x64-setup.exe`
- [Issue templates](https://github.com/kaochenlong/spectra-app/tree/main/.github/ISSUE_TEMPLATE): feedback channel · `.github/ISSUE_TEMPLATE`

### OpenSpec Workflow

Runtime behavior represented without source code.

- **Spectra runtime**: bundled desktop app · GUI and optional CLI are encapsulated in installers.
- **Change lifecycle**: workflow · Creates and archives proposals, designs, specs, and tasks.
- **Task progress**: Markdown checklist parser · Parses task checklists to track work.
- **Search and RAG**: knowledge retrieval · Indexes OpenSpec content for multilingual search and questions.

### External Boundaries

User project and external tooling boundaries.

- **OpenSpec project**: durable project data · Markdown/YAML specs and change documents in openspec/.
- **Claude Code**: external AI tool · Skills, slash commands, and optional parallel subagents.
- **Git worktrees**: Git integration · Isolated worktrees and spx/<change-name> branches.
- **Parked specs**: workflow state · Optional CLI shelves in-progress specs outside the Git worktree.

## Connections

- Release 2.3.1 → macOS ARM64 installer: ships
- Release 2.3.1 → macOS x64 installer: ships
- Release 2.3.1 → Windows x64 installer: ships
- macOS ARM64 installer → Spectra runtime: installs
- macOS x64 installer → Spectra runtime: installs
- Windows x64 installer → Spectra runtime: installs
- Spectra runtime → OpenSpec project: opens and manages
- Spectra runtime → Change lifecycle: supports
- Change lifecycle → Task progress: tracks via
- Change lifecycle → OpenSpec project: reads and writes
- Spectra runtime → Search and RAG: provides
- Search and RAG → OpenSpec project: indexes
- Spectra runtime → Claude Code: integrates with
- Spectra runtime → Git worktrees: manages
- Git worktrees → OpenSpec project: isolates work for
- Spectra runtime → Parked specs: parks and unparks
- Parked specs → OpenSpec project: shelves
