Files
headquarter/openspec/changes/add-config-profiles/specs/config-profile-management/spec.md
T
alex 22c035984e feat: add config profiles data model and migrations
- Add ConfigProfile model with user ownership, name, description
- Add ConfigInclude model for ordered profile self-references
- Add ConfigMount model for mount/file definitions
- Add selected_profile_id to ToolInstance for per-instance profile selection
- Add default profile properties to UserConfig JSONB config
- Create Alembic migration 0013 for new tables and columns
- Register new models in models/__init__.py
- Mark config_folders.is_active as deprecated
- Add migration metadata test

Quality gates: syntax check passed (all files parse successfully)
OpenSpec: add-config-profiles task 1.1
2026-05-24 12:54:45 +00:00

1.3 KiB

ADDED Requirements

Requirement: User can create config profiles

The system SHALL allow users to create named config profiles containing mounts and includes.

Scenario: Successful profile creation

  • WHEN user creates a profile with name, description, and mount list
  • THEN the profile is stored with a unique ID and associated mounts

Requirement: Profile includes are ordered

The system SHALL support ordered includes where profiles can reference other profiles with a defined application sequence.

Scenario: Include with order

  • WHEN user adds an include to a profile with order_index 1
  • THEN the included profile's mounts are applied after order_index 0 includes

Requirement: Config mounts define files and paths

The system SHALL store individual mount entries with mount_path, optional content, and optional source profile reference.

Scenario: Add mount to profile

  • WHEN user adds a mount with mount_path "/app/config.json" and content "{}"
  • THEN the mount is stored and linked to the profile

Requirement: Cycle detection in includes

The system SHALL prevent creation of include cycles.

Scenario: Attempt cyclic include

  • WHEN user tries to include profile B in profile A where A is already included in B
  • THEN the system rejects the request with an error