docs(openspec): add OpenSpec changes for FN-005, FN-006, FN-008, FN-009, FN-010
- Add frontend-foundation change (FN-005) with 46 tasks - Add deployment-config change (FN-006) with 27 tasks - Add runfusion-poc/opencode-poc change (FN-008) with 25 tasks - Add config-secrets change (FN-009) with 31 tasks - Add codeserver-spawn change (FN-010) with 38 tasks - Include project specsheet and configuration - Archive completed deployment-config change
This commit is contained in:
+23
@@ -0,0 +1,23 @@
|
||||
## ADDED Requirements
|
||||
|
||||
### Requirement: code-server manifest defines runtime configuration
|
||||
The system SHALL provide a complete code-server manifest.
|
||||
|
||||
#### Scenario: Manifest includes Docker configuration
|
||||
- **WHEN** the code-server manifest is loaded
|
||||
- **THEN** it specifies the Docker image (codercom/code-server)
|
||||
- **AND** it defines exposed ports (8080)
|
||||
- **AND** it defines volume mounts (workspace, config, ssh)
|
||||
|
||||
#### Scenario: Manifest includes environment variables
|
||||
- **WHEN** the manifest is used for spawning
|
||||
- **THEN** it defines required environment variables
|
||||
- **AND** it defines optional config overrides
|
||||
|
||||
### Requirement: code-server manifest is valid
|
||||
The system SHALL validate the code-server manifest against the tool manifest schema.
|
||||
|
||||
#### Scenario: Schema validation
|
||||
- **WHEN** the manifest is loaded at startup
|
||||
- **THEN** it passes schema validation
|
||||
- **AND** any errors prevent application startup
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
## ADDED Requirements
|
||||
|
||||
### Requirement: Tool instance status is tracked
|
||||
The system SHALL track the lifecycle status of tool instances.
|
||||
|
||||
#### Scenario: Status transitions
|
||||
- **WHEN** a tool instance is created
|
||||
- **THEN** its status is "creating"
|
||||
- **AND** when the container starts, status becomes "running"
|
||||
- **AND** when stopped, status becomes "stopped"
|
||||
- **AND** on error, status becomes "error"
|
||||
|
||||
#### Scenario: Status polling
|
||||
- **WHEN** the user views a tool instance
|
||||
- **THEN** the frontend polls the status endpoint
|
||||
- **AND** updates the UI when status changes
|
||||
|
||||
### Requirement: Tool instances can be stopped and restarted
|
||||
The system SHALL allow stopping and restarting tool instances.
|
||||
|
||||
#### Scenario: Stop instance
|
||||
- **WHEN** the user clicks "Stop" on a running instance
|
||||
- **THEN** the system stops the Docker container
|
||||
- **AND** updates the status to "stopped"
|
||||
|
||||
#### Scenario: Restart instance
|
||||
- **WHEN** the user clicks "Start" on a stopped instance
|
||||
- **THEN** the system starts the existing container
|
||||
- **AND** updates the status to "running"
|
||||
@@ -0,0 +1,21 @@
|
||||
## ADDED Requirements
|
||||
|
||||
### Requirement: User can spawn a tool from the UI
|
||||
The system SHALL provide a user interface for spawning tools.
|
||||
|
||||
#### Scenario: Spawn form
|
||||
- **WHEN** the user navigates to /tools/spawn
|
||||
- **THEN** a form is displayed with tool selection
|
||||
- **AND** project selection dropdown
|
||||
- **AND** optional config override fields
|
||||
|
||||
#### Scenario: Tool selection
|
||||
- **WHEN** the user selects a tool from the dropdown
|
||||
- **THEN** the form shows tool-specific configuration options
|
||||
- **AND** a description of the tool
|
||||
|
||||
#### Scenario: Spawn submission
|
||||
- **WHEN** the user submits the spawn form
|
||||
- **THEN** the frontend calls POST /api/v1/tool-instances
|
||||
- **AND** displays a loading state
|
||||
- **AND** redirects to the tool instance detail page on success
|
||||
@@ -0,0 +1,29 @@
|
||||
## ADDED Requirements
|
||||
|
||||
### Requirement: API can spawn a tool instance
|
||||
The system SHALL provide an endpoint to create and start a tool instance.
|
||||
|
||||
#### Scenario: Spawn code-server
|
||||
- **WHEN** a POST request is made to /api/v1/tool-instances with tool_id and project_id
|
||||
- **THEN** the system creates a ToolInstance record
|
||||
- **AND** generates a Docker Compose service definition
|
||||
- **AND** starts the container via Docker Compose API
|
||||
- **AND** returns the tool instance with status "creating"
|
||||
|
||||
#### Scenario: Spawn with config overrides
|
||||
- **WHEN** a spawn request includes config overrides
|
||||
- **THEN** the overrides are merged with scope-resolved configs
|
||||
- **AND** applied to the container environment
|
||||
|
||||
### Requirement: Spawn validates prerequisites
|
||||
The system SHALL validate prerequisites before spawning.
|
||||
|
||||
#### Scenario: Valid project
|
||||
- **WHEN** the spawn request references a project
|
||||
- **THEN** the project must exist and belong to the user
|
||||
- **AND** the tool definition must exist in the registry
|
||||
|
||||
#### Scenario: Duplicate spawn prevention
|
||||
- **WHEN** a spawn request is made for an already-running instance
|
||||
- **THEN** the system returns the existing instance
|
||||
- **AND** does not create a duplicate container
|
||||
Reference in New Issue
Block a user