4.8 KiB
MODIFIED Requirements
Requirement: Project commands
The system SHALL provide a project command group with subcommands list, get, create, and delete. pcli project list SHALL call the client's ListProjects method and output the result. pcli project get <id> SHALL accept a project ID as a positional argument, call GetProject, and output the result. pcli project create SHALL create a new project. pcli project delete <id> SHALL delete a project.
Scenario: List projects
- WHEN
pcli project listis executed - THEN the system SHALL output all accessible projects
Scenario: Get project by ID
- WHEN
pcli project get <id>is executed with a valid project ID - THEN the system SHALL output the project details
Scenario: Get project missing ID
- WHEN
pcli project getis executed without an ID argument - THEN the system SHALL print an error indicating the ID is required and exit with code 1
Scenario: Create project
- WHEN
pcli project create --name "My Project" --type private --description "A test project"is executed - THEN the system SHALL create the project and output the created project
Scenario: Create project missing required flags
- WHEN
pcli project createis executed without--nameor--type - THEN the system SHALL print an error indicating the required flags and exit with code 1
Scenario: Create project with insufficient permissions
- WHEN
pcli project createis executed with invalid API credentials - THEN the system SHALL output "create project: authentication failed — check your API key"
Scenario: Delete project
- WHEN
pcli project delete <id>is executed with a valid project ID - THEN the system SHALL delete the project and output a success confirmation
Scenario: Delete project with insufficient permissions
- WHEN
pcli project delete <id>is executed by a user without project manager permissions - THEN the system SHALL output "delete project: permission denied (requires project manager role)"
Scenario: Delete project not found
- WHEN
pcli project delete <id>is executed with a non-existent project ID - THEN the system SHALL output "delete project: not found — the resource may not exist or you may not have access to it"
Requirement: Board commands
The system SHALL provide a board command group with subcommands get, actions, create, and delete. pcli board get <id> SHALL accept a board ID as a positional argument and output the board details. pcli board actions <id> SHALL accept a board ID and an optional --limit flag (int, default 0) and output the board's action history. pcli board create SHALL create a new board. pcli board delete <id> SHALL delete a board.
Scenario: Get board
- WHEN
pcli board get <id>is executed - THEN the system SHALL output the board details including its lists
Scenario: List board actions
- WHEN
pcli board actions <id>is executed - THEN the system SHALL output the board's action history
Scenario: List board actions with limit
- WHEN
pcli board actions <id> --limit 10is executed - THEN the system SHALL output at most 10 action entries
Scenario: Create board
- WHEN
pcli board create --project <id> --name "Development Board" --position 65536is executed - THEN the system SHALL create the board and output the created board
Scenario: Create board missing required flags
- WHEN
pcli board createis executed without--projector--name - THEN the system SHALL print an error indicating the required flags and exit with code 1
Scenario: Create board with insufficient permissions
- WHEN
pcli board create --project <id> --name "Board"is executed by a user without project manager permissions on the project - THEN the system SHALL output "create board: permission denied (requires project manager role)"
Scenario: Create board project not found
- WHEN
pcli board create --project <id> --name "Board"is executed with a project the user cannot access - THEN the system SHALL output "create board: not found — the resource may not exist or you may not have access to it"
Scenario: Delete board
- WHEN
pcli board delete <id>is executed with a valid board ID - THEN the system SHALL delete the board and output a success confirmation
Scenario: Delete board with insufficient permissions
- WHEN
pcli board delete <id>is executed by a user without project manager permissions - THEN the system SHALL output "delete board: permission denied (requires project manager role)"
Scenario: Delete board not found
- WHEN
pcli board delete <id>is executed with a non-existent board ID - THEN the system SHALL output "delete board: not found — the resource may not exist or you may not have access to it"