feat: implement tool workshop - comprehensive tool system enhancement
- Add Docker Compose and Dockerfile support for tool definitions - Implement readiness probes with configurable command, timeout, interval - Create ConfigFolder model for reusable file collections with project overrides - Add rich tool config fields: port_override, start_command, working_directory, env vars, volumes - Build unified Tool Workshop UI at /tool-workshop replacing /tool-configs and /tool-types - Update instance creation to support dockerfile builds, config folder mounting, readiness probes - Add 3 database migrations for tool_types, tool_configs, and new config_folders table - Create docker_build.py and readiness_probe.py services - Add config_folders API with CRUD and project override endpoints Quality gates: frontend build passes, Python syntax valid, all phases complete Addresses tool-workshop OpenSpec change
This commit is contained in:
@@ -0,0 +1,379 @@
|
||||
## Context
|
||||
|
||||
The tool system currently supports:
|
||||
- ToolTypes with compose templates and basic metadata
|
||||
- ToolConfigs as simple key-value pairs (env vars or files)
|
||||
- Instance creation via compose rendering
|
||||
- Basic flat-list UI at `/tool-configs`
|
||||
|
||||
Users need a much richer system for defining, configuring, and running development tools.
|
||||
|
||||
## Goals / Non-Goals
|
||||
|
||||
**Goals:**
|
||||
- Support both Docker Compose and Dockerfile for tool definitions
|
||||
- Add readiness probes with configurable commands and timeouts
|
||||
- Create reusable config file collections ("folders") mountable as volumes
|
||||
- Add rich tool config fields (port, start_command, working_directory, volumes, env vars)
|
||||
- Build a unified "Tool Workshop" UI for all tool management
|
||||
- Support per-project overrides on config folders
|
||||
- Maintain backward compatibility with existing built-in tool types
|
||||
|
||||
**Non-Goals:**
|
||||
- Docker image registry management (assume local builds or public images)
|
||||
- Real-time collaborative tool editing
|
||||
- Tool marketplace/sharing between users
|
||||
- Advanced orchestration (Kubernetes, Swarm)
|
||||
- Config folder versioning/Git integration
|
||||
|
||||
## Architecture
|
||||
|
||||
### Data Model
|
||||
|
||||
```
|
||||
┌─────────────────────────────────────────────────────────────────┐
|
||||
│ TOOL WORKSHOP │
|
||||
├─────────────────────────────────────────────────────────────────┤
|
||||
│ │
|
||||
│ ┌──────────────┐ ┌──────────────┐ ┌──────────────┐ │
|
||||
│ │ ToolType │────▶│ ToolConfig │◀────│ ConfigFolder │ │
|
||||
│ │ (Blueprint) │ │ (Settings) │ │ (Files) │ │
|
||||
│ └──────────────┘ └──────────────┘ └──────────────┘ │
|
||||
│ │ │ │ │
|
||||
│ │ │ │ │
|
||||
│ ▼ ▼ ▼ │
|
||||
│ ┌──────────────────────────────────────────────────────┐ │
|
||||
│ │ ToolInstance │ │
|
||||
│ │ (Runtime + Volumes) │ │
|
||||
│ └──────────────────────────────────────────────────────┘ │
|
||||
│ │
|
||||
└─────────────────────────────────────────────────────────────────┘
|
||||
```
|
||||
|
||||
### ToolType Model
|
||||
|
||||
```python
|
||||
class ToolType:
|
||||
# Existing fields
|
||||
name: str # unique identifier
|
||||
display_name: str
|
||||
description: str | None
|
||||
category: str
|
||||
interfaces: list[str] # ["web", "terminal"]
|
||||
default_port: int
|
||||
required_variables: list[str]
|
||||
is_builtin: bool
|
||||
|
||||
# New fields
|
||||
definition_type: str # "compose" | "dockerfile"
|
||||
compose_template: str | None # YAML template (if definition_type == "compose")
|
||||
dockerfile_template: str | None # Dockerfile content (if definition_type == "dockerfile")
|
||||
build_context: dict | None # {"files": {"path": "content"}} for dockerfile builds
|
||||
readiness_probe: dict | None # {"command": "...", "timeout": 30, "interval": 2}
|
||||
```
|
||||
|
||||
**Decision**: Store both compose and dockerfile, use `definition_type` to determine which to use. This allows easy switching and migration.
|
||||
|
||||
### ToolConfig Model
|
||||
|
||||
```python
|
||||
class ToolConfig:
|
||||
# Existing fields
|
||||
user_id: UUID
|
||||
tool_type_id: UUID
|
||||
project_id: UUID | None # null = global config
|
||||
key: str
|
||||
value: str
|
||||
config_type: str # "env" | "file"
|
||||
file_path: str | None
|
||||
|
||||
# New fields
|
||||
port_override: int | None # Override tool type default port
|
||||
start_command: str | None # Override container start command
|
||||
working_directory: str | None # Working directory inside container
|
||||
environment_variables: dict | None # JSON {"KEY": "value", ...}
|
||||
volumes: list[dict] | None # JSON [{"source": "...", "target": "...", "type": "..."}]
|
||||
```
|
||||
|
||||
**Decision**: Store env vars and volumes as JSONB for flexibility. Port as integer with validation.
|
||||
|
||||
### ConfigFolder Model (NEW)
|
||||
|
||||
```python
|
||||
class ConfigFolder:
|
||||
id: UUID
|
||||
user_id: UUID
|
||||
name: str # e.g., "my-dotfiles", "vscode-settings"
|
||||
description: str | None
|
||||
mount_path: str # Default mount path in container (e.g., "/home/user/.config")
|
||||
files: dict # JSON {"relative/path": "content", ...}
|
||||
project_overrides: dict | None # JSON {project_id: {"mount_path": "...", "files": {...}}}
|
||||
is_active: bool # Quick toggle
|
||||
created_at, updated_at
|
||||
```
|
||||
|
||||
**Decision**: Files stored as JSONB with relative paths as keys. This is simple and sufficient for config files (not binary assets).
|
||||
|
||||
### Volume Mount Resolution
|
||||
|
||||
When creating an instance, volumes are resolved in this priority order:
|
||||
|
||||
```
|
||||
1. ToolConfig.volumes (explicit per-config mounts)
|
||||
2. ConfigFolder mounts (user's active config folders)
|
||||
3. ToolType default volumes (from compose/dockerfile)
|
||||
```
|
||||
|
||||
Config folder files are written to the instance directory under `volumes/<folder_name>/` and mounted from there.
|
||||
|
||||
### Readiness Probe System
|
||||
|
||||
```python
|
||||
class ReadinessProbe:
|
||||
command: str # e.g., "curl -f http://localhost:8080/health"
|
||||
timeout: int # seconds (default: 30)
|
||||
interval: int # seconds between checks (default: 2)
|
||||
retries: int # max attempts (default: timeout/interval)
|
||||
```
|
||||
|
||||
**Execution Flow**:
|
||||
1. Start container
|
||||
2. Wait for container to be running
|
||||
3. Execute probe command inside container via `docker exec`
|
||||
4. If success → mark instance as "running"
|
||||
5. If timeout → mark instance as "failed" with probe output in logs
|
||||
|
||||
**Decision**: Probes run inside the container using `docker exec`. This works for both network-based probes (curl) and command-based probes (binary version checks).
|
||||
|
||||
### Instance Creation Flow
|
||||
|
||||
```
|
||||
1. Generate instance ID and directory
|
||||
2. Resolve ToolConfig (global + project-specific)
|
||||
3. Write config files:
|
||||
a. .env file (from env-type ToolConfigs)
|
||||
b. Config files (from file-type ToolConfigs)
|
||||
c. Config folder files (to volumes/<folder>/)
|
||||
4. IF ToolType.definition_type == "dockerfile":
|
||||
a. Write Dockerfile + build context files
|
||||
b. Build image: docker build -t <instance_tag> .
|
||||
c. Generate compose from template using built image
|
||||
5. IF ToolType.definition_type == "compose":
|
||||
a. Render compose template with variables
|
||||
6. Write docker-compose.yml
|
||||
7. docker compose up -d
|
||||
8. Connect to backend network
|
||||
9. IF readiness_probe defined:
|
||||
a. Execute probe with timeout
|
||||
b. Update status based on result
|
||||
10. IF web interface:
|
||||
a. Create Cloudflare tunnel
|
||||
b. Update URL
|
||||
```
|
||||
|
||||
## UI Design
|
||||
|
||||
### Tool Workshop Page (`/tool-workshop`)
|
||||
|
||||
```
|
||||
┌─────────────────────────────────────────────────────────────────┐
|
||||
│ Tool Workshop [+ New] │
|
||||
├─────────────────────────────────────────────────────────────────┤
|
||||
│ │
|
||||
│ ┌──────────────┐ ┌──────────────────────────────────────┐ │
|
||||
│ │ │ │ │ │
|
||||
│ │ MY TOOLS │ │ [Tool Type Builder] │ │
|
||||
│ │ │ │ │ │
|
||||
│ │ ▼ Code Editor│ │ Name: [____________] │ │
|
||||
│ │ □ VS Code │ │ Type: (•) Compose ( ) Dockerfile │ │
|
||||
│ │ □ Cursor │ │ │ │
|
||||
│ │ │ │ [Compose Template / Dockerfile] │ │
|
||||
│ │ ▼ AI Tools │ │ ┌────────────────────────────────┐ │ │
|
||||
│ │ □ OpenCode │ │ │ version: '3.8' │ │ │
|
||||
│ │ □ Continue │ │ │ services: │ │ │
|
||||
│ │ │ │ │ app: │ │ │
|
||||
│ │ CONFIGS │ │ │ image: ... │ │ │
|
||||
│ │ │ │ │ ports: │ │ │
|
||||
│ │ ▼ Global │ │ │ - "{{PORT}}:8080" │ │ │
|
||||
│ │ □ dotfiles │ │ │ volumes: │ │ │
|
||||
│ │ □ api-keys │ │ │ - ... │ │ │
|
||||
│ │ │ │ └────────────────────────────────┘ │ │
|
||||
│ │ ▼ Project X │ │ │ │
|
||||
│ │ □ overrides│ │ Readiness Probe: │ │
|
||||
│ │ │ │ Command: [curl -f localhost:8080] │ │
|
||||
│ │ │ │ Timeout: [30] seconds │ │
|
||||
│ │ │ │ │ │
|
||||
│ │ │ │ [Save Tool Type] │ │
|
||||
│ │ │ │ │ │
|
||||
│ └──────────────┘ └──────────────────────────────────────┘ │
|
||||
│ │
|
||||
│ Tabs: [Tool Types] [Configs] [Config Folders] │
|
||||
│ │
|
||||
└─────────────────────────────────────────────────────────────────┘
|
||||
```
|
||||
|
||||
**Navigation Structure**:
|
||||
- Left sidebar: Hierarchical tree
|
||||
- Tool Types (expandable, shows instances count)
|
||||
- Config Folders (grouped by global/project)
|
||||
- Right panel: Context-aware editor based on selection
|
||||
- Tab bar: Switch between Tool Types / Configs / Config Folders views
|
||||
|
||||
### Config Editor
|
||||
|
||||
```
|
||||
┌─────────────────────────────────────────────────────────────────┐
|
||||
│ Edit Config: OpenCode API Keys │
|
||||
├─────────────────────────────────────────────────────────────────┤
|
||||
│ │
|
||||
│ Basic Settings │ Advanced Settings │
|
||||
│ ────────────────────────────┼──────────────────────────────── │
|
||||
│ Key: [OPENAI_API_KEY] │ Port Override: [_____] │
|
||||
│ Value: [sk-... ] │ Start Command: [_____] │
|
||||
│ Type: (•) Env ( ) File │ Working Dir: [/workspace] │
|
||||
│ File Path: [__________] │ │
|
||||
│ │ Environment Variables: │
|
||||
│ │ ┌──────────────────────────┐ │
|
||||
│ │ │ KEY │ VALUE │ │
|
||||
│ │ │ OPENAI_KEY │ sk-... │ │
|
||||
│ │ │ MODEL │ gpt-4 │ │
|
||||
│ │ └──────────────────────────┘ │
|
||||
│ │ │
|
||||
│ │ Volume Mounts: │
|
||||
│ │ ┌──────────────────────────┐ │
|
||||
│ │ │ SOURCE │ TARGET │ │
|
||||
│ │ │ dotfiles │ ~/.config │ │
|
||||
│ │ │ vscode-set │ ~/.vscode │ │
|
||||
│ │ └──────────────────────────┘ │
|
||||
│ │ │
|
||||
│ [Delete] [Cancel] [Save] │ │
|
||||
│ │
|
||||
└─────────────────────────────────────────────────────────────────┘
|
||||
```
|
||||
|
||||
### Config Folder Manager
|
||||
|
||||
```
|
||||
┌─────────────────────────────────────────────────────────────────┐
|
||||
│ Config Folder: my-dotfiles │
|
||||
├─────────────────────────────────────────────────────────────────┤
|
||||
│ │
|
||||
│ Name: [my-dotfiles] │
|
||||
│ Description: [My personal dotfiles] │
|
||||
│ Default Mount Path: [/home/user] │
|
||||
│ │
|
||||
│ Files: │
|
||||
│ ┌──────────────────────────────────────────────────────┐ │
|
||||
│ │ Path │ Size │ Actions │ │
|
||||
│ │ .zshrc │ 2.1KB │ [Edit] [Delete] │ │
|
||||
│ │ .gitconfig │ 412B │ [Edit] [Delete] │ │
|
||||
│ │ .config/starship.toml │ 1.8KB │ [Edit] [Delete] │ │
|
||||
│ └──────────────────────────────────────────────────────┘ │
|
||||
│ │
|
||||
│ [+ Add File] │
|
||||
│ │
|
||||
│ Project Overrides: │
|
||||
│ ┌──────────────────────────────────────────────────────┐ │
|
||||
│ │ Project │ Mount Path │ Files Override │ │
|
||||
│ │ Project Alpha │ /home/dev │ [3 files] │ │
|
||||
│ │ Project Beta │ /workspace │ [1 file] │ │
|
||||
│ └──────────────────────────────────────────────────────┘ │
|
||||
│ │
|
||||
│ [Add Override] [Delete Folder] [Save] │
|
||||
│ │
|
||||
└─────────────────────────────────────────────────────────────────┘
|
||||
```
|
||||
|
||||
## Decisions
|
||||
|
||||
1. **Dockerfile vs Compose**: Support both. `definition_type` field determines which path to use. Compose is the default for backward compatibility.
|
||||
|
||||
2. **Config Folder Storage**: Store files as JSONB keyed by relative path. This avoids file system complexity and works well for text-based config files. Limit: 10MB per folder.
|
||||
|
||||
3. **Readiness Probe Execution**: Use `docker exec` to run commands inside the container. This is the most flexible approach (works for HTTP checks, binary checks, file checks).
|
||||
|
||||
4. **Volume Resolution Order**: Config-level volumes override config-folder volumes, which override tool-type defaults. Last-write-wins for conflicts.
|
||||
|
||||
5. **UI Organization**: Single page with three tabs (Tool Types, Configs, Config Folders) and a left sidebar for navigation. This consolidates the current `/tool-configs` and `/tool-types` pages.
|
||||
|
||||
6. **Project Overrides**: ConfigFolders support per-project overrides for mount_path and files. This allows project-specific customizations while keeping the base collection reusable.
|
||||
|
||||
## Risks / Trade-offs
|
||||
|
||||
- **Dockerfile build times**: Building images on-demand is slow. Mitigation: Document that users should use pre-built images in compose for faster startup; dockerfile is for custom tools.
|
||||
- **Config folder size limits**: JSONB has practical limits. Mitigation: 10MB limit per folder, enforced in API.
|
||||
- **Readiness probe complexity**: Commands might hang or fail in unexpected ways. Mitigation: Strict timeout, clear error messages, probe logs stored on instance.
|
||||
- **Migration complexity**: Existing tool types need `definition_type` set to "compose". Mitigation: Database default, seed function update.
|
||||
- **UI complexity**: Three tabs with different editors could feel overwhelming. Mitigation: Progressive disclosure (hide advanced fields, collapsible sections).
|
||||
|
||||
## API Endpoints
|
||||
|
||||
### Tool Types
|
||||
- `GET /tool-types` - List all (existing)
|
||||
- `POST /tool-types` - Create with new fields
|
||||
- `PUT /tool-types/{id}` - Update with new fields
|
||||
- `GET /tool-types/{id}/validate` - Validate compose/dockerfile syntax
|
||||
|
||||
### Tool Configs
|
||||
- `GET /tool-configs` - List with new fields
|
||||
- `POST /tool-configs` - Create with new fields
|
||||
- `PUT /tool-configs/{id}` - Update with new fields
|
||||
- `GET /tool-configs/defaults/{tool_type_id}` - Get suggested defaults
|
||||
|
||||
### Config Folders (NEW)
|
||||
- `GET /config-folders` - List user's folders
|
||||
- `POST /config-folders` - Create folder
|
||||
- `PUT /config-folders/{id}` - Update folder (files, mount_path)
|
||||
- `DELETE /config-folders/{id}` - Delete folder
|
||||
- `POST /config-folders/{id}/overrides` - Add project override
|
||||
- `PUT /config-folders/{id}/overrides/{project_id}` - Update override
|
||||
- `DELETE /config-folders/{id}/overrides/{project_id}` - Remove override
|
||||
|
||||
## Database Schema
|
||||
|
||||
### Migration: tool_types
|
||||
```sql
|
||||
ALTER TABLE tool_types
|
||||
ADD COLUMN definition_type VARCHAR(20) NOT NULL DEFAULT 'compose',
|
||||
ADD COLUMN dockerfile_template TEXT,
|
||||
ADD COLUMN build_context JSONB DEFAULT '{}',
|
||||
ADD COLUMN readiness_probe JSONB;
|
||||
|
||||
-- Ensure consistency
|
||||
ALTER TABLE tool_types
|
||||
ADD CONSTRAINT chk_definition_type
|
||||
CHECK (definition_type IN ('compose', 'dockerfile'));
|
||||
```
|
||||
|
||||
### Migration: tool_configs
|
||||
```sql
|
||||
ALTER TABLE tool_configs
|
||||
ADD COLUMN port_override INTEGER,
|
||||
ADD COLUMN start_command TEXT,
|
||||
ADD COLUMN working_directory TEXT,
|
||||
ADD COLUMN environment_variables JSONB DEFAULT '{}',
|
||||
ADD COLUMN volumes JSONB DEFAULT '[]';
|
||||
|
||||
ALTER TABLE tool_configs
|
||||
ADD CONSTRAINT chk_port_range
|
||||
CHECK (port_override IS NULL OR (port_override >= 1 AND port_override <= 65535));
|
||||
```
|
||||
|
||||
### New Table: config_folders
|
||||
```sql
|
||||
CREATE TABLE config_folders (
|
||||
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
|
||||
user_id UUID NOT NULL REFERENCES users(id) ON DELETE CASCADE,
|
||||
name VARCHAR(255) NOT NULL,
|
||||
description TEXT,
|
||||
mount_path VARCHAR(1024) NOT NULL,
|
||||
files JSONB NOT NULL DEFAULT '{}',
|
||||
project_overrides JSONB DEFAULT '{}',
|
||||
is_active BOOLEAN NOT NULL DEFAULT true,
|
||||
created_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),
|
||||
updated_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),
|
||||
UNIQUE(user_id, name)
|
||||
);
|
||||
|
||||
CREATE INDEX idx_config_folders_user ON config_folders(user_id);
|
||||
```
|
||||
@@ -0,0 +1,57 @@
|
||||
## Why
|
||||
|
||||
The current tool system is too rigid. Tool types are hardcoded with compose templates, configs are simple key-value pairs, and the UI is a basic flat list. Users need a true "tool workshop" where they can:
|
||||
|
||||
1. **Define new tools** with either Docker Compose or Dockerfile
|
||||
2. **Configure rich tool settings** including ports, commands, working directories, and volume mounts
|
||||
3. **Create reusable config file collections** (e.g., dotfiles, IDE settings) that mount into containers
|
||||
4. **Wait for tools to be ready** with configurable health/readiness probes before considering the build complete
|
||||
|
||||
This unlocks the platform from built-in tools to a true marketplace of user-defined and user-configured tools.
|
||||
|
||||
## What Changes
|
||||
|
||||
- **Enhance ToolType model**: Add `dockerfile_template`, `readiness_probe` (command + timeout), `build_context` field
|
||||
- **Enhance ToolConfig model**: Add `port_override`, `start_command`, `working_directory`, `environment_variables`, `volumes`
|
||||
- **Create ConfigFolder model**: Named collections of files mountable as volumes, with per-project overrides
|
||||
- **Add readiness probe system**: Instance creation waits for probe command with configurable timeout
|
||||
- **Unified Tool Workshop UI**: Single page replacing `/tool-configs` and `/tool-types` with:
|
||||
- Tool Type builder (compose or dockerfile)
|
||||
- Tool Config editor (split-pane with all new fields)
|
||||
- Config Folder manager (file collections with mount paths)
|
||||
- Live validation and preview
|
||||
- **Update instance creation flow**: Support dockerfile builds, mount config folders, apply readiness probes
|
||||
- **Database migrations**: New columns on `tool_types`, `tool_configs`; new `config_folders` table
|
||||
|
||||
## Capabilities
|
||||
|
||||
### New Capabilities
|
||||
- `tool-workshop`: Unified tool definition, configuration, and deployment interface
|
||||
- `config-folders`: Reusable per-user file collections mountable into containers with per-project overrides
|
||||
- `readiness-probes`: Build-time health checks that wait for tools to be ready before marking instances as running
|
||||
|
||||
### Modified Capabilities
|
||||
- `tool-types`: Enhanced with dockerfile support, readiness probes, build context
|
||||
- `tool-config-management`: Extended with port overrides, volumes, environment variables, working directory
|
||||
- `tool-instances`: Instance creation supports dockerfile builds, config folder mounts, probe waiting
|
||||
|
||||
## Impact
|
||||
|
||||
- **Backend**:
|
||||
- Models: `ToolType`, `ToolConfig`, new `ConfigFolder`
|
||||
- API: New endpoints for config folders, updated tool type/config endpoints
|
||||
- Services: Docker build service (for dockerfiles), readiness probe service
|
||||
- Instance creation: Dockerfile build path, volume mounting, probe execution
|
||||
- **Frontend**:
|
||||
- New `ToolWorkshopPage` component (replaces `/tool-configs` and `/tool-types`)
|
||||
- New components: Dockerfile editor, readiness probe config, config folder manager, volume mount editor
|
||||
- Updated routing and navigation
|
||||
- **Database**:
|
||||
- `tool_types`: Add `dockerfile_template`, `readiness_probe`, `build_context`
|
||||
- `tool_configs`: Add `port_override`, `start_command`, `working_directory`, `environment_variables`, `volumes`
|
||||
- New `config_folders` table
|
||||
- **User Experience**: Users can now define entirely new tools, configure them richly, and reuse config collections across projects
|
||||
|
||||
## Supersedes
|
||||
|
||||
This change supersedes `tool-config-ui-rework` which scoped only to the UI rework and basic new fields. This is a comprehensive expansion of the tool system.
|
||||
@@ -0,0 +1,113 @@
|
||||
# Capability: Config Folders
|
||||
|
||||
## Overview
|
||||
|
||||
Config Folders are reusable collections of configuration files that can be mounted into tool instances as volumes. They enable users to maintain their preferred settings (dotfiles, IDE configs, etc.) and apply them across all their tool instances.
|
||||
|
||||
## Functional Requirements
|
||||
|
||||
### FR-1: Folder Creation
|
||||
- Users can create named config folders
|
||||
- Each folder has: name, description, default mount path, collection of files
|
||||
- Folder names must be unique per user
|
||||
- Files are stored with relative paths (e.g., `.zshrc`, `.config/nvim/init.vim`)
|
||||
|
||||
### FR-2: File Management
|
||||
- Users can add, edit, and delete files within a folder
|
||||
- File paths are relative to the mount path
|
||||
- File content is stored as text (UTF-8)
|
||||
- Maximum total folder size: 10MB
|
||||
- File paths are sanitized to prevent directory traversal attacks
|
||||
|
||||
### FR-3: Activation
|
||||
- Folders can be toggled active/inactive
|
||||
- Only active folders are mounted into new instances
|
||||
- Activation state is persisted
|
||||
- Changing activation does not affect running instances
|
||||
|
||||
### FR-4: Project Overrides
|
||||
- Users can define per-project overrides for any folder
|
||||
- Overrides can modify: mount path, add/remove/replace files
|
||||
- When an instance is created for a project, overrides are applied
|
||||
- Global settings serve as defaults; overrides are merged
|
||||
- Deleting an override reverts to global settings
|
||||
|
||||
### FR-5: Instance Mounting
|
||||
- When creating an instance, active folders are resolved
|
||||
- For each folder: global files + project overrides (if any)
|
||||
- Files are written to `instance_dir/volumes/<folder_name>/`
|
||||
- Compose file includes volume mounts from these directories
|
||||
- Mount target is the folder's mount path (or override)
|
||||
|
||||
## Data Model
|
||||
|
||||
```python
|
||||
class ConfigFolder:
|
||||
id: UUID
|
||||
user_id: UUID
|
||||
name: str # Unique per user
|
||||
description: str | None
|
||||
mount_path: str # e.g., "/home/user"
|
||||
files: dict[str, str] # {"relative/path": "content", ...}
|
||||
project_overrides: dict # {"project_id": {"mount_path": "...", "files": {...}}}
|
||||
is_active: bool
|
||||
created_at: datetime
|
||||
updated_at: datetime
|
||||
```
|
||||
|
||||
## API Endpoints
|
||||
|
||||
- `GET /config-folders` - List user's folders
|
||||
- `POST /config-folders` - Create folder
|
||||
- `PUT /config-folders/{id}` - Update folder
|
||||
- `DELETE /config-folders/{id}` - Delete folder
|
||||
- `POST /config-folders/{id}/overrides` - Add override
|
||||
- `PUT /config-folders/{id}/overrides/{project_id}` - Update override
|
||||
- `DELETE /config-folders/{id}/overrides/{project_id}` - Remove override
|
||||
|
||||
## Validation Rules
|
||||
|
||||
1. **Name uniqueness**: `(user_id, name)` must be unique
|
||||
2. **Path sanitization**: File paths cannot contain `..` or start with `/`
|
||||
3. **Size limit**: Total folder size (sum of all file contents) ≤ 10MB
|
||||
4. **Mount path**: Must be absolute path (starts with `/`)
|
||||
5. **Project existence**: Overrides can only reference existing projects
|
||||
|
||||
## Example Usage
|
||||
|
||||
### Global Config Folder
|
||||
```json
|
||||
{
|
||||
"name": "my-dotfiles",
|
||||
"description": "Personal shell and git configuration",
|
||||
"mount_path": "/home/user",
|
||||
"files": {
|
||||
".zshrc": "export ZSH=\"$HOME/.oh-my-zsh\"\n...",
|
||||
".gitconfig": "[user]\nname = John Doe\n...",
|
||||
".config/starship.toml": "[character]\n..."
|
||||
},
|
||||
"is_active": true
|
||||
}
|
||||
```
|
||||
|
||||
### Project Override
|
||||
```json
|
||||
{
|
||||
"project_id": "550e8400-e29b-41d4-a716-446655440000",
|
||||
"mount_path": "/workspace",
|
||||
"files": {
|
||||
".gitconfig": "[user]\nname = Work Account\n..."
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Acceptance Criteria
|
||||
|
||||
- [ ] User can create a config folder with multiple files
|
||||
- [ ] Files are correctly mounted into new instances
|
||||
- [ ] Project overrides apply correctly
|
||||
- [ ] 10MB size limit is enforced
|
||||
- [ ] Path traversal attacks are prevented
|
||||
- [ ] Only active folders are mounted
|
||||
- [ ] Changing folder contents updates future instances
|
||||
- [ ] UI shows folder size and file count
|
||||
@@ -0,0 +1,163 @@
|
||||
# Capability: Readiness Probes
|
||||
|
||||
## Overview
|
||||
|
||||
Readiness probes ensure tool instances are fully initialized before being marked as "running". They execute a configurable command inside the container and wait for it to succeed, with configurable timeout and retry interval.
|
||||
|
||||
## Functional Requirements
|
||||
|
||||
### FR-1: Probe Definition
|
||||
- Tool types can define an optional readiness probe
|
||||
- Probe configuration: command, timeout, interval, retries
|
||||
- If no probe is defined, instance is marked running immediately after container start
|
||||
- Probe can be any shell command that returns exit code 0 for success
|
||||
|
||||
### FR-2: Probe Execution
|
||||
- Probe runs inside the container via `docker exec`
|
||||
- Probe starts after container is in "running" state
|
||||
- Probe executes periodically (interval) until success or timeout
|
||||
- Each execution has a separate timeout (not the total timeout)
|
||||
- Probe output is captured and stored
|
||||
|
||||
### FR-3: Status Management
|
||||
- While probing: instance status is "starting"
|
||||
- On success: instance status changes to "running"
|
||||
- On timeout: instance status changes to "failed"
|
||||
- Failed instances include probe logs in error details
|
||||
- Users can view probe execution history
|
||||
|
||||
### FR-4: Probe Types
|
||||
Support common probe patterns:
|
||||
- **HTTP probe**: `curl -f http://localhost:8080/health`
|
||||
- **Command probe**: `opencode --version`
|
||||
- **File probe**: `[ -f /app/ready ]`
|
||||
- **Port probe**: `nc -z localhost 8080`
|
||||
|
||||
## Configuration
|
||||
|
||||
```python
|
||||
class ReadinessProbe(BaseModel):
|
||||
command: str # Command to execute
|
||||
timeout: int = 30 # Total timeout in seconds
|
||||
interval: int = 2 # Seconds between checks
|
||||
|
||||
@property
|
||||
def max_retries(self) -> int:
|
||||
return self.timeout // self.interval
|
||||
```
|
||||
|
||||
## Execution Flow
|
||||
|
||||
```
|
||||
Container Start
|
||||
│
|
||||
▼
|
||||
Container Running?
|
||||
│
|
||||
├── No ──▶ Wait 1s ──▶ Retry (max 30s)
|
||||
│
|
||||
▼ Yes
|
||||
Execute Probe Command
|
||||
│
|
||||
├── Exit 0 ──▶ Status: "running" ✓
|
||||
│
|
||||
├── Exit !=0 ──▶ Wait interval ──▶ Retry
|
||||
│ │
|
||||
│ └── Max retries reached?
|
||||
│ ├── No ──▶ Execute again
|
||||
│ │
|
||||
│ ▼ Yes
|
||||
│ Status: "failed" ✗
|
||||
│ Store logs
|
||||
│
|
||||
└── Timeout ──▶ Status: "failed" ✗
|
||||
Store logs
|
||||
```
|
||||
|
||||
## Probe Examples
|
||||
|
||||
### Web Tool (VS Code Server)
|
||||
```json
|
||||
{
|
||||
"command": "curl -sf http://localhost:8080/health || curl -sf http://localhost:8080",
|
||||
"timeout": 60,
|
||||
"interval": 3
|
||||
}
|
||||
```
|
||||
|
||||
### Terminal Tool (OpenCode)
|
||||
```json
|
||||
{
|
||||
"command": "which opencode && opencode --version",
|
||||
"timeout": 30,
|
||||
"interval": 2
|
||||
}
|
||||
```
|
||||
|
||||
### Database Tool
|
||||
```json
|
||||
{
|
||||
"command": "pg_isready -U postgres",
|
||||
"timeout": 30,
|
||||
"interval": 2
|
||||
}
|
||||
```
|
||||
|
||||
## Error Handling
|
||||
|
||||
### Probe Command Not Found
|
||||
- Exit code: 127
|
||||
- Behavior: Retry (command might not be in PATH yet)
|
||||
- Log: "Command not found, retrying..."
|
||||
|
||||
### Probe Times Out
|
||||
- Mark instance as "failed"
|
||||
- Store last probe output
|
||||
- Include timeout details in error message
|
||||
- Allow user to view full probe logs
|
||||
|
||||
### Container Exits During Probe
|
||||
- Stop probing immediately
|
||||
- Mark instance as "failed"
|
||||
- Include container exit code and logs
|
||||
|
||||
## API Integration
|
||||
|
||||
### Tool Type Response
|
||||
```json
|
||||
{
|
||||
"id": "...",
|
||||
"name": "code-server",
|
||||
"readiness_probe": {
|
||||
"command": "curl -sf http://localhost:8080",
|
||||
"timeout": 60,
|
||||
"interval": 3
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Instance Response (Failed Probe)
|
||||
```json
|
||||
{
|
||||
"id": "...",
|
||||
"status": "failed",
|
||||
"error": "Readiness probe failed after 60s",
|
||||
"probe_logs": [
|
||||
"Attempt 1/20: Connection refused",
|
||||
"Attempt 2/20: Connection refused",
|
||||
"...",
|
||||
"Attempt 20/20: Timeout"
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
## Acceptance Criteria
|
||||
|
||||
- [ ] Probe executes inside container and waits for success
|
||||
- [ ] Successful probe marks instance as "running"
|
||||
- [ ] Failed probe (timeout) marks instance as "failed"
|
||||
- [ ] Probe logs are stored and retrievable
|
||||
- [ ] Probe respects timeout and interval settings
|
||||
- [ ] No probe defined = immediate "running" status
|
||||
- [ ] Container exit during probe is handled gracefully
|
||||
- [ ] Common probe patterns work (HTTP, command, file, port)
|
||||
@@ -0,0 +1,96 @@
|
||||
# Capability: Tool Workshop
|
||||
|
||||
## Overview
|
||||
|
||||
The Tool Workshop is the unified interface for defining, configuring, and managing development tools. It consolidates tool type management, tool configuration, and config folder management into a single powerful interface.
|
||||
|
||||
## Functional Requirements
|
||||
|
||||
### FR-1: Tool Type Definition
|
||||
- Users can create new tool types with either Docker Compose or Dockerfile
|
||||
- Tool types specify: name, display name, description, category, interfaces, port, definition type, template
|
||||
- Built-in tool types can be viewed but not edited
|
||||
- Tool types can be deleted (with cascade deletion of associated configs)
|
||||
|
||||
### FR-2: Tool Configuration
|
||||
- Users can create tool configurations per tool type
|
||||
- Configs can be global (all projects) or project-scoped
|
||||
- Configs support: key-value pairs (env/file), port override, start command, working directory, environment variables, volumes
|
||||
- Configs are mounted into containers when instances are created
|
||||
|
||||
### FR-3: Config Folder Management
|
||||
- Users can create named collections of configuration files
|
||||
- Each folder has a default mount path in containers
|
||||
- Folders can be activated/deactivated
|
||||
- Folders support per-project overrides
|
||||
- Active folders are automatically mounted into new instances
|
||||
|
||||
### FR-4: Readiness Probes
|
||||
- Tool types can define a readiness probe command
|
||||
- Instance creation waits for the probe to succeed
|
||||
- Probes have configurable timeout and check interval
|
||||
- Failed probes mark instances as "failed" with logs
|
||||
|
||||
### FR-5: Instance Integration
|
||||
- Instance creation uses tool type definition (compose or dockerfile)
|
||||
- Instance creation applies tool configs (env vars, files, volumes)
|
||||
- Instance creation mounts active config folders
|
||||
- Instance creation executes readiness probe
|
||||
- Instance status reflects probe result
|
||||
|
||||
## Non-Functional Requirements
|
||||
|
||||
### NFR-1: Performance
|
||||
- Tool Workshop page loads in < 2 seconds
|
||||
- Config folder operations complete in < 500ms
|
||||
- Instance creation with dockerfile build completes in < 5 minutes
|
||||
|
||||
### NFR-2: Usability
|
||||
- UI is intuitive for both technical and non-technical users
|
||||
- Clear validation messages for all fields
|
||||
- Progressive disclosure of advanced options
|
||||
- Responsive design for mobile devices
|
||||
|
||||
### NFR-3: Security
|
||||
- Users can only access their own tool types, configs, and folders
|
||||
- File paths in config folders are sanitized (no path traversal)
|
||||
- Dockerfile builds run in isolated context
|
||||
- Config values are never logged or exposed
|
||||
|
||||
## State Diagram
|
||||
|
||||
```
|
||||
┌─────────────┐
|
||||
│ DRAFT │
|
||||
└──────┬──────┘
|
||||
│ Create
|
||||
▼
|
||||
┌─────────────┐ Edit ┌─────────────┐
|
||||
│ ACTIVE │◀────────────▶│ UPDATED │
|
||||
└──────┬──────┘ └─────────────┘
|
||||
│
|
||||
│ Delete
|
||||
▼
|
||||
┌─────────────┐
|
||||
│ DELETED │
|
||||
└─────────────┘
|
||||
```
|
||||
|
||||
## API Specification
|
||||
|
||||
See `design.md` for complete endpoint list.
|
||||
|
||||
## UI Specification
|
||||
|
||||
See `design.md` for complete UI mockups.
|
||||
|
||||
## Acceptance Criteria
|
||||
|
||||
- [ ] User can create a tool type with dockerfile and start an instance
|
||||
- [ ] User can create a tool type with compose and start an instance
|
||||
- [ ] User can create config folders and mount them into instances
|
||||
- [ ] User can set project overrides on config folders
|
||||
- [ ] Readiness probes wait for tools to be ready before marking running
|
||||
- [ ] Failed readiness probes show clear error messages
|
||||
- [ ] All new fields are persisted and retrieved correctly
|
||||
- [ ] UI is responsive and intuitive
|
||||
@@ -0,0 +1,204 @@
|
||||
## Phase 1: Backend Foundation
|
||||
|
||||
### 1.1 Database Migrations
|
||||
- [x] 1.1.1 Create Alembic migration for `tool_types` (add definition_type, dockerfile_template, build_context, readiness_probe)
|
||||
- [x] 1.1.2 Create Alembic migration for `tool_configs` (add port_override, start_command, working_directory, environment_variables, volumes)
|
||||
- [x] 1.1.3 Create Alembic migration for `config_folders` (new table)
|
||||
- [x] 1.1.4 Add CHECK constraints (definition_type enum, port range)
|
||||
- [x] 1.1.5 Add indexes for config_folders
|
||||
- [ ] 1.1.6 Run migrations locally and verify with test data
|
||||
|
||||
### 1.2 Model Updates
|
||||
- [x] 1.2.1 Update `ToolType` model with new fields
|
||||
- [x] 1.2.2 Update `ToolConfig` model with new fields
|
||||
- [x] 1.2.3 Create `ConfigFolder` model
|
||||
- [x] 1.2.4 Add Pydantic schemas for ConfigFolder (create, update, response)
|
||||
- [x] 1.2.5 Update Pydantic schemas for ToolType (add new fields)
|
||||
- [x] 1.2.6 Update Pydantic schemas for ToolConfig (add new fields)
|
||||
- [x] 1.2.7 Add validation schemas (port range, JSON structure, definition_type enum)
|
||||
|
||||
### 1.3 Config Folder API
|
||||
- [x] 1.3.1 Create `api/config_folders.py` router
|
||||
- [x] 1.3.2 Implement `GET /config-folders` (list with filtering by project)
|
||||
- [x] 1.3.3 Implement `POST /config-folders` (create)
|
||||
- [x] 1.3.4 Implement `PUT /config-folders/{id}` (update name, mount_path, files)
|
||||
- [x] 1.3.5 Implement `DELETE /config-folders/{id}` (delete)
|
||||
- [x] 1.3.6 Implement `POST /config-folders/{id}/overrides` (add project override)
|
||||
- [x] 1.3.7 Implement `PUT /config-folders/{id}/overrides/{project_id}` (update override)
|
||||
- [x] 1.3.8 Implement `DELETE /config-folders/{id}/overrides/{project_id}` (remove override)
|
||||
- [x] 1.3.9 Add validation: 10MB size limit per folder
|
||||
- [x] 1.3.10 Add ownership checks (user can only access own folders)
|
||||
|
||||
### 1.4 Tool Type API Updates
|
||||
- [x] 1.4.1 Update `POST /tool-types` to accept definition_type, dockerfile_template, build_context, readiness_probe
|
||||
- [x] 1.4.2 Update `PUT /tool-types/{id}` to handle new fields
|
||||
- [ ] 1.4.3 Add `GET /tool-types/{id}/validate` endpoint (syntax validation)
|
||||
- [x] 1.4.4 Update tool type response schemas
|
||||
- [x] 1.4.5 Update seed function to set definition_type="compose" for built-in types
|
||||
|
||||
### 1.5 Tool Config API Updates
|
||||
- [x] 1.5.1 Update `POST /tool-configs` to accept new fields
|
||||
- [x] 1.5.2 Update `PUT /tool-configs/{id}` to handle new fields
|
||||
- [x] 1.5.3 Update `GET /tool-configs` to return new fields
|
||||
- [x] 1.5.4 Add `GET /tool-configs/defaults/{tool_type_id}` endpoint
|
||||
- [x] 1.5.5 Add validation for port_override range
|
||||
- [x] 1.5.6 Add validation for environment_variables JSON structure
|
||||
- [x] 1.5.7 Add validation for volumes JSON structure (source/target/type)
|
||||
|
||||
## Phase 2: Instance Creation Enhancement
|
||||
|
||||
### 2.1 Docker Build Service
|
||||
- [ ] 2.1.1 Create `services/docker_build.py` for Dockerfile builds
|
||||
- [ ] 2.1.2 Implement `build_image(instance_dir, dockerfile, tag)` function
|
||||
- [ ] 2.1.3 Handle build context file writing
|
||||
- [ ] 2.1.4 Add build output streaming/logging
|
||||
- [ ] 2.1.5 Handle build failures with clear error messages
|
||||
|
||||
### 2.2 Compose Generation for Dockerfile Tools
|
||||
- [ ] 2.2.1 Create compose template for dockerfile-built images
|
||||
- [ ] 2.2.2 Integrate build service into instance creation flow
|
||||
- [ ] 2.2.3 Update `render_compose_template` to handle both paths
|
||||
|
||||
### 2.3 Config Folder Mounting
|
||||
- [ ] 2.3.1 Implement `write_config_folder_files(instance_dir, folders)` function
|
||||
- [ ] 2.3.2 Resolve config folders for user + project
|
||||
- [ ] 2.3.3 Generate volume mounts in compose file for config folders
|
||||
- [ ] 2.3.4 Apply project overrides during resolution
|
||||
- [ ] 2.3.5 Write config folder files to `instance_dir/volumes/`
|
||||
|
||||
### 2.4 Readiness Probe Service
|
||||
- [ ] 2.4.1 Create `services/readiness_probe.py`
|
||||
- [ ] 2.4.2 Implement `execute_probe(container_id, probe_config)` function
|
||||
- [ ] 2.4.3 Implement polling loop with timeout and interval
|
||||
- [ ] 2.4.4 Store probe output/logs on instance
|
||||
- [ ] 2.4.5 Update instance status based on probe result ("running" or "failed")
|
||||
- [ ] 2.4.6 Handle probe command failures gracefully
|
||||
|
||||
### 2.5 Instance Creation Integration
|
||||
- [ ] 2.5.1 Update `create_instance` endpoint to use new fields
|
||||
- [ ] 2.5.2 Integrate dockerfile build path into creation flow
|
||||
- [ ] 2.5.3 Integrate config folder mounting
|
||||
- [ ] 2.5.4 Integrate readiness probe execution
|
||||
- [ ] 2.5.5 Apply port_override if specified
|
||||
- [ ] 2.5.6 Apply start_command if specified
|
||||
- [ ] 2.5.7 Apply working_directory if specified
|
||||
- [ ] 2.5.8 Apply environment_variables from ToolConfig
|
||||
- [ ] 2.5.9 Apply volumes from ToolConfig
|
||||
- [ ] 2.5.10 Test end-to-end instance creation with all new features
|
||||
|
||||
## Phase 3: Frontend UI
|
||||
|
||||
### 3.1 API Client Updates
|
||||
- [ ] 3.1.1 Update `api/tool_types.ts` with new fields and endpoints
|
||||
- [ ] 3.1.2 Update `api/tool_configs.ts` with new fields
|
||||
- [ ] 3.1.3 Create `api/config_folders.ts` with all CRUD operations
|
||||
- [ ] 3.1.4 Update TypeScript types/interfaces
|
||||
|
||||
### 3.2 Tool Workshop Layout
|
||||
- [ ] 3.2.1 Create `pages/tool-workshop.tsx` (replaces tool-configs and tool-types)
|
||||
- [ ] 3.2.2 Implement split-pane layout (sidebar + main content)
|
||||
- [ ] 3.2.3 Create sidebar navigation tree (Tool Types / Config Folders)
|
||||
- [ ] 3.2.4 Implement tab switching (Tool Types / Configs / Config Folders)
|
||||
- [ ] 3.2.5 Add responsive design (collapsible sidebar on mobile)
|
||||
- [ ] 3.2.6 Update App.tsx routing
|
||||
|
||||
### 3.3 Tool Type Builder
|
||||
- [ ] 3.3.1 Create `components/ToolTypeBuilder.tsx`
|
||||
- [ ] 3.3.2 Implement definition type selector (Compose vs Dockerfile)
|
||||
- [ ] 3.3.3 Create compose template editor (textarea with YAML highlighting)
|
||||
- [ ] 3.3.4 Create dockerfile editor (textarea with Dockerfile highlighting)
|
||||
- [ ] 3.3.5 Add build context file manager
|
||||
- [ ] 3.3.6 Add readiness probe configuration (command, timeout, interval)
|
||||
- [ ] 3.3.7 Add validation feedback (syntax check)
|
||||
- [ ] 3.3.8 Implement create/update/delete operations
|
||||
|
||||
### 3.4 Config Editor Enhancement
|
||||
- [ ] 3.4.1 Update config form with new fields
|
||||
- [ ] 3.4.2 Add port override input (integer, 1-65535)
|
||||
- [ ] 3.4.3 Add start command input
|
||||
- [ ] 3.4.4 Add working directory input
|
||||
- [ ] 3.4.5 Create environment variables editor (key-value table)
|
||||
- [ ] 3.4.6 Create volumes editor (source/target/type table)
|
||||
- [ ] 3.4.7 Add JSON validation for env vars and volumes
|
||||
- [ ] 3.4.8 Implement tabbed sections (Basic / Runtime / Advanced)
|
||||
|
||||
### 3.5 Config Folder Manager
|
||||
- [ ] 3.5.1 Create `components/ConfigFolderManager.tsx`
|
||||
- [ ] 3.5.2 Implement folder list view
|
||||
- [ ] 3.5.3 Create folder editor (name, description, mount_path)
|
||||
- [ ] 3.5.4 Create file manager (add/edit/delete files with path and content)
|
||||
- [ ] 3.5.5 Implement file content editor (textarea with syntax highlighting)
|
||||
- [ ] 3.5.6 Create project override manager
|
||||
- [ ] 3.5.7 Add active/inactive toggle
|
||||
- [ ] 3.5.8 Show folder size indicator
|
||||
|
||||
### 3.6 Navigation Updates
|
||||
- [ ] 3.6.1 Update header/navigation to link to `/tool-workshop`
|
||||
- [ ] 3.6.2 Remove old `/tool-configs` and `/tool-types` routes (or redirect)
|
||||
- [ ] 3.6.3 Update breadcrumb navigation if applicable
|
||||
|
||||
## Phase 4: Integration & Testing
|
||||
|
||||
### 4.1 Backend Testing
|
||||
- [ ] 4.1.1 Test config folder CRUD operations
|
||||
- [ ] 4.1.2 Test config folder project overrides
|
||||
- [ ] 4.1.3 Test tool type creation with dockerfile
|
||||
- [ ] 4.1.4 Test tool type creation with compose
|
||||
- [ ] 4.1.5 Test readiness probe execution (success case)
|
||||
- [ ] 4.1.6 Test readiness probe execution (timeout case)
|
||||
- [ ] 4.1.7 Test instance creation with config folders mounted
|
||||
- [ ] 4.1.8 Test instance creation with port override
|
||||
- [ ] 4.1.9 Test instance creation with volumes
|
||||
- [ ] 4.1.10 Test 10MB size limit enforcement
|
||||
|
||||
### 4.2 Frontend Testing
|
||||
- [ ] 4.2.1 Test Tool Workshop page load
|
||||
- [ ] 4.2.2 Test tool type creation flow
|
||||
- [ ] 4.2.3 Test config folder creation and file management
|
||||
- [ ] 4.2.4 Test config editor with all new fields
|
||||
- [ ] 4.2.5 Test responsive layout on mobile
|
||||
- [ ] 4.2.6 Test form validation (port range, JSON structure)
|
||||
|
||||
### 4.3 End-to-End Testing
|
||||
- [ ] 4.3.1 Create a new tool type with dockerfile, start instance
|
||||
- [ ] 4.3.2 Create a new tool type with compose, start instance
|
||||
- [ ] 4.3.3 Create config folder, mount into instance, verify files present
|
||||
- [ ] 4.3.4 Add project override, verify different files in different projects
|
||||
- [ ] 4.3.5 Test readiness probe with failing command (should mark failed)
|
||||
- [ ] 4.3.6 Test readiness probe with succeeding command (should mark running)
|
||||
|
||||
### 4.4 Quality Gates
|
||||
- [ ] 4.4.1 Run backend linting (ruff)
|
||||
- [ ] 4.4.2 Run backend type checking (mypy)
|
||||
- [ ] 4.4.3 Run frontend type checking (tsc)
|
||||
- [ ] 4.4.4 Run frontend linting (eslint)
|
||||
- [ ] 4.4.5 Build frontend and verify no errors
|
||||
- [ ] 4.4.6 Run existing tests to ensure no regressions
|
||||
- [ ] 4.4.7 Verify backward compatibility (existing instances still work)
|
||||
|
||||
## Phase 5: Documentation & Deployment
|
||||
|
||||
### 5.1 Documentation
|
||||
- [ ] 5.1.1 Update API documentation (OpenAPI/Swagger annotations)
|
||||
- [ ] 5.1.2 Add tool workshop user guide
|
||||
- [ ] 5.1.3 Document config folder usage
|
||||
- [ ] 5.1.4 Document readiness probe configuration
|
||||
- [ ] 5.1.5 Add example dockerfile and compose templates
|
||||
|
||||
### 5.2 Migration & Deployment
|
||||
- [ ] 5.2.1 Verify database migrations run cleanly on existing data
|
||||
- [ ] 5.2.2 Update seed data for built-in tool types (add definition_type)
|
||||
- [ ] 5.2.3 Test fresh install (no existing data)
|
||||
- [ ] 5.2.4 Commit all changes with conventional commit messages
|
||||
- [ ] 5.2.5 Create comprehensive PR description
|
||||
|
||||
## Quality Gates Summary
|
||||
|
||||
**Before completing this change:**
|
||||
- All migrations must run successfully
|
||||
- Backend linting and type checking must pass
|
||||
- Frontend build must succeed with no errors
|
||||
- All new API endpoints must be tested
|
||||
- At least one end-to-end test for each new feature
|
||||
- No regressions in existing instance creation flow
|
||||
- Documentation updated
|
||||
Reference in New Issue
Block a user