# Project Management Specification ## Purpose Organize repositories into projects for grouping related work. ## Requirements ### Requirement: Project Creation The system SHALL allow creating new projects. #### Scenario: Create project - GIVEN an authenticated user - WHEN they create a project with name and description - THEN a project record is created - AND the user is set as owner ### Requirement: Project Listing The system SHALL list all user projects. #### Scenario: List projects - GIVEN an authenticated user - WHEN they view the projects page - THEN all their projects are listed with associated repositories ### Requirement: Project Updates The system SHALL support updating project details. #### Scenario: Update project - GIVEN a project owner - WHEN they update the name or description - THEN the changes are persisted ### Requirement: Project Deletion The system SHALL support cascading project deletion. #### Scenario: Delete project - GIVEN a project owner - WHEN they delete a project - THEN all associated repositories are deleted - AND all associated SSH keys are removed - AND the project record is deleted ### Requirement: Default SSH Key The system SHALL allow setting a default SSH key per project. #### Scenario: Set default key - GIVEN a project with SSH keys - WHEN the owner selects a default key - THEN it's used for git operations in that project ## Dependencies - Database models: Project, User, GitRepository, SSHKey - git-repo (for cascading delete) - ssh-keys (for default key) ## Quality Gates - `pytest` must pass - `mypy .` must pass - `ruff check .` must pass - `npm run typecheck` must pass - `npm run lint` must pass