Released v1

This commit is contained in:
Steve Cliff
2026-02-12 10:37:19 +00:00
commit b07572fed5
77 changed files with 19518 additions and 0 deletions
+88
View File
@@ -0,0 +1,88 @@
## ADDED Requirements
### Requirement: Move card between lists
The system SHALL provide a `card move` operation that updates a card's `listId` to move it to a different list. The operation SHALL accept an optional `position` to place the card at a specific position within the target list. The move operation SHALL be implemented as a `PATCH /cards/{id}` call with `listId` and optionally `position` fields. The CLI command SHALL be `pcli card move <id> --list <listId> [--position N]`.
#### Scenario: Move card to another list
- **WHEN** `pcli card move <id> --list <targetListId>` is executed
- **THEN** the system SHALL send `PATCH /cards/{id}` with `{"listId": "<targetListId>"}`
- **AND** the system SHALL output the updated card with its new listId
#### Scenario: Move card to specific position
- **WHEN** `pcli card move <id> --list <targetListId> --position 0` is executed
- **THEN** the system SHALL send `PATCH /cards/{id}` with `{"listId": "<targetListId>", "position": 0}`
- **AND** the card SHALL appear at the specified position in the target list
#### Scenario: Move card missing list flag
- **WHEN** `pcli card move <id>` is executed without `--list`
- **THEN** the system SHALL print an error indicating `--list` is required and exit with code 1
### Requirement: Duplicate card
The system SHALL provide a `card duplicate` operation that creates a copy of an existing card. The operation SHALL call `POST /cards/{id}/duplicate`. The CLI command SHALL be `pcli card duplicate <id> [--name <name>] [--position N]`. If `--name` is not provided, the API determines the name of the duplicate.
#### Scenario: Duplicate card with defaults
- **WHEN** `pcli card duplicate <id>` is executed
- **THEN** the system SHALL send `POST /cards/{id}/duplicate`
- **AND** the system SHALL output the newly created duplicate card
#### Scenario: Duplicate card with custom name
- **WHEN** `pcli card duplicate <id> --name "Copy of task"` is executed
- **THEN** the system SHALL send `POST /cards/{id}/duplicate` with `{"name": "Copy of task"}`
- **AND** the duplicate card SHALL have the specified name
### Requirement: Assign and unassign card members
The system SHALL provide `card assign` and `card unassign` operations to manage card memberships. `card assign` SHALL call `POST /cards/{cardId}/card-memberships` with the user ID. `card unassign` SHALL call `DELETE /cards/{cardId}/card-memberships/userId:{userId}`.
#### Scenario: Assign user to card
- **WHEN** `pcli card assign <cardId> --user <userId>` is executed
- **THEN** the system SHALL send `POST /cards/{cardId}/card-memberships` with `{"userId": "<userId>"}`
- **AND** the system SHALL output a success confirmation
#### Scenario: Unassign user from card
- **WHEN** `pcli card unassign <cardId> --user <userId>` is executed
- **THEN** the system SHALL send `DELETE /cards/{cardId}/card-memberships/userId:{userId}`
- **AND** the system SHALL output a success confirmation
#### Scenario: Assign missing user flag
- **WHEN** `pcli card assign <cardId>` is executed without `--user`
- **THEN** the system SHALL print an error indicating `--user` is required and exit with code 1
### Requirement: Add and remove card labels
The system SHALL provide `card add-label` and `card remove-label` operations to manage labels on cards. `card add-label` SHALL call `POST /cards/{cardId}/card-labels` with the label ID. `card remove-label` SHALL call `DELETE /cards/{cardId}/card-labels/labelId:{labelId}`.
#### Scenario: Add label to card
- **WHEN** `pcli card add-label <cardId> --label <labelId>` is executed
- **THEN** the system SHALL send `POST /cards/{cardId}/card-labels` with `{"labelId": "<labelId>"}`
- **AND** the system SHALL output a success confirmation
#### Scenario: Remove label from card
- **WHEN** `pcli card remove-label <cardId> --label <labelId>` is executed
- **THEN** the system SHALL send `DELETE /cards/{cardId}/card-labels/labelId:{labelId}`
- **AND** the system SHALL output a success confirmation
#### Scenario: Add label missing label flag
- **WHEN** `pcli card add-label <cardId>` is executed without `--label`
- **THEN** the system SHALL print an error indicating `--label` is required and exit with code 1
### Requirement: Enriched board-level card listing
The system SHALL provide a `card list --board <id>` operation that returns all cards across all lists in a board, with each card enriched with the `listName` field. The operation SHALL: (1) call `GET /boards/{id}` to retrieve the board and its included lists, (2) call `GET /lists/{listId}/cards` for each list to retrieve cards (with pagination support), (3) inject `listName` into each card based on the list it belongs to. The `--limit` flag SHALL apply to the total number of cards returned across all lists.
#### Scenario: List all cards on a board
- **WHEN** `pcli card list --board <id>` is executed
- **THEN** the system SHALL return all cards from all lists in the board
- **AND** each card SHALL include a `listName` field with the name of its containing list
- **AND** each card SHALL include a `listId` field
#### Scenario: Board card listing with limit
- **WHEN** `pcli card list --board <id> --limit 10` is executed
- **THEN** the system SHALL return at most 10 cards total across all lists
- **AND** each card SHALL include the `listName` field
#### Scenario: Board with no cards
- **WHEN** `pcli card list --board <id>` is executed on a board with empty lists
- **THEN** the system SHALL return an empty array
#### Scenario: Board with multiple lists
- **WHEN** a board has lists "To Do", "In Progress", and "Done" each containing cards
- **THEN** the returned cards SHALL have `listName` set to the respective list name
- **AND** cards from all lists SHALL be included in the result