22d5848e1a
- Introduced `openspec-sync-specs` skill to sync delta specs to main specs, allowing intelligent merging of requirements. - Added `openspec-verify-change` skill to verify implementation against change artifacts, ensuring completeness, correctness, and coherence before archiving. docs: Create CLAUDE.md for project guidance - Added CLAUDE.md to provide an overview of the PCLI project, including build, test commands, architecture, and resource addition guidelines. chore: Add new change and design documents for project filter in status command - Created `.openspec.yaml`, `design.md`, `proposal.md`, and `tasks.md` for the `add-project-filter-to-status` change. - Updated specs for CLI commands and status command to include project filtering functionality. feat: Expand board included parsing in API client - Added parsing for `labels`, `cardLabels`, and `cardMemberships` in the `GetBoard` response. - Updated `ListCardsByBoard` to enrich card output with label names, enhancing usability in kanban sync workflows.
27 lines
1.5 KiB
Markdown
27 lines
1.5 KiB
Markdown
## Why
|
|
|
|
The `GetBoard` API response includes `cardLabels`, `labels`, and `cardMemberships` in its `included` data, but `pcli` only parses `lists` and `cards` — silently discarding the rest. This means there is no way to determine which labels are attached to which cards without making per-card API calls. The kanban sync workflow needs to identify agent-labelled cards from a board listing, and currently must fall back to name-matching because label data is unavailable.
|
|
|
|
## What Changes
|
|
|
|
- Expand the `Board` struct in `model/types.go` to include `Labels`, `CardLabels`, and `CardMemberships` fields
|
|
- Update `GetBoard` in `client/boards.go` to parse these additional `included` fields from the API response
|
|
- Update `ListCardsByBoard` to enrich card output with label names (via `cardLabels` join table + `labels`)
|
|
|
|
## Capabilities
|
|
|
|
### New Capabilities
|
|
|
|
_None — this enhances existing capabilities._
|
|
|
|
### Modified Capabilities
|
|
|
|
- `api-client`: `GetBoard` SHALL parse `labels`, `cardLabels`, and `cardMemberships` from the board response `included` data
|
|
- `card-operations`: `ListCardsByBoard` (card list --board) SHALL include label names on each card
|
|
|
|
## Impact
|
|
|
|
- **Code**: `model/types.go` (Board struct), `client/boards.go` (GetBoard parsing), `client/cards.go` (ListCardsByBoard enrichment)
|
|
- **API**: No new API calls — parsing data already returned by `GET /api/boards/:id`
|
|
- **Breaking changes**: None — new fields are additive; JSON output gains new fields but existing fields unchanged
|