@softdesignbrasil/productdock-cli 0.6.0 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +75 -4
- package/dist/productdock.js +201 -107
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -309,9 +309,9 @@ productdock agent status
|
|
|
309
309
|
|
|
310
310
|
### `productdock wi` — work items
|
|
311
311
|
|
|
312
|
-
|
|
313
|
-
`/cli/work-items/*` endpoints of the ProductDock API.
|
|
314
|
-
(`list`, `prd`, `spec-context`); two of them write to the work item —
|
|
312
|
+
Six operations over the work items of a project, served by the
|
|
313
|
+
`/cli/work-items/*` endpoints of the ProductDock API. Four of them read
|
|
314
|
+
(`list`, `prd`, `spec-context`, `bugs`); two of them write to the work item —
|
|
315
315
|
`comment` posts a comment, `evidence` uploads a QA screenshot. Each has its own
|
|
316
316
|
subsection below.
|
|
317
317
|
|
|
@@ -387,6 +387,76 @@ The general table above holds; this is how each condition maps to it:
|
|
|
387
387
|
| `1` | Directory not linked and no `--project-id`; missing `<ref>`; `--repository-id` and `--repository-name` together; missing required scope (`400`); no access to the project (`403`); work item not found **or not visible to you** (`404` — the two are deliberately indistinguishable); any other API failure |
|
|
388
388
|
| `2` | The API rejected the token (`401`) — run `productdock login` again |
|
|
389
389
|
|
|
390
|
+
#### `productdock wi bugs`
|
|
391
|
+
|
|
392
|
+
Lists the bugs of a work item's **Quality** tab, served by the
|
|
393
|
+
`/cli/work-items/qa-issues` endpoint of the ProductDock API. It is the same
|
|
394
|
+
operation the MCP server exposes as the `get_qa_issues` tool, and it returns the
|
|
395
|
+
same body — the CLI and the MCP call the same code on the server, so reading
|
|
396
|
+
every lineage, keeping one entry per bug id at its latest version, the status
|
|
397
|
+
filter and the `summary` are one implementation, not two.
|
|
398
|
+
|
|
399
|
+
**A bug belongs to the work item, not to a repository.** The bugs recorded on
|
|
400
|
+
the platform carry no repository and the ones recorded by the skill do, and the
|
|
401
|
+
command returns both: the `project.repository` of `productdock.json` is **not**
|
|
402
|
+
sent, exactly as in `wi prd`.
|
|
403
|
+
|
|
404
|
+
```bash
|
|
405
|
+
# Every bug of the work item, whatever its status
|
|
406
|
+
productdock wi bugs PROD-222
|
|
407
|
+
|
|
408
|
+
# Only the open ones, machine-readable — what the workflow skill reads
|
|
409
|
+
productdock wi bugs PROD-222 --status open --json
|
|
410
|
+
|
|
411
|
+
# Saved to a file
|
|
412
|
+
productdock wi bugs PROD-222 --json --out bugs.json
|
|
413
|
+
```
|
|
414
|
+
|
|
415
|
+
##### Parameters
|
|
416
|
+
|
|
417
|
+
| Subcommand | Argument | Options |
|
|
418
|
+
| ------------- | -------- | -------------------------------------- |
|
|
419
|
+
| `bugs <ref>` | `<ref>` | `--status <status>` · `--out <file>` |
|
|
420
|
+
|
|
421
|
+
| Parameter | Description |
|
|
422
|
+
| ------------------- | --------------------------------------------------------------------------------------------------------------------------------- |
|
|
423
|
+
| `<ref>` | **Required.** Work item reference in any of the four accepted formats: `PREFIX-N`, item number, UUID, or title |
|
|
424
|
+
| `--status <status>` | Bug status at its latest version: `open`, `resolved`, `invalid`, or `all`. Sent as-is — the CLI keeps no list of its own, and an unknown value is refused **by the server**, which names the accepted ones. Without the flag no filter is sent and the server's default (`all`) applies |
|
|
425
|
+
| `--out <file>` | Writes the response document to this file as well. The file gets the exact text `stdout` gets, written atomically |
|
|
426
|
+
|
|
427
|
+
##### Response format
|
|
428
|
+
|
|
429
|
+
Under `--json`, `stdout` carries one document with the API response untouched
|
|
430
|
+
under `data`:
|
|
431
|
+
|
|
432
|
+
```jsonc
|
|
433
|
+
{ "ok": true, "operation": "get_qa_issues", "data": { /* the body below */ } }
|
|
434
|
+
```
|
|
435
|
+
|
|
436
|
+
Without `--json`, `stdout` stays empty and a summary goes to `stderr`: one line
|
|
437
|
+
per bug — id, status, severity, title — and the count of open ones.
|
|
438
|
+
|
|
439
|
+
`data` is `{ summary, count, issues[] }`:
|
|
440
|
+
|
|
441
|
+
| Field | Meaning |
|
|
442
|
+
| ------------------ | -------------------------------------------------------------------------------------------------------------------------- |
|
|
443
|
+
| `summary` | Bug counts by status — `{ open, resolved, invalid }` — over the bugs that came back, after `--status` |
|
|
444
|
+
| `count` | How many bugs came back |
|
|
445
|
+
| `issues[]` | One entry per bug id, at its latest version: `{ id, title, severity, priority, type, status, tc_ref, evidence[], body, source, repository_id, version, edited_by, created_at }`. `body` is the bug's markdown, untouched; `evidence[]` is `{ label, url? }` |
|
|
446
|
+
|
|
447
|
+
A work item with no bugs returns `count: 0` and `issues: []`, which is a
|
|
448
|
+
**success**, not an error.
|
|
449
|
+
|
|
450
|
+
##### Exit codes
|
|
451
|
+
|
|
452
|
+
The general table above holds; this is how each condition maps to it:
|
|
453
|
+
|
|
454
|
+
| Code | When |
|
|
455
|
+
| ---- | ---------------------------------------------------------------------------------------------------------------------------- |
|
|
456
|
+
| `0` | The bugs were read — including a work item with no bugs |
|
|
457
|
+
| `1` | Missing `<ref>`; directory not linked and no `--project-id`; unknown `--status` (`400`, refused by the server); no access to the project (`403`); work item not found **or not visible to you** (`404` — the two are deliberately indistinguishable); any other API failure |
|
|
458
|
+
| `2` | The API rejected the token (`401`) — run `productdock login` again |
|
|
459
|
+
|
|
390
460
|
#### `productdock wi comment`
|
|
391
461
|
|
|
392
462
|
Posts a comment on a work item, served by the `/cli/work-items/comments`
|
|
@@ -1122,6 +1192,7 @@ the `ignored_fields` warning, spelled out as "not stored".
|
|
|
1122
1192
|
| `mode` | **Modo Lite** of the project (`full`/`lite`) — whether Test Design runs. Not the Fluxo Rápido, and not the UI's "Modo Light"; the two vocabularies share the word `full` by accident |
|
|
1123
1193
|
| `tasks_progress` | `{ done, total, percent, parallel }` read from the latest `tasks` artifact — from the `tasks/v1` envelope, with the legacy Markdown as a fallback. `null` when there is no `tasks` artifact |
|
|
1124
1194
|
| `implementation_complete` | `true` when every task is done — or when an `implement` artifact was submitted with `--status done`, which is the only path for work items that skip the `tasks` phase |
|
|
1195
|
+
| `open_qa_bugs` | Number of bugs still `open` in the work item's Quality tab — the platform's own and the ones the skills submitted, on any repository. `0` when there are none. Read them with [`wi bugs`](#productdock-wi-bugs) |
|
|
1125
1196
|
| `state_content` | The recorded state as an **object**: `decisions[]`, `blockers[]`, `lessons[]`, `reviews[]`. Reading a decision back used to require `wi spec-context` — a command whose name does not suggest it — and two levels of parsing |
|
|
1126
1197
|
|
|
1127
1198
|
`update_state`:
|
|
@@ -1328,7 +1399,7 @@ bun test test/output.test.ts
|
|
|
1328
1399
|
| `lib/artifacts.ts` | Install core: destinations, zip extraction, SHA256 fingerprint, drift |
|
|
1329
1400
|
| `lib/frontmatter.ts` | Frontmatter adaptation per platform (agents) — port of the ai-tools installer |
|
|
1330
1401
|
| `lib/artifact-commands.ts`| The `skill` and `agent` command groups, generic over artifact kind |
|
|
1331
|
-
| `lib/work-items.ts` | The `wi` command group — `list`, `prd
|
|
1402
|
+
| `lib/work-items.ts` | The `wi` command group — `list`, `prd`, `spec-context` and `bugs` over `/cli/work-items/*` |
|
|
1332
1403
|
| `lib/work-item-attachments.ts` | The `wi` writes — `comment` over `/cli/work-items/comments` and `evidence` (multipart) over `/cli/work-items/qa-evidence` |
|
|
1333
1404
|
| `lib/code.ts` | The `code` command group — `map` and `search` over `/cli/code/*` |
|
|
1334
1405
|
| `lib/phase-artifacts.ts` | The `artifact` command group — `submit` over `/cli/artifacts` and `commit` over `/cli/artifacts/commit`, body from a file |
|