@softdesignbrasil/productdock-cli 0.14.0 → 0.16.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 +482 -193
- package/dist/productdock.js +100 -93
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -147,8 +147,8 @@ productdock <operation> --repository-id <uuid>
|
|
|
147
147
|
| `--repository-id <uuid>` | Repository the operation runs against — overrides `project.repository` |
|
|
148
148
|
|
|
149
149
|
One exception: the `eval` commands work on a project-level evaluation and
|
|
150
|
-
never use the repository UUID. `eval latest` and `eval
|
|
151
|
-
`repository_key` (`--repository <key>`); `eval submit` takes the repository of
|
|
150
|
+
never use the repository UUID. `eval latest`, `eval list` and `eval history`
|
|
151
|
+
filter by `repository_key` (`--repository <key>`); `eval submit` takes the repository of
|
|
152
152
|
the execution from the envelope's label (`target.repositories[0]`) or from
|
|
153
153
|
`--repository-name`. None of them offers `--repository-id`, and passing it
|
|
154
154
|
exits `1` before any network call — see `productdock eval` below and
|
|
@@ -158,6 +158,11 @@ The same holds for `test-report submit`: the test suite report belongs to the
|
|
|
158
158
|
project, so the repository UUID is not sent and `--repository-id` exits `1`
|
|
159
159
|
before any network call — see `productdock test-report` below.
|
|
160
160
|
|
|
161
|
+
And for `sprint list` and `sprint items`: a sprint belongs to the project, so
|
|
162
|
+
neither sends the repository UUID — `sprint items` lists every work item of the
|
|
163
|
+
sprint, not only the ones of the linked repository — and `--repository-id`
|
|
164
|
+
exits `1` before any network call — see `productdock sprint` below.
|
|
165
|
+
|
|
161
166
|
In a tree that was never linked, an operation that needs a project exits `1`,
|
|
162
167
|
naming **the directories it searched** — from the current one up to the
|
|
163
168
|
filesystem root — and telling you to run `productdock link` at the repository
|
|
@@ -234,16 +239,16 @@ Nothing is written until every decision is made: a `link` that fails leaves the
|
|
|
234
239
|
directory exactly as it was, instead of a `productdock.json` carrying only the
|
|
235
240
|
project.
|
|
236
241
|
|
|
237
|
-
| Flag | Description
|
|
238
|
-
| ------------------------ |
|
|
239
|
-
| `--project-id <uuid>` | Skip interactive project selection
|
|
240
|
-
| `--repository-id <uuid>` | Skip interactive repository selection; refused when the id is not in the project
|
|
242
|
+
| Flag | Description |
|
|
243
|
+
| ------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
244
|
+
| `--project-id <uuid>` | Skip interactive project selection |
|
|
245
|
+
| `--repository-id <uuid>` | Skip interactive repository selection; refused when the id is not in the project |
|
|
241
246
|
| `--ide <ide>` | IDE to configure — `claude-code`, `cursor`, `vscode`, `claude-desktop` (repeatable). Added to the IDEs already in `productdock.json` (never replaces what `productdock init` wrote); without a prior `init`, it stands in for it |
|
|
242
|
-
| `--install-mcp` | Install the MCP configuration without asking
|
|
243
|
-
| `--no-install-mcp` | Do not install the MCP configuration
|
|
244
|
-
| `--install-skills` | Install skills and agents without asking
|
|
245
|
-
| `--no-install-skills` | Do not install skills or agents
|
|
246
|
-
| `-y, --yes` | Answer yes to every confirmation
|
|
247
|
+
| `--install-mcp` | Install the MCP configuration without asking |
|
|
248
|
+
| `--no-install-mcp` | Do not install the MCP configuration |
|
|
249
|
+
| `--install-skills` | Install skills and agents without asking |
|
|
250
|
+
| `--no-install-skills` | Do not install skills or agents |
|
|
251
|
+
| `-y, --yes` | Answer yes to every confirmation |
|
|
247
252
|
|
|
248
253
|
Under `--json` the response document reports the resulting state of the link —
|
|
249
254
|
project, repository (`null` when none was bound), IDEs, and whether the MCP and
|
|
@@ -330,12 +335,39 @@ productdock skill status
|
|
|
330
335
|
productdock agent status
|
|
331
336
|
```
|
|
332
337
|
|
|
333
|
-
| Subcommand | Description
|
|
334
|
-
| ---------------- |
|
|
335
|
-
| `list` | List what the registry offers. `--source internal\|third-party\|productdock`
|
|
338
|
+
| Subcommand | Description |
|
|
339
|
+
| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
340
|
+
| `list` | List what the registry offers. `--source internal\|third-party\|productdock` |
|
|
336
341
|
| `install [name]` | Install into every target derived from `productdock.json` — one item by `name`, or every item of a source with `--source internal\|third-party\|productdock`. `--version <version>` (by name only). `--force` overwrites what is already on disk: without it, `install <name>` refuses and `install --source` skips an item installed in every target, installs it only in the targets where it is missing (an empty or partial folder counts as missing) and reports it |
|
|
337
|
-
| `update [name]` | Update one, or every installed item. Up-to-date and locally modified items are skipped unless `--force`
|
|
338
|
-
| `status` | Report `up to date` / `outdated` / `modified` per installed item
|
|
342
|
+
| `update [name]` | Update one, or every installed item. Up-to-date and locally modified items are skipped unless `--force` |
|
|
343
|
+
| `status` | Report `up to date` / `outdated` / `modified` per installed item — one registry request per kind. Under `--json`, `items` lists each one (see below) |
|
|
344
|
+
|
|
345
|
+
Under `--json`, `status` returns one item per installed artifact — the contract the `pd-*` skills read in
|
|
346
|
+
their version probe:
|
|
347
|
+
|
|
348
|
+
```jsonc
|
|
349
|
+
{
|
|
350
|
+
"ok": true,
|
|
351
|
+
"operation": "skill_status",
|
|
352
|
+
"kind": "skill",
|
|
353
|
+
"items": [
|
|
354
|
+
{ "name": "pd-workflow", "version": "3.3.0", "latest": "3.4.0", "state": "outdated" },
|
|
355
|
+
{ "name": "pd-security-eval", "version": "1.2.0", "latest": "1.2.0", "state": "up-to-date" },
|
|
356
|
+
{ "name": "pd-x", "version": "1.0.0", "latest": null, "state": "other-branch", "branch": "feature/x" }
|
|
357
|
+
]
|
|
358
|
+
}
|
|
359
|
+
```
|
|
360
|
+
|
|
361
|
+
| `state` | Meaning |
|
|
362
|
+
| -------------- | ---------------------------------------------------------------------------------------------------- |
|
|
363
|
+
| `up-to-date` | On disk matches the registry's latest |
|
|
364
|
+
| `outdated` | Untouched since install, on an older version than the registry's — `update` installs the latest |
|
|
365
|
+
| `modified` | A skill edited on disk since install (never an agent — see above); `update` skips it without `--force` |
|
|
366
|
+
| `missing` | Recorded in `productdock.json` but not on disk |
|
|
367
|
+
| `other-branch` | Installed from another `ai-tools` branch than the active one; `branch` says which (`null` = default) |
|
|
368
|
+
| `unknown` | Not in the registry, or the registry could not be reached (`latest: null`) |
|
|
369
|
+
|
|
370
|
+
Nothing installed returns `"items": []`. No session exits `2`, as every command.
|
|
339
371
|
|
|
340
372
|
`install` takes **either** a name **or** `--source`: both together, or neither,
|
|
341
373
|
is a usage error (exit `1`). A source outside `internal`, `third-party` and
|
|
@@ -400,6 +432,10 @@ productdock wi list
|
|
|
400
432
|
productdock wi list --status backlog --search "authentication"
|
|
401
433
|
productdock wi list --search improvement # matches the type
|
|
402
434
|
|
|
435
|
+
# Only the work items assigned to you — combines with the filters above
|
|
436
|
+
productdock wi list --mine
|
|
437
|
+
productdock wi list --mine --status development
|
|
438
|
+
|
|
403
439
|
# The PRD of one work item — ref is PREFIX-N, a number, a UUID or a title
|
|
404
440
|
productdock wi prd PROD-168
|
|
405
441
|
productdock wi prd 168
|
|
@@ -412,11 +448,11 @@ productdock wi spec-context PROD-168 --json --out spec-context.json
|
|
|
412
448
|
|
|
413
449
|
##### Parameters
|
|
414
450
|
|
|
415
|
-
| Subcommand | Argument | Options
|
|
416
|
-
| -------------------- | -------- |
|
|
417
|
-
| `list` | — | `--status <status>` · `--search <term>` · `--repository-name <name>` · `--out <file>` |
|
|
418
|
-
| `prd <ref>` | `<ref>` | `--out <file>`
|
|
419
|
-
| `spec-context <ref>` | `<ref>` | `--out <file>`
|
|
451
|
+
| Subcommand | Argument | Options |
|
|
452
|
+
| -------------------- | -------- | ------------------------------------------------------------------------------------------------ |
|
|
453
|
+
| `list` | — | `--status <status>` · `--search <term>` · `--repository-name <name>` · `--mine` · `--out <file>` |
|
|
454
|
+
| `prd <ref>` | `<ref>` | `--out <file>` |
|
|
455
|
+
| `spec-context <ref>` | `<ref>` | `--out <file>` |
|
|
420
456
|
|
|
421
457
|
| Parameter | Description |
|
|
422
458
|
| -------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
@@ -424,6 +460,7 @@ productdock wi spec-context PROD-168 --json --out spec-context.json
|
|
|
424
460
|
| `--status <status>` | Kanban column: `backlog`, `prd`, `specification`, `development`, `review`, `testing`, `homologation`, `production` |
|
|
425
461
|
| `--search <term>` | Matches the work item **title OR description OR type** — one term, three columns |
|
|
426
462
|
| `--repository-name <name>` | Repository by name, resolved server-side. It **replaces** the repository of the linked directory for this call — `repository_id` is not sent alongside it, or the server would ignore the name. Passing it together with `--repository-id` is refused (exit `1`), not silently resolved one way |
|
|
463
|
+
| `--mine` | Only work items assigned to you. Filtered by the server, by the user of the token — the same "mine" as the `--mine` of `watch` — and applied before the 100-item cap, so `has_more` counts only your items. Combines with `--status`, `--search` and the repository scope |
|
|
427
464
|
| `--out <file>` | Writes the response document to this file as well. The file gets the exact text `stdout` gets, written atomically |
|
|
428
465
|
|
|
429
466
|
##### Response format
|
|
@@ -445,11 +482,11 @@ under `data`:
|
|
|
445
482
|
`get_spec_context`. Without `--json`, `stdout` stays empty and a human-readable
|
|
446
483
|
summary goes to `stderr`.
|
|
447
484
|
|
|
448
|
-
| Subcommand | `data`
|
|
449
|
-
| -------------- |
|
|
450
|
-
| `prd` | `{ content, status, version, updated_at }` — the latest PRD version. A work item with no PRD returns `{ content: null, message }`, which is a **success**, not an error
|
|
451
|
-
| `list` | `{ project_id, work_item_prefix, repository_id, has_more, items[] }`; each item is `{ id, item_number, title, description, type, status, flow_mode, current_phase }
|
|
452
|
-
| `spec-context` | `{ product_brief, product_brief_status, product_vision, domain_model, discovery_insights, non_functional_requirements, sibling_specs, skill_mode, current_state, repository_id }`. `skill_mode` is the project's Lite Mode toggle (`full` / `lite`)
|
|
485
|
+
| Subcommand | `data` |
|
|
486
|
+
| -------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
487
|
+
| `prd` | `{ content, status, version, updated_at }` — the latest PRD version. A work item with no PRD returns `{ content: null, message }`, which is a **success**, not an error |
|
|
488
|
+
| `list` | `{ project_id, work_item_prefix, repository_id, has_more, items[] }`; each item is `{ id, item_number, title, description, type, status, flow_mode, current_phase, assigned_to, assigned_to_name, wave, affected_release }` — `assigned_to` is the assignee's user id and `assigned_to_name` the readable name, both `null` when nobody is assigned; `wave` is the item's wave `{ id, code, name }` and `affected_release` its affected version `{ id, version, status, repository: { id, name } }`, each `null` when the item has none (the keys are always present). Capped at 100 items — `has_more: true` says the cap was hit. Without `--json`, the summary shows next to each item the assignee (`(sem responsável)` when there is none), the wave by its `code` (`(sem onda)`) and the affected version by its `version` (`(sem versão)`) |
|
|
489
|
+
| `spec-context` | `{ product_brief, product_brief_status, product_vision, domain_model, discovery_insights, non_functional_requirements, sibling_specs, skill_mode, current_state, repository_id }`. `skill_mode` is the project's Lite Mode toggle (`full` / `lite`) |
|
|
453
490
|
|
|
454
491
|
##### Exit codes
|
|
455
492
|
|
|
@@ -643,15 +680,15 @@ productdock wi attachments PROD-261 --download ./attachments --json
|
|
|
643
680
|
|
|
644
681
|
##### Parameters
|
|
645
682
|
|
|
646
|
-
| Subcommand | Argument | Options
|
|
647
|
-
| ------------------- | -------- |
|
|
683
|
+
| Subcommand | Argument | Options |
|
|
684
|
+
| ------------------- | -------- | ----------------------------------- |
|
|
648
685
|
| `attachments <ref>` | `<ref>` | `--download <dir>` · `--out <file>` |
|
|
649
686
|
|
|
650
|
-
| Parameter | Description
|
|
651
|
-
| ------------------ |
|
|
652
|
-
| `<ref>` | **Required.** Work item reference in any of the four accepted formats: `PREFIX-N`, item number, UUID, or title
|
|
687
|
+
| Parameter | Description |
|
|
688
|
+
| ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
689
|
+
| `<ref>` | **Required.** Work item reference in any of the four accepted formats: `PREFIX-N`, item number, UUID, or title |
|
|
653
690
|
| `--download <dir>` | Writes the bytes of every attachment of the list into `<dir>`, one `GET /cli/work-items/attachments/content` per attachment — never through the `signed_url`. The bytes go to disk exactly as served: not decoded as UTF-8 and not masked. `<dir>` is created when it does not exist. The file name is the base name of `file_name` (`../` and folders are dropped, so nothing lands outside `<dir>`). **A file that already exists is overwritten.** When two attachments share a name, the second gets `-<n>` before the extension (`print.png`, `print-2.png`; compared ignoring case). An empty list writes nothing and creates nothing. A failure in the middle stops the command with its exit code and **keeps what was already written** — those paths are on `stderr` |
|
|
654
|
-
| `--out <file>` | Writes the response document to this file as well. The file gets the exact text `stdout` gets, written atomically
|
|
691
|
+
| `--out <file>` | Writes the response document to this file as well. The file gets the exact text `stdout` gets, written atomically |
|
|
655
692
|
|
|
656
693
|
##### Response format
|
|
657
694
|
|
|
@@ -673,10 +710,10 @@ per attachment — name, MIME type, size, date and author.
|
|
|
673
710
|
|
|
674
711
|
`data` is `{ work_item_id, count, attachments[] }`:
|
|
675
712
|
|
|
676
|
-
| Field | Meaning
|
|
677
|
-
| --------------- |
|
|
678
|
-
| `work_item_id` | The work item the reference resolved to
|
|
679
|
-
| `count` | How many attachments came back — always `attachments.length`
|
|
713
|
+
| Field | Meaning |
|
|
714
|
+
| --------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
715
|
+
| `work_item_id` | The work item the reference resolved to |
|
|
716
|
+
| `count` | How many attachments came back — always `attachments.length` |
|
|
680
717
|
| `attachments[]` | Most recent first: `{ id, file_name, mime_type, file_size, created_at, uploaded_by, author_name, signed_url, expires_in }`. `file_size` is in bytes; `author_name` is the author's full name, or their e-mail, or `Sem nome`, and `null` when there is no author. `signed_url` is a read URL of the private bucket, valid for `expires_in` seconds (300) |
|
|
681
718
|
|
|
682
719
|
`signed_url` is meant for an agent over MCP. Under `--json` its token comes out
|
|
@@ -698,11 +735,11 @@ each file appears.
|
|
|
698
735
|
|
|
699
736
|
The general table above holds; this is how each condition maps to it:
|
|
700
737
|
|
|
701
|
-
| Code | When
|
|
702
|
-
| ---- |
|
|
703
|
-
| `0` | The attachments were read — including a work item with no attachments
|
|
738
|
+
| Code | When |
|
|
739
|
+
| ---- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
740
|
+
| `0` | The attachments were read — including a work item with no attachments |
|
|
704
741
|
| `1` | Missing `<ref>`; directory not linked and no `--project-id`; missing reference (`400`); not a member of the project (`403` — `not_member`, or `project_membership_required` with only "Ver todos os projetos"); work item not found **or not visible to you** (`404` — the two are deliberately indistinguishable); any other API failure; **with `--download`**, the download of one attachment refused (`403`), not found (`404`) or not writable to disk — what was written before the failure stays in `<dir>`, and `stderr` names it |
|
|
705
|
-
| `2` | The API rejected the token (`401`) — run `productdock login` again; with `--download`, also when it happens in the middle of the downloads, keeping what was already written
|
|
742
|
+
| `2` | The API rejected the token (`401`) — run `productdock login` again; with `--download`, also when it happens in the middle of the downloads, keeping what was already written |
|
|
706
743
|
|
|
707
744
|
#### `productdock wi comment`
|
|
708
745
|
|
|
@@ -1139,9 +1176,9 @@ in `prd-review-claims.json` under the configuration directory (next to
|
|
|
1139
1176
|
|
|
1140
1177
|
| Parameter | Description |
|
|
1141
1178
|
| ------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1142
|
-
| `<ref>` / `--ref` | **Required.** Work item under review, in any of the four accepted formats: `PREFIX-N`, item number, UUID, or title. It is the positional argument of `get`, `claim` and `release`, and the `--ref` flag of `submit`, so the two can never be swapped by accident
|
|
1179
|
+
| `<ref>` / `--ref` | **Required.** Work item under review, in any of the four accepted formats: `PREFIX-N`, item number, UUID, or title. It is the positional argument of `get`, `claim` and `release`, and the `--ref` flag of `submit`, so the two can never be swapped by accident |
|
|
1143
1180
|
| `--job-id <uuid>` | The Tech Review request the round enters through — the `job.id` that `claim` returned, or the request of the `watch` round. Sent only when given; the server refuses a request that is not running for you (cancelled included) and writes nothing |
|
|
1144
|
-
| `--status <status>` | Thread status filter: `open`, `resolved`, `ignored`, `superseded`, `archived`, or `all` (the default). The CLI keeps no list of its own — an unknown value is refused **by the server**, which names the accepted ones
|
|
1181
|
+
| `--status <status>` | Thread status filter: `open`, `resolved`, `ignored`, `superseded`, `archived`, or `all` (the default). The CLI keeps no list of its own — an unknown value is refused **by the server**, which names the accepted ones |
|
|
1145
1182
|
| `--limit <n>` | Cap on how many threads come back, most recent first — a positive integer. The server defaults to 50 and caps at 200. A non-numeric value is refused locally (exit `1`), never silently ignored |
|
|
1146
1183
|
| `[file]` | Path to the review body on disk, read as UTF-8 and sent verbatim — not trimmed, not re-encoded, not truncated. The fenced JSON block with the `prd-review/v1` envelope, at the top of it, is **mandatory** — a body without it is refused by the server. Optional only in the sense that `--content` replaces it; passing both is refused (exit `1`), not silently resolved one way |
|
|
1147
1184
|
| `--content <text>` | The review body inline, as an alternative to the file |
|
|
@@ -1168,54 +1205,55 @@ summary goes to `stderr`.
|
|
|
1168
1205
|
|
|
1169
1206
|
`get` returns `{ work_item_id, brief_version, summary, count, threads[] }`:
|
|
1170
1207
|
|
|
1171
|
-
| Field
|
|
1172
|
-
|
|
|
1173
|
-
| `summary`
|
|
1174
|
-
| `count`
|
|
1175
|
-
| `threads[].finding_key`
|
|
1176
|
-
| `threads[].status`
|
|
1177
|
-
| `threads[].archived_from_status`
|
|
1178
|
-
| `threads[].messages[]`
|
|
1179
|
-
| `threads[].outdated`
|
|
1180
|
-
| `brief_version`
|
|
1208
|
+
| Field | Meaning |
|
|
1209
|
+
| -------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1210
|
+
| `summary` | Thread counts by status: `{ open, resolved, ignored, superseded, archived }`. **`summary.open` is the number to check before composing the next round** |
|
|
1211
|
+
| `count` | How many threads came back — after `--status` and `--limit` |
|
|
1212
|
+
| `threads[].finding_key` | The stable correlation key of the finding **across rounds**. Reusing it in the next round updates the existing thread instead of creating a new one; `null` on human threads and on threads created before the key existed |
|
|
1213
|
+
| `threads[].status` | `open`, `resolved`, `ignored`, `superseded` or `archived`. An `ignored` finding must not be re-emitted. A resolved Blocker or Gap that the PRD still has is reopened by the next round (`threads_reopened`); a resolved Suggestion is not |
|
|
1214
|
+
| `threads[].archived_from_status` | The status an `archived` finding had when it left the panel — on publishing, skipping the Tech Review or restoring a version. `null` while not archived |
|
|
1215
|
+
| `threads[].messages[]` | The messages of the review rounds, authors already hydrated (`author`, `source`, `text`). The human conversation does not come: the state of the finding is the PM's decision, and it is what the next round needs |
|
|
1216
|
+
| `threads[].outdated` | `true` when the thread is anchored to a PRD version older than the current one |
|
|
1217
|
+
| `brief_version` | The current PRD version the review is being read against |
|
|
1181
1218
|
|
|
1182
1219
|
`submit` returns the round's outcome — this is what decides the next round:
|
|
1183
1220
|
|
|
1184
|
-
| Field | Meaning
|
|
1185
|
-
| ---------------------------------- |
|
|
1186
|
-
| `success` | Always `true` on a `0` exit. It says the round was accepted — **not** that anything was posted; see the counters below
|
|
1187
|
-
| `review_round` | Number of this round. It equals the artifact version of the envelope snapshot
|
|
1188
|
-
| `threads_created` | Findings that had no live thread — a new thread each
|
|
1189
|
-
| `threads_updated` | Findings matched to an **open** thread by `finding_key`: the round was appended and the PM's reply survived
|
|
1190
|
-
| `threads_reopened` | Blockers and Gaps the PM had **resolved** that this round emitted again — the PRD still has them, so the thread is open again
|
|
1191
|
-
| `threads_skipped_closed` | Findings the PM had already **ignored**, or resolved Suggestions. Nothing was posted for them, and they were not reopened — a normal outcome
|
|
1192
|
-
| `threads_superseded` | Threads that were open and did **not** come back in this round: the review considered them settled
|
|
1193
|
-
| `tech_review` | The badge written on the PRD: `none` (a clean review), `changes_requested_gaps` or `changes_requested_blocking`
|
|
1194
|
-
| `artifact_id` · `artifact_version` | The snapshot of the raw envelope kept as a phase artifact
|
|
1221
|
+
| Field | Meaning |
|
|
1222
|
+
| ---------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1223
|
+
| `success` | Always `true` on a `0` exit. It says the round was accepted — **not** that anything was posted; see the counters below |
|
|
1224
|
+
| `review_round` | Number of this round. It equals the artifact version of the envelope snapshot |
|
|
1225
|
+
| `threads_created` | Findings that had no live thread — a new thread each |
|
|
1226
|
+
| `threads_updated` | Findings matched to an **open** thread by `finding_key`: the round was appended and the PM's reply survived |
|
|
1227
|
+
| `threads_reopened` | Blockers and Gaps the PM had **resolved** that this round emitted again — the PRD still has them, so the thread is open again |
|
|
1228
|
+
| `threads_skipped_closed` | Findings the PM had already **ignored**, or resolved Suggestions. Nothing was posted for them, and they were not reopened — a normal outcome |
|
|
1229
|
+
| `threads_superseded` | Threads that were open and did **not** come back in this round: the review considered them settled |
|
|
1230
|
+
| `tech_review` | The badge written on the PRD: `none` (a clean review), `changes_requested_gaps` or `changes_requested_blocking` |
|
|
1231
|
+
| `artifact_id` · `artifact_version` | The snapshot of the raw envelope kept as a phase artifact |
|
|
1195
1232
|
|
|
1196
1233
|
`claim` and `release` return `{ job, runner_session }`:
|
|
1197
1234
|
|
|
1198
|
-
| Field | Meaning
|
|
1199
|
-
| ---------------- |
|
|
1235
|
+
| Field | Meaning |
|
|
1236
|
+
| ---------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1200
1237
|
| `job` | The request as the queue returned it on `claim` — `id` (the value of `--job-id`), `status`, `brief_version`, `work_item_ref`, … `null` on `claim` when the work item has no queued request: nothing to review. On `release`, the request of the claim with the fields the release resets: `status: "queued"`, `interactive: false`, and `claimed_by`, `runner_label`, `lease_until` and `started_at` `null`. `attempts` and `attempt_history` stay as the claim returned them — the server recalculates them and answers only `{ released: true }` |
|
|
1201
|
-
| `runner_session` | The session of the claim. `release` sends it back with the request, so the queue knows who gave it back. `null` when `claim` took nothing
|
|
1238
|
+
| `runner_session` | The session of the claim. `release` sends it back with the request, so the queue knows who gave it back. `null` when `claim` took nothing |
|
|
1202
1239
|
|
|
1203
1240
|
#### Exit codes
|
|
1204
1241
|
|
|
1205
1242
|
The general table above holds; this is how each condition maps to it:
|
|
1206
1243
|
|
|
1207
|
-
| Code | When
|
|
1208
|
-
| ---- |
|
|
1209
|
-
| `0` | The read-back ran — including a work item with no review at all — or the round was recorded, **including a round that posted nothing because every finding was already closed**; `claim` ran, **including when there was no request to take** (`job: null`); `release` gave the request back
|
|
1244
|
+
| Code | When |
|
|
1245
|
+
| ---- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
1246
|
+
| `0` | The read-back ran — including a work item with no review at all — or the round was recorded, **including a round that posted nothing because every finding was already closed**; `claim` ran, **including when there was no request to take** (`job: null`); `release` gave the request back |
|
|
1210
1247
|
| `1` | Missing `<ref>`/`--ref`; non-numeric `--limit`; unknown `--status` (`400`, refused by the server); no body (no file and no `--content`); file and `--content` together; unreadable file; directory not linked and no `--project-id`; **invalid envelope (`400`) — the response names the offending field, and nothing was written**; **round refused for its request — the `--job-id` request is not running for you, cancelled included (`400`, `prd_review_job_not_running`), no open request for the reviewed version (`400`, `prd_review_job_required`), or unknown request (`404`, `prd_review_job_not_found`) — and nothing was written**; `release` with no `claim` of that work item on this machine; no permission to edit work items (`403`, `submit`, `claim` and `release`); work item not found **or not visible to you** (`404` — the two are deliberately indistinguishable); any other API failure |
|
|
1211
|
-
| `2` | The API rejected the token (`401`) — run `productdock login` again
|
|
1248
|
+
| `2` | The API rejected the token (`401`) — run `productdock login` again |
|
|
1212
1249
|
|
|
1213
1250
|
### `productdock eval` — project evaluations
|
|
1214
1251
|
|
|
1215
1252
|
Served by the `/cli/evaluations` endpoints of the ProductDock API. They are the
|
|
1216
1253
|
same operations the MCP server exposes as the `submit_eval` tool (`eval submit`,
|
|
1217
|
-
the write), the `get_eval_report` tool (`eval latest`, the read)
|
|
1218
|
-
`list_eval_repositories` tool (`eval list`, the evaluated repositories)
|
|
1254
|
+
the write), the `get_eval_report` tool (`eval latest`, the read), the
|
|
1255
|
+
`list_eval_repositories` tool (`eval list`, the evaluated repositories) and the
|
|
1256
|
+
`get_eval_history` tool (`eval history`, the score history), and they
|
|
1219
1257
|
return the same body — the CLI and the MCP call the same code on the server, so
|
|
1220
1258
|
the envelope validation, the write and the report selection are one
|
|
1221
1259
|
implementation, not two.
|
|
@@ -1271,6 +1309,9 @@ productdock eval latest --type observability --repository productdock-api \
|
|
|
1271
1309
|
|
|
1272
1310
|
# Which repositories have a security evaluation — the keys --repository takes
|
|
1273
1311
|
productdock eval list --type security --json
|
|
1312
|
+
|
|
1313
|
+
# How the security score of one repository evolved — date, score and previous score
|
|
1314
|
+
productdock eval history --type security --repository productdock-api
|
|
1274
1315
|
```
|
|
1275
1316
|
|
|
1276
1317
|
The subcommand also accepts `--json` and `--project-id`, documented once at the
|
|
@@ -1285,7 +1326,7 @@ top of this section.
|
|
|
1285
1326
|
| Parameter | Description |
|
|
1286
1327
|
| -------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1287
1328
|
| `<file>` | **Required.** Path to the eval envelope on disk — the `latest.json` the eval skill writes. Read as UTF-8 and parsed locally: it must be a JSON **object** (`schema_version` 1.0). Malformed JSON, an array or a scalar fails locally (exit `1`) without a network call; everything inside the object is validated by the server |
|
|
1288
|
-
| `--repository-name <name>` | Label of the evaluated repository, used only when the envelope carries no `target.repositories`. There is no repository _id_ in this operation: the evaluation is project-level, so the `project.repository` of `productdock.json` is not sent, and `--repository-id` is refused (exit `1`, before any network call)
|
|
1329
|
+
| `--repository-name <name>` | Label of the evaluated repository, used only when the envelope carries no `target.repositories`. There is no repository _id_ in this operation: the evaluation is project-level, so the `project.repository` of `productdock.json` is not sent, and `--repository-id` is refused (exit `1`, before any network call) |
|
|
1289
1330
|
| `--out <file>` | Writes the response document to this file as well. The file gets the exact text `stdout` gets, written atomically |
|
|
1290
1331
|
|
|
1291
1332
|
#### Response format
|
|
@@ -1305,22 +1346,22 @@ under `data`:
|
|
|
1305
1346
|
|
|
1306
1347
|
Without `--json`, `stdout` stays empty and a one-line summary goes to `stderr`.
|
|
1307
1348
|
|
|
1308
|
-
| Field | Meaning
|
|
1309
|
-
| --------------- |
|
|
1310
|
-
| `success` | Always `true` on a `0` exit
|
|
1349
|
+
| Field | Meaning |
|
|
1350
|
+
| --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
1351
|
+
| `success` | Always `true` on a `0` exit |
|
|
1311
1352
|
| `evaluation_id` | Id of the project's "latest" evaluation for the `eval_type`. It is **stable across submissions** of the same `(project, eval_type)`; the submission itself is recorded as an execution of the history, whose id (`execution_id`) is what `eval latest` returns — the two are different ids |
|
|
1312
|
-
| `project_id` | The project the evaluation was recorded under — the one the server authorized, not the one you asked for
|
|
1313
|
-
| `eval_type` | `security`, `observability` or `frontend_quality`, read from the envelope
|
|
1353
|
+
| `project_id` | The project the evaluation was recorded under — the one the server authorized, not the one you asked for |
|
|
1354
|
+
| `eval_type` | `security`, `observability` or `frontend_quality`, read from the envelope |
|
|
1314
1355
|
|
|
1315
1356
|
#### Exit codes
|
|
1316
1357
|
|
|
1317
1358
|
The general table above holds; this is how each condition maps to it:
|
|
1318
1359
|
|
|
1319
|
-
| Code | When
|
|
1320
|
-
| ---- |
|
|
1321
|
-
| `0` | The evaluation was recorded
|
|
1360
|
+
| Code | When |
|
|
1361
|
+
| ---- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
1362
|
+
| `0` | The evaluation was recorded |
|
|
1322
1363
|
| `1` | Missing `<file>`; unreadable file; the file is not a JSON object; `--repository-id` given (refused before any network call — the repository comes from the envelope or `--repository-name`); directory not linked and no `--project-id`; **invalid envelope (`400`) — the response names the offending field, and nothing was written**; no access to the project (`403`); any other API failure |
|
|
1323
|
-
| `2` | The API rejected the token (`401`) — run `productdock login` again
|
|
1364
|
+
| `2` | The API rejected the token (`401`) — run `productdock login` again |
|
|
1324
1365
|
|
|
1325
1366
|
#### `productdock eval latest`
|
|
1326
1367
|
|
|
@@ -1360,16 +1401,16 @@ productdock eval latest --type security --execution-id <execution_id> --json
|
|
|
1360
1401
|
|
|
1361
1402
|
##### Parameters
|
|
1362
1403
|
|
|
1363
|
-
| Subcommand | Argument | Options
|
|
1364
|
-
| ---------- | -------- |
|
|
1365
|
-
| `latest` | — | `--type` · `--repository` · `--execution-id` · `--out`
|
|
1404
|
+
| Subcommand | Argument | Options |
|
|
1405
|
+
| ---------- | -------- | ------------------------------------------------------ |
|
|
1406
|
+
| `latest` | — | `--type` · `--repository` · `--execution-id` · `--out` |
|
|
1366
1407
|
|
|
1367
|
-
| Parameter | Description
|
|
1368
|
-
| --------------------- |
|
|
1408
|
+
| Parameter | Description |
|
|
1409
|
+
| --------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1369
1410
|
| `--type <eval_type>` | **Required.** `security`, `observability`, `frontend_quality` or `backend_quality`. Sent as typed — the list of types is the server's, and an unknown type comes back as a `400` naming the options |
|
|
1370
|
-
| `--repository <key>` | The `repository_key` of a previous answer: the latest execution of that repository. Not a UUID and not the `--repository-name` label
|
|
1371
|
-
| `--execution-id <id>` | The `execution_id` of a previous answer: that execution. It is **not** the `evaluation_id` that `eval submit` returns
|
|
1372
|
-
| `--out <file>` | Writes the response document to this file as well. The file gets the exact text `stdout` gets, written atomically
|
|
1411
|
+
| `--repository <key>` | The `repository_key` of a previous answer: the latest execution of that repository. Not a UUID and not the `--repository-name` label |
|
|
1412
|
+
| `--execution-id <id>` | The `execution_id` of a previous answer: that execution. It is **not** the `evaluation_id` that `eval submit` returns |
|
|
1413
|
+
| `--out <file>` | Writes the response document to this file as well. The file gets the exact text `stdout` gets, written atomically |
|
|
1373
1414
|
|
|
1374
1415
|
##### Response format
|
|
1375
1416
|
|
|
@@ -1395,11 +1436,11 @@ a trailing space in the label is visible and is not mistaken for the key.
|
|
|
1395
1436
|
`data` is the evaluation envelope as the eval skill submitted it (`eval_type`,
|
|
1396
1437
|
`score`, `rating`, `executed_at`, `dimensions`, `findings`, `counts`, …), plus:
|
|
1397
1438
|
|
|
1398
|
-
| Field | Meaning
|
|
1399
|
-
| ------------------ |
|
|
1400
|
-
| `execution_id` | Id of the execution that was read — the value `--execution-id` takes
|
|
1401
|
-
| `repository_key` | Key of the evaluated repository — the value `--repository` takes
|
|
1402
|
-
| `repository_label` | Label of the evaluated repository, as the skill sent it
|
|
1439
|
+
| Field | Meaning |
|
|
1440
|
+
| ------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1441
|
+
| `execution_id` | Id of the execution that was read — the value `--execution-id` takes |
|
|
1442
|
+
| `repository_key` | Key of the evaluated repository — the value `--repository` takes |
|
|
1443
|
+
| `repository_label` | Label of the evaluated repository, as the skill sent it |
|
|
1403
1444
|
| `view` | The findings as the Eval screen shows them: `categories` (dimension, label, score), `findings` (id, title, severity, category, `location` `{ file, line }`, linked `work_item`), `positives` and `totals` |
|
|
1404
1445
|
|
|
1405
1446
|
**No evaluation is a success, not an error.** When the project has no
|
|
@@ -1415,11 +1456,11 @@ may well have executions of other repositories — and points to
|
|
|
1415
1456
|
|
|
1416
1457
|
The general table above holds; this is how each condition maps to it:
|
|
1417
1458
|
|
|
1418
|
-
| Code | When
|
|
1419
|
-
| ---- |
|
|
1420
|
-
| `0` | The report was read — including no evaluation (`data: null`)
|
|
1459
|
+
| Code | When |
|
|
1460
|
+
| ---- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1461
|
+
| `0` | The report was read — including no evaluation (`data: null`) |
|
|
1421
1462
|
| `1` | Missing `--type`; `--repository-id` given (refused before any network call — use `--repository <key>`); directory not linked and no `--project-id`; invalid parameter (`400` — unknown `eval_type`, malformed `execution_id`); not a member of the project (`403` — `not_member`, or `project_membership_required` with only "Ver todos os projetos"); any other API failure |
|
|
1422
|
-
| `2` | The API rejected the token (`401`) — run `productdock login` again
|
|
1463
|
+
| `2` | The API rejected the token (`401`) — run `productdock login` again |
|
|
1423
1464
|
|
|
1424
1465
|
#### `productdock eval list`
|
|
1425
1466
|
|
|
@@ -1450,14 +1491,14 @@ productdock eval list --type observability --json --out eval-repositories.json
|
|
|
1450
1491
|
|
|
1451
1492
|
##### Parameters
|
|
1452
1493
|
|
|
1453
|
-
| Subcommand | Argument | Options
|
|
1454
|
-
| ---------- | -------- |
|
|
1455
|
-
| `list` | — | `--type` · `--out`
|
|
1494
|
+
| Subcommand | Argument | Options |
|
|
1495
|
+
| ---------- | -------- | ------------------ |
|
|
1496
|
+
| `list` | — | `--type` · `--out` |
|
|
1456
1497
|
|
|
1457
|
-
| Parameter | Description
|
|
1458
|
-
| -------------------- |
|
|
1498
|
+
| Parameter | Description |
|
|
1499
|
+
| -------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1459
1500
|
| `--type <eval_type>` | **Required.** `security`, `observability`, `frontend_quality` or `backend_quality`. Sent as typed — the list of types is the server's, and an unknown type comes back as a `400` naming the options |
|
|
1460
|
-
| `--out <file>` | Writes the response document to this file as well. The file gets the exact text `stdout` gets, written atomically
|
|
1501
|
+
| `--out <file>` | Writes the response document to this file as well. The file gets the exact text `stdout` gets, written atomically |
|
|
1461
1502
|
|
|
1462
1503
|
##### Response format
|
|
1463
1504
|
|
|
@@ -1479,12 +1520,12 @@ per repository — key, label, number of executions and the date of the latest.
|
|
|
1479
1520
|
|
|
1480
1521
|
`data` is an array, the repository of the most recent execution first:
|
|
1481
1522
|
|
|
1482
|
-
| Field | Meaning
|
|
1483
|
-
| ---------------- |
|
|
1484
|
-
| `key` | The `repository_key` — the value `eval latest --repository` takes
|
|
1523
|
+
| Field | Meaning |
|
|
1524
|
+
| ---------------- | ------------------------------------------------------------------------------------------------ |
|
|
1525
|
+
| `key` | The `repository_key` — the value `eval latest --repository` takes |
|
|
1485
1526
|
| `label` | Label of the repository in its most recent execution; `sem repositório` when the skill sent none |
|
|
1486
|
-
| `executionCount` | How many executions of the type the repository has
|
|
1487
|
-
| `lastExecutedAt` | `executed_at` of its most recent execution
|
|
1527
|
+
| `executionCount` | How many executions of the type the repository has |
|
|
1528
|
+
| `lastExecutedAt` | `executed_at` of its most recent execution |
|
|
1488
1529
|
|
|
1489
1530
|
**Nothing evaluated is a success, not an error.** When the project has no
|
|
1490
1531
|
evaluation of that type, the API answers `200` with `[]`: `data` is `[]`, the
|
|
@@ -1494,11 +1535,101 @@ exit code is `0`, and the summary on `stderr` says no repository was evaluated.
|
|
|
1494
1535
|
|
|
1495
1536
|
The general table above holds; this is how each condition maps to it:
|
|
1496
1537
|
|
|
1497
|
-
| Code | When
|
|
1498
|
-
| ---- |
|
|
1499
|
-
| `0` | The list was read — including an empty one (`data: []`)
|
|
1538
|
+
| Code | When |
|
|
1539
|
+
| ---- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1540
|
+
| `0` | The list was read — including an empty one (`data: []`) |
|
|
1500
1541
|
| `1` | Missing `--type`; `--repository-id` given (refused before any network call); directory not linked and no `--project-id`; unknown `eval_type` (`400`); not a member of the project (`403` — `not_member`, or `project_membership_required` with only "Ver todos os projetos"); any other API failure |
|
|
1501
|
-
| `2` | The API rejected the token (`401`) — run `productdock login` again
|
|
1542
|
+
| `2` | The API rejected the token (`401`) — run `productdock login` again |
|
|
1543
|
+
|
|
1544
|
+
#### `productdock eval history`
|
|
1545
|
+
|
|
1546
|
+
Shows the executions of one `eval_type` for **one** repository of the project,
|
|
1547
|
+
oldest first — each with its date, its score and the score of the execution
|
|
1548
|
+
before it. Served by `GET /cli/evaluations/history`; it is the same operation
|
|
1549
|
+
the MCP server exposes as the `get_eval_history` tool, and it returns the same
|
|
1550
|
+
body — the one the score chart of the Eval screen gets.
|
|
1551
|
+
|
|
1552
|
+
Without `--repository`, the repository is the one of the most recent execution
|
|
1553
|
+
of the type — the `project.repository` of `productdock.json` does **not** go
|
|
1554
|
+
along. `--repository` takes the `repository_key` that `eval list` returns; it
|
|
1555
|
+
is sent as is, not normalized. One repository per call: run it once per key to
|
|
1556
|
+
compare repositories.
|
|
1557
|
+
|
|
1558
|
+
**Only members of the project read it**, exactly as `eval latest`: a portal
|
|
1559
|
+
client, a non-member and someone who only has "Ver todos os projetos" get a
|
|
1560
|
+
`403` — `not_member` for the first two, `project_membership_required` for the
|
|
1561
|
+
third — and the server reads as you, with your token. `--repository-id` is
|
|
1562
|
+
refused exactly as in `eval latest`: exit `1` before any network call.
|
|
1563
|
+
|
|
1564
|
+
```bash
|
|
1565
|
+
# The last 10 executions of the repository of the latest security evaluation
|
|
1566
|
+
productdock eval history --type security
|
|
1567
|
+
|
|
1568
|
+
# The whole history of one repository, machine-readable, saved to a file
|
|
1569
|
+
productdock eval history --type observability --repository productdock-api \
|
|
1570
|
+
--limit all --json --out eval-history.json
|
|
1571
|
+
|
|
1572
|
+
# The 5 executions up to (and including) one execution
|
|
1573
|
+
productdock eval history --type security --limit 5 --until <execution_id> --json
|
|
1574
|
+
```
|
|
1575
|
+
|
|
1576
|
+
##### Parameters
|
|
1577
|
+
|
|
1578
|
+
| Subcommand | Argument | Options |
|
|
1579
|
+
| ---------- | -------- | --------------------------------------------------------------- |
|
|
1580
|
+
| `history` | — | `--type` · `--repository` · `--limit` · `--until` · `--out` |
|
|
1581
|
+
|
|
1582
|
+
| Parameter | Description |
|
|
1583
|
+
| ------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1584
|
+
| `--type <eval_type>` | **Required.** `security`, `observability`, `frontend_quality` or `backend_quality`. Sent as typed — the list of types is the server's, and an unknown type comes back as a `400` naming the options |
|
|
1585
|
+
| `--repository <key>` | The `repository_key` of a previous answer (`eval list`): that repository. Without it, the repository of the most recent execution of the type |
|
|
1586
|
+
| `--limit <n\|all>` | How many executions, the most recent ones: an integer from `1` to `200`, or `all` for the whole history. Default `10`. Sent as typed — a value out of range comes back as a `400` |
|
|
1587
|
+
| `--until <execution_id>` | The id of an execution of that repository: the history ends there, inclusive, without the later ones. An id that is not an execution of the project, type and repository is a `404` |
|
|
1588
|
+
| `--out <file>` | Writes the response document to this file as well. The file gets the exact text `stdout` gets, written atomically |
|
|
1589
|
+
|
|
1590
|
+
##### Response format
|
|
1591
|
+
|
|
1592
|
+
Under `--json`, `stdout` carries one document with the API response untouched
|
|
1593
|
+
under `data`:
|
|
1594
|
+
|
|
1595
|
+
```jsonc
|
|
1596
|
+
{
|
|
1597
|
+
"ok": true,
|
|
1598
|
+
"operation": "get_eval_history",
|
|
1599
|
+
"data": {
|
|
1600
|
+
/* the body below */
|
|
1601
|
+
},
|
|
1602
|
+
}
|
|
1603
|
+
```
|
|
1604
|
+
|
|
1605
|
+
Without `--json`, `stdout` stays empty and a summary goes to `stderr`: the
|
|
1606
|
+
repository, then one line per execution — date, score, previous score and the
|
|
1607
|
+
execution id.
|
|
1608
|
+
|
|
1609
|
+
| Field | Meaning |
|
|
1610
|
+
| ------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1611
|
+
| `repository_key` | Key of the repository the history belongs to — the value `--repository` takes; `null` when there is no execution |
|
|
1612
|
+
| `repository_label` | Label of the repository in its most recent execution; `null` when there is no execution |
|
|
1613
|
+
| `runs` | The executions, oldest first: `id` (the `execution_id` that `eval latest --execution-id` and `--until` take), `executed_at`, `score` and `previous_score` |
|
|
1614
|
+
| `previous_score` | Score of the execution right before, of the same repository — **even when it is outside the returned window**; `null` only for the first execution of the history |
|
|
1615
|
+
|
|
1616
|
+
There is no `rating` in this answer: read one execution with
|
|
1617
|
+
`productdock eval latest --execution-id <id>` for it.
|
|
1618
|
+
|
|
1619
|
+
**No execution is a success, not an error.** When the project has no execution
|
|
1620
|
+
of that type (or of that repository), the API answers `200` with `runs: []` and
|
|
1621
|
+
both keys `null`: the exit code is `0`, and the summary on `stderr` says no
|
|
1622
|
+
execution was found.
|
|
1623
|
+
|
|
1624
|
+
##### Exit codes
|
|
1625
|
+
|
|
1626
|
+
The general table above holds; this is how each condition maps to it:
|
|
1627
|
+
|
|
1628
|
+
| Code | When |
|
|
1629
|
+
| ---- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1630
|
+
| `0` | The history was read — including an empty one (`runs: []`) |
|
|
1631
|
+
| `1` | Missing `--type`; `--repository-id` given (refused before any network call — use `--repository <key>`); directory not linked and no `--project-id`; invalid parameter (`400` — unknown `eval_type`, `--limit` out of range, malformed `--until`); `--until` not an execution of that repository (`404` — `evaluation_run_not_found`); not a member of the project (`403` — `not_member`, or `project_membership_required` with only "Ver todos os projetos"); any other API failure |
|
|
1632
|
+
| `2` | The API rejected the token (`401`) — run `productdock login` again |
|
|
1502
1633
|
|
|
1503
1634
|
### `productdock test-report` — test suite reports
|
|
1504
1635
|
|
|
@@ -1553,11 +1684,11 @@ The subcommand also accepts `--json`, documented once at the top of
|
|
|
1553
1684
|
| --------------- | -------- | ------------------------ |
|
|
1554
1685
|
| `submit <file>` | `<file>` | `--project-id` · `--out` |
|
|
1555
1686
|
|
|
1556
|
-
| Parameter | Description
|
|
1557
|
-
| --------------------- |
|
|
1687
|
+
| Parameter | Description |
|
|
1688
|
+
| --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
1558
1689
|
| `<file>` | **Required.** Path to the test suite report on disk. Read as UTF-8 and parsed locally: it must be a JSON **object**. Malformed JSON, an array or a scalar fails locally (exit `1`) without a network call; everything inside the object is validated by the server |
|
|
1559
|
-
| `--project-id <uuid>` | Project the execution is recorded under — overrides `project.id` of `productdock.json`, for this call only. There is no repository in this operation: `--repository-id` is refused (exit `1`, before any network call)
|
|
1560
|
-
| `--out <file>` | Writes the response document to this file as well. The file gets the exact text `stdout` gets, written atomically
|
|
1690
|
+
| `--project-id <uuid>` | Project the execution is recorded under — overrides `project.id` of `productdock.json`, for this call only. There is no repository in this operation: `--repository-id` is refused (exit `1`, before any network call) |
|
|
1691
|
+
| `--out <file>` | Writes the response document to this file as well. The file gets the exact text `stdout` gets, written atomically |
|
|
1561
1692
|
|
|
1562
1693
|
#### Response format
|
|
1563
1694
|
|
|
@@ -1576,21 +1707,162 @@ under `data`:
|
|
|
1576
1707
|
|
|
1577
1708
|
Without `--json`, `stdout` stays empty and a one-line summary goes to `stderr`.
|
|
1578
1709
|
|
|
1579
|
-
| Field | Meaning
|
|
1580
|
-
| ------------ |
|
|
1581
|
-
| `id` | Id of the execution
|
|
1582
|
-
| `run_number` | Number of the execution in the project's history
|
|
1710
|
+
| Field | Meaning |
|
|
1711
|
+
| ------------ | ---------------------------------------------------------------------------------------------------------------- |
|
|
1712
|
+
| `id` | Id of the execution |
|
|
1713
|
+
| `run_number` | Number of the execution in the project's history |
|
|
1583
1714
|
| `created` | `true` when the submission added an execution; `false` when it updated one already recorded with the same report |
|
|
1584
1715
|
|
|
1585
1716
|
#### Exit codes
|
|
1586
1717
|
|
|
1587
1718
|
The general table above holds; this is how each condition maps to it:
|
|
1588
1719
|
|
|
1589
|
-
| Code | When
|
|
1590
|
-
| ---- |
|
|
1591
|
-
| `0` | The execution was recorded
|
|
1720
|
+
| Code | When |
|
|
1721
|
+
| ---- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1722
|
+
| `0` | The execution was recorded |
|
|
1592
1723
|
| `1` | Missing `<file>`; unreadable file; the file is not a JSON object; `--repository-id` given (refused before any network call); directory not linked and no `--project-id`; **invalid report (`400`) — the response names the offending field, and nothing was written**; not a member of the project (`403`); report above the server's size limit (`413`) — one message, with the size that was sent; any other API failure |
|
|
1593
|
-
| `2` | The API rejected the token (`401`) — run `productdock login` again
|
|
1724
|
+
| `2` | The API rejected the token (`401`) — run `productdock login` again |
|
|
1725
|
+
|
|
1726
|
+
### `productdock sprint` — project sprints
|
|
1727
|
+
|
|
1728
|
+
Served by `GET /cli/sprints` and `GET /cli/work-items` of the ProductDock API.
|
|
1729
|
+
They are the same operations the MCP server exposes as the `list_sprints` tool
|
|
1730
|
+
(`sprint list`) and the `list_work_items` tool with its `sprint_id` filter
|
|
1731
|
+
(`sprint items`), and they return the same body — the CLI and the MCP call the
|
|
1732
|
+
same code on the server.
|
|
1733
|
+
|
|
1734
|
+
**A sprint belongs to the project.** Neither command sends a repository: the
|
|
1735
|
+
`project.repository` of `productdock.json` does **not** go along, and
|
|
1736
|
+
`--repository-id` is refused — exit `1` before any network call. That is what
|
|
1737
|
+
makes `sprint items` list every work item of the sprint, and not only the ones
|
|
1738
|
+
of the linked repository.
|
|
1739
|
+
|
|
1740
|
+
**Reading requires access to the project** — the same rule as `wi list`: a
|
|
1741
|
+
call from someone with no access exits `1` with a `403`.
|
|
1742
|
+
|
|
1743
|
+
```bash
|
|
1744
|
+
# The sprints of the linked project — the current one is marked
|
|
1745
|
+
productdock sprint list
|
|
1746
|
+
|
|
1747
|
+
# Machine-readable, saved to a file — the id of each sprint is what `items` takes
|
|
1748
|
+
productdock sprint list --json --out sprints.json
|
|
1749
|
+
|
|
1750
|
+
# The work items of one sprint, by its id (UUID)
|
|
1751
|
+
productdock sprint items 5a5a5a5a-1111-4111-8111-5a5a5a5a5a5a --json
|
|
1752
|
+
```
|
|
1753
|
+
|
|
1754
|
+
Both subcommands also accept `--json` and `--project-id`, documented once at
|
|
1755
|
+
the top of [Commands](#commands).
|
|
1756
|
+
|
|
1757
|
+
#### `productdock sprint list`
|
|
1758
|
+
|
|
1759
|
+
Lists every sprint of the project, ordered by number — no pagination.
|
|
1760
|
+
|
|
1761
|
+
##### Parameters
|
|
1762
|
+
|
|
1763
|
+
| Subcommand | Argument | Options |
|
|
1764
|
+
| ---------- | -------- | ------------------------ |
|
|
1765
|
+
| `list` | — | `--project-id` · `--out` |
|
|
1766
|
+
|
|
1767
|
+
| Parameter | Description |
|
|
1768
|
+
| --------------------- | ---------------------------------------------------------------------------------------------------------------- |
|
|
1769
|
+
| `--project-id <uuid>` | Project whose sprints are listed — overrides `project.id` of `productdock.json`, for this call only |
|
|
1770
|
+
| `--out <file>` | Writes the response document to this file as well. The file gets the exact text `stdout` gets, written atomically |
|
|
1771
|
+
|
|
1772
|
+
##### Response format
|
|
1773
|
+
|
|
1774
|
+
Under `--json`, `stdout` carries one document with the API response untouched
|
|
1775
|
+
under `data`:
|
|
1776
|
+
|
|
1777
|
+
```jsonc
|
|
1778
|
+
{
|
|
1779
|
+
"ok": true,
|
|
1780
|
+
"operation": "list_sprints",
|
|
1781
|
+
"data": {
|
|
1782
|
+
/* the body below */
|
|
1783
|
+
},
|
|
1784
|
+
}
|
|
1785
|
+
```
|
|
1786
|
+
|
|
1787
|
+
Without `--json`, `stdout` stays empty and a summary goes to `stderr`: one line
|
|
1788
|
+
per sprint — number, name, status, dates and id —, the current one marked.
|
|
1789
|
+
|
|
1790
|
+
| Field | Meaning |
|
|
1791
|
+
| ----------------- | ------------------------------------------------------------------------------------------------------------ |
|
|
1792
|
+
| `project_id` | The project the sprints belong to |
|
|
1793
|
+
| `sprints_enabled` | Whether the Sprints module is on in the project. Off, the sprints already created are still listed |
|
|
1794
|
+
| `sprints` | One entry per sprint, by `number` |
|
|
1795
|
+
| `sprints[].id` | The sprint's UUID — the `<id>` that `sprint items` takes |
|
|
1796
|
+
| `sprints[].number`, `name`, `start_date`, `end_date`, `goal` | Number, name, dates (`YYYY-MM-DD`) and goal (`null` when none) |
|
|
1797
|
+
| `sprints[].status`, `status_label` | `planned`, `active` or `closed`, and the label the Sprints screen shows (Planejada, Ativa, Encerrada) |
|
|
1798
|
+
| `sprints[].is_current` | `true` for the active sprint |
|
|
1799
|
+
| `sprints[].started_at`, `closed_at` | When the sprint was started and closed on the platform; `null` until it happens |
|
|
1800
|
+
|
|
1801
|
+
**No sprint is a success, not an error.** A project without sprints answers
|
|
1802
|
+
`200` with `sprints: []`, and a project with the module off answers `200` with
|
|
1803
|
+
`sprints_enabled: false`: the exit code is `0` in both, and the summary on
|
|
1804
|
+
`stderr` says so.
|
|
1805
|
+
|
|
1806
|
+
##### Exit codes
|
|
1807
|
+
|
|
1808
|
+
The general table above holds; this is how each condition maps to it:
|
|
1809
|
+
|
|
1810
|
+
| Code | When |
|
|
1811
|
+
| ---- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
1812
|
+
| `0` | The sprints were read — including none (`sprints: []`) and the module off (`sprints_enabled: false`) |
|
|
1813
|
+
| `1` | `--repository-id` given (refused before any network call); directory not linked and no `--project-id`; no access to the project (`403`); any other API failure |
|
|
1814
|
+
| `2` | The API rejected the token (`401`) — run `productdock login` again |
|
|
1815
|
+
|
|
1816
|
+
#### `productdock sprint items`
|
|
1817
|
+
|
|
1818
|
+
Lists the work items currently assigned to one sprint — by its `id`, the UUID
|
|
1819
|
+
`sprint list` returns; a number or a name is not accepted. Served by
|
|
1820
|
+
`GET /cli/work-items?sprint_id=<id>`, with the response of `wi list`: the same
|
|
1821
|
+
cap of 100 items, with `has_more`.
|
|
1822
|
+
|
|
1823
|
+
##### Parameters
|
|
1824
|
+
|
|
1825
|
+
| Subcommand | Argument | Options |
|
|
1826
|
+
| ------------ | -------- | ------------------------ |
|
|
1827
|
+
| `items <id>` | `<id>` | `--project-id` · `--out` |
|
|
1828
|
+
|
|
1829
|
+
| Parameter | Description |
|
|
1830
|
+
| --------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1831
|
+
| `<id>` | **Required.** The sprint's id (UUID), as `sprint list` returns it. Missing, it fails locally (exit `1`) without a network call; the format is checked by the server |
|
|
1832
|
+
| `--project-id <uuid>` | Project the sprint belongs to — overrides `project.id` of `productdock.json`, for this call only |
|
|
1833
|
+
| `--out <file>` | Writes the response document to this file as well. The file gets the exact text `stdout` gets, written atomically |
|
|
1834
|
+
|
|
1835
|
+
##### Response format
|
|
1836
|
+
|
|
1837
|
+
Under `--json`, `stdout` carries one document with the API response untouched
|
|
1838
|
+
under `data`:
|
|
1839
|
+
|
|
1840
|
+
```jsonc
|
|
1841
|
+
{
|
|
1842
|
+
"ok": true,
|
|
1843
|
+
"operation": "list_work_items",
|
|
1844
|
+
"data": {
|
|
1845
|
+
/* the body of `wi list`, only with the items of the sprint */
|
|
1846
|
+
},
|
|
1847
|
+
}
|
|
1848
|
+
```
|
|
1849
|
+
|
|
1850
|
+
Without `--json`, `stdout` stays empty and a summary goes to `stderr`: one line
|
|
1851
|
+
per work item — reference, status, assignee and title.
|
|
1852
|
+
|
|
1853
|
+
`data` is the body `wi list` gets — `project_id`, `work_item_prefix`,
|
|
1854
|
+
`has_more` and `items` —, only with the items of the sprint. **A sprint with no
|
|
1855
|
+
work item is a success**: `items` is `[]` and the exit code is `0`.
|
|
1856
|
+
|
|
1857
|
+
##### Exit codes
|
|
1858
|
+
|
|
1859
|
+
The general table above holds; this is how each condition maps to it:
|
|
1860
|
+
|
|
1861
|
+
| Code | When |
|
|
1862
|
+
| ---- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1863
|
+
| `0` | The work items were read — including none (`items: []`) |
|
|
1864
|
+
| `1` | Missing `<id>`; `--repository-id` given (refused before any network call); directory not linked and no `--project-id`; malformed id (`400`, naming `sprint_id`); sprint not found in the project (`404` — `sprint_not_found`); no access to the project (`403`); any other API failure |
|
|
1865
|
+
| `2` | The API rejected the token (`401`) — run `productdock login` again |
|
|
1594
1866
|
|
|
1595
1867
|
### `productdock state` — the SDLC state of a work item
|
|
1596
1868
|
|
|
@@ -1683,7 +1955,7 @@ the same work item, with no error anywhere — cannot happen by accident.
|
|
|
1683
1955
|
| ------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1684
1956
|
| `<ref>` | **Required** on `phase`. The work item — `PREFIX-N` (`PROD-168`), a number, a UUID or a title |
|
|
1685
1957
|
| `--ref <ref>` | **Required** on `update`. Same four formats. It is a flag, not a positional, so its order with the body file can never be swapped |
|
|
1686
|
-
| `--type <type>` | **Required** on `update`. The kind of update: `decision`, `blocker`, `lesson`, `review`, `phase_change`, `phase_progress`, `flow_change`. Sent as-is: the enum belongs to the server, which rejects what it does not know and lists the options
|
|
1958
|
+
| `--type <type>` | **Required** on `update`. The kind of update: `decision`, `blocker`, `lesson`, `review`, `phase_change`, `phase_progress`, `flow_change`. Sent as-is: the enum belongs to the server, which rejects what it does not know and lists the options |
|
|
1687
1959
|
| `[file]` | Path to the update body on disk. Read as UTF-8 and parsed locally: it must be a JSON **object**. Malformed JSON, an array or a scalar fails locally (exit `1`) without a network call; the keys inside are the server's business |
|
|
1688
1960
|
| `--content <json>` | The same body inline. Passing the file **and** `--content` is refused, not resolved by precedence: they are the same choice with different answers. Neither one is required — an update may have no body at all, and an empty `{}` is not invented here |
|
|
1689
1961
|
| `--dry-run` | Validates the body server-side — the same schema check, the same refusals, the same numbering — and writes **nothing**. It exists because probing the schema against a real work item created one entry per attempt, and the CLI offers no way to read or delete a decision or a lesson. The response carries `dry_run: true` and `would_apply` in place of `applied` |
|
|
@@ -1853,14 +2125,14 @@ gives the request back to the queue (`release`) and exits — both with `0`.
|
|
|
1853
2125
|
|
|
1854
2126
|
#### Parameters
|
|
1855
2127
|
|
|
1856
|
-
| Flag | Description
|
|
1857
|
-
| ---------------------- |
|
|
1858
|
-
| `--project-id <uuid>` | Project to serve — overrides `project.id` of `productdock.json`
|
|
1859
|
-
| `--mine` | Only work items assigned to you. Filtered by the server, in the claim
|
|
1860
|
-
| `--confirm` | Ask before each run — needs a terminal. Declining gives the request back to the queue, and this session does not receive it again
|
|
2128
|
+
| Flag | Description |
|
|
2129
|
+
| ---------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
2130
|
+
| `--project-id <uuid>` | Project to serve — overrides `project.id` of `productdock.json` |
|
|
2131
|
+
| `--mine` | Only work items assigned to you. Filtered by the server, in the claim |
|
|
2132
|
+
| `--confirm` | Ask before each run — needs a terminal. Declining gives the request back to the queue, and this session does not receive it again |
|
|
1861
2133
|
| `--interval <seconds>` | Seconds between queue polls while idle — a positive integer, `10` by default. A non-numeric value is refused (exit `1`). When polls fail in a row (API down, gateway `504`, no answer within 20 s), the wait doubles after each failure up to 2 minutes, and returns to the interval on the first poll that answers |
|
|
1862
|
-
| `--follow` | Print what Claude does in each stage, live — one line per tool call (file read, search, command, subagent, file written)
|
|
1863
|
-
| `--json` | One JSON event per line on `stdout` (NDJSON); prose and the questions of the first run and `--confirm` on `stderr`
|
|
2134
|
+
| `--follow` | Print what Claude does in each stage, live — one line per tool call (file read, search, command, subagent, file written) |
|
|
2135
|
+
| `--json` | One JSON event per line on `stdout` (NDJSON); prose and the questions of the first run and `--confirm` on `stderr` |
|
|
1864
2136
|
|
|
1865
2137
|
#### Response format
|
|
1866
2138
|
|
|
@@ -1868,16 +2140,16 @@ Without `--json`, `stdout` stays empty and each round is reported on `stderr`:
|
|
|
1868
2140
|
the request in progress, the outcome and its duration (and turns). Under
|
|
1869
2141
|
`--json`, one event per line:
|
|
1870
2142
|
|
|
1871
|
-
| `event` | When
|
|
1872
|
-
| ----------------- |
|
|
1873
|
-
| `watch_started` | The runner is up — `project_id`, `runner_label`, `model`, `only_assigned`, `confirm`, `follow`, `skill_version`
|
|
1874
|
-
| `job_started` | A request was taken — `job_id`, `work_item_ref`, `brief_version`, `title`, `skill_version` (the `SKILL.md` version copied into the round)
|
|
1875
|
-
| `job_released` | A request declined under `--confirm` went back to the queue
|
|
2143
|
+
| `event` | When |
|
|
2144
|
+
| ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
2145
|
+
| `watch_started` | The runner is up — `project_id`, `runner_label`, `model`, `only_assigned`, `confirm`, `follow`, `skill_version` |
|
|
2146
|
+
| `job_started` | A request was taken — `job_id`, `work_item_ref`, `brief_version`, `title`, `skill_version` (the `SKILL.md` version copied into the round) |
|
|
2147
|
+
| `job_released` | A request declined under `--confirm` went back to the queue |
|
|
1876
2148
|
| `job_finished` | The round ended — `outcome` (`completed`, `failed`, `discarded`, `released`), `duration_ms`, `turns`, and the verdict counts (`tech_pending`, or the `tech_decisions` of a 2.3.0 skill) or the `error` |
|
|
1877
|
-
| `activity` | Only with `--follow` — one action of Claude: `job_id`, `stage` (`A`/`B`), `kind` (`tool`/`text`), `tool`, `detail`
|
|
1878
|
-
| `warning` | Something that did not end the round — a failed heartbeat, an unreachable queue
|
|
1879
|
-
| `queue_recovered` | The queue answered again after failed polls — `failures` (how many in a row)
|
|
1880
|
-
| `stopping` | The first Ctrl+C
|
|
2149
|
+
| `activity` | Only with `--follow` — one action of Claude: `job_id`, `stage` (`A`/`B`), `kind` (`tool`/`text`), `tool`, `detail` |
|
|
2150
|
+
| `warning` | Something that did not end the round — a failed heartbeat, an unreachable queue |
|
|
2151
|
+
| `queue_recovered` | The queue answered again after failed polls — `failures` (how many in a row) |
|
|
2152
|
+
| `stopping` | The first Ctrl+C |
|
|
1881
2153
|
|
|
1882
2154
|
The last line is the closing document — `{ "ok": true, "event": "watch_stopped", "rounds": n }`,
|
|
1883
2155
|
or the error document.
|
|
@@ -1886,11 +2158,11 @@ or the error document.
|
|
|
1886
2158
|
|
|
1887
2159
|
The general table above holds; this is how each condition maps to it:
|
|
1888
2160
|
|
|
1889
|
-
| Code | When
|
|
1890
|
-
| ---- |
|
|
1891
|
-
| `0` | The runner was stopped with Ctrl+C — once or twice
|
|
2161
|
+
| Code | When |
|
|
2162
|
+
| ---- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
2163
|
+
| `0` | The runner was stopped with Ctrl+C — once or twice |
|
|
1892
2164
|
| `1` | Directory not linked and no `--project-id` (no network call is made); no terminal (`--json` included) with no model stored yet, or with `--confirm`; not inside a Git repository; `claude` not on the `PATH`; `pd-workflow` not installed; non-numeric `--interval`; the queue refused the call for good — no permission on the project (`403`), bad request (`400`) |
|
|
1893
|
-
| `2` | No CLI session, or the API rejected the token (`401`) — run `productdock login` again
|
|
2165
|
+
| `2` | No CLI session, or the API rejected the token (`401`) — run `productdock login` again |
|
|
1894
2166
|
|
|
1895
2167
|
### `productdock doctor`
|
|
1896
2168
|
|
|
@@ -1905,17 +2177,29 @@ productdock doctor --fix
|
|
|
1905
2177
|
|
|
1906
2178
|
Checks performed:
|
|
1907
2179
|
|
|
1908
|
-
1.
|
|
1909
|
-
|
|
1910
|
-
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
|
|
2180
|
+
1. The running CLI is on the `latest` version published to npm (`@softdesignbrasil/productdock-cli`) — an older one,
|
|
2181
|
+
or a failed lookup (3s timeout), is a warning. `--fix` does not update the CLI, since only you know whether it was
|
|
2182
|
+
installed with `npm install -g`, `npx` or a binary; it prints `npm install -g @softdesignbrasil/productdock-cli@latest`
|
|
2183
|
+
2. `~/.productdock/credentials.json` exists and is valid
|
|
2184
|
+
3. Access token is renewable (refresh token not expired)
|
|
2185
|
+
4. `productdock.json` exists with an IDE list
|
|
2186
|
+
5. The directory is linked to a ProductDock project
|
|
2187
|
+
6. MCP server is reachable — only checked when the MCP is in use
|
|
2188
|
+
7. MCP config files exist for each configured IDE, point at the correct URL and carry the project and repository of the
|
|
1914
2189
|
current link — after re-linking to another repository, `--fix` rewrites them. The MCP is legacy and optional: in a
|
|
1915
2190
|
directory that never configured it (no `mcp` in `productdock.json`, no `productdock` entry in any IDE file, as after
|
|
1916
|
-
`link --no-install-mcp`) this check passes and `--fix` does not install it
|
|
1917
|
-
|
|
1918
|
-
8.
|
|
2191
|
+
`link --no-install-mcp`) this check passes and `--fix` does not install it. MCP problems (6 and 7) are reported as
|
|
2192
|
+
warnings, never errors
|
|
2193
|
+
8. `AI_TOOLS_BRANCH` is not silently overriding the skill/agent source
|
|
2194
|
+
9. Every skill and agent recorded in `productdock.json` is installed on disk — a skill folder without its `SKILL.md`, or an empty agent file, counts as missing
|
|
2195
|
+
10. Installed skills and agents are on the registry's latest version — a newer one is a warning, and `--fix` updates it
|
|
2196
|
+
(skipping any skill modified locally, as `skill update` does)
|
|
2197
|
+
|
|
2198
|
+
Outside `doctor`, any command run by a human in a terminal ends with a one-line notice when installed skills or agents
|
|
2199
|
+
have a newer version (`productdock skill update` / `productdock agent update`). The registry is queried at most once a
|
|
2200
|
+
day per project (cached in `~/.productdock/update-check.json`) with a 3s timeout; the notice goes to `stderr` and is
|
|
2201
|
+
never shown under `--json`, without a TTY (the IDE agent calling the CLI), for `skill`/`agent`/`doctor`/`login`/`init`/
|
|
2202
|
+
`link`/`watch`, or when `PRODUCTDOCK_NO_UPDATE_CHECK` is set. A failed check is silent.
|
|
1919
2203
|
|
|
1920
2204
|
---
|
|
1921
2205
|
|
|
@@ -2024,12 +2308,14 @@ productdock login IDE (Claude Code / Cursor / VS Code)
|
|
|
2024
2308
|
|
|
2025
2309
|
All optional — defaults point at production.
|
|
2026
2310
|
|
|
2027
|
-
| Variable | Default | Description
|
|
2028
|
-
| -------------------------- | ------------------------------------------------ |
|
|
2029
|
-
| `PRODUCTDOCK_API_URL` | `https://productdock-api.softdesign.com.br` | ProductDock API base URL — root of the OAuth (`/oauth/*`) and project (`/cli/*`) endpoints
|
|
2030
|
-
| `PRODUCTDOCK_MCP_URL` | `<PRODUCTDOCK_API_URL>/mcp` | MCP server URL, written into each IDE config by `mcp setup`. Legacy: when it is set and `PRODUCTDOCK_API_URL` is not, this value minus the `/mcp` suffix becomes the API base
|
|
2031
|
-
| `PRODUCTDOCK_REGISTRY_URL` | `https://productdock-core-api.softdesign.com.br` | Skill and agent registry URL
|
|
2032
|
-
| `AI_TOOLS_BRANCH` | _(registry default branch, `main`)_ | Resolve skills and agents from this `ai-tools` branch. Setting it to `main` is the same as not setting it
|
|
2311
|
+
| Variable | Default | Description |
|
|
2312
|
+
| -------------------------- | ------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
2313
|
+
| `PRODUCTDOCK_API_URL` | `https://productdock-api.softdesign.com.br` | ProductDock API base URL — root of the OAuth (`/oauth/*`) and project (`/cli/*`) endpoints |
|
|
2314
|
+
| `PRODUCTDOCK_MCP_URL` | `<PRODUCTDOCK_API_URL>/mcp` | MCP server URL, written into each IDE config by `mcp setup`. Legacy: when it is set and `PRODUCTDOCK_API_URL` is not, this value minus the `/mcp` suffix becomes the API base |
|
|
2315
|
+
| `PRODUCTDOCK_REGISTRY_URL` | `https://productdock-core-api.softdesign.com.br` | Skill and agent registry URL |
|
|
2316
|
+
| `AI_TOOLS_BRANCH` | _(registry default branch, `main`)_ | Resolve skills and agents from this `ai-tools` branch. Setting it to `main` is the same as not setting it |
|
|
2317
|
+
| `PRODUCTDOCK_NPM_REGISTRY_URL` | `https://registry.npmjs.org` | npm registry `doctor` asks for the CLI's `latest` version |
|
|
2318
|
+
| `PRODUCTDOCK_NO_UPDATE_CHECK` | _(unset)_ | Any value turns off the end-of-command notice about outdated skills and agents. `doctor` still reports them |
|
|
2033
2319
|
| `PRODUCTDOCK_CONFIG_DIR` | `~/.productdock` | Directory of `credentials.json` and of the user's `config.json`. `login`, the token refresh and `logout` honour it; `productdock watch` sets it for the `productdock` calls Claude makes, so they share your session without changing `HOME` |
|
|
2034
2320
|
|
|
2035
2321
|
When running from source, these are also read from a `.env` file in the repository root — see `.env.example`.
|
|
@@ -2064,37 +2350,40 @@ bun test test/output.test.ts
|
|
|
2064
2350
|
|
|
2065
2351
|
### Source layout
|
|
2066
2352
|
|
|
2067
|
-
| File | Responsibility
|
|
2068
|
-
| ------------------------------ |
|
|
2069
|
-
| `bin/productdock.ts` | Commander program — command definitions and dispatch
|
|
2070
|
-
| `lib/constants.ts` | Version, base URLs and environment overrides — the `/oauth/*` and `/cli/*` root, the MCP server URL, the registry, `AI_TOOLS_BRANCH`; loads `.env` when running from source
|
|
2071
|
-
| `lib/
|
|
2072
|
-
| `lib/
|
|
2073
|
-
| `lib/
|
|
2074
|
-
| `lib/
|
|
2075
|
-
| `lib/
|
|
2076
|
-
| `lib/
|
|
2077
|
-
| `lib/
|
|
2078
|
-
| `lib/
|
|
2079
|
-
| `lib/
|
|
2080
|
-
| `lib/
|
|
2081
|
-
| `lib/
|
|
2082
|
-
| `lib/
|
|
2083
|
-
| `lib/work-
|
|
2084
|
-
| `lib/
|
|
2085
|
-
| `lib/
|
|
2086
|
-
| `lib/
|
|
2087
|
-
| `lib/
|
|
2088
|
-
| `lib/
|
|
2089
|
-
| `lib/
|
|
2090
|
-
| `lib/
|
|
2091
|
-
| `lib/
|
|
2092
|
-
| `lib/
|
|
2093
|
-
| `lib/
|
|
2094
|
-
| `lib/
|
|
2095
|
-
| `lib/
|
|
2096
|
-
| `lib/
|
|
2097
|
-
| `lib/
|
|
2353
|
+
| File | Responsibility |
|
|
2354
|
+
| ------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
2355
|
+
| `bin/productdock.ts` | Commander program — command definitions and dispatch |
|
|
2356
|
+
| `lib/constants.ts` | Version, base URLs and environment overrides — the `/oauth/*` and `/cli/*` root, the MCP server URL, the registry, `AI_TOOLS_BRANCH`; loads `.env` when running from source |
|
|
2357
|
+
| `lib/artifact-updates.ts` | Outdated skill/agent detection against the registry — used by `doctor` and by the cached end-of-command notice |
|
|
2358
|
+
| `lib/auth.ts` | OAuth 2.1 + PKCE flow, credential store (`PRODUCTDOCK_CONFIG_DIR`), token refresh |
|
|
2359
|
+
| `lib/config.ts` | `productdock.json` read/write/migrate, `init` and `link` |
|
|
2360
|
+
| `lib/api.ts` | Project and repository lookup behind `link` — `/cli/projects` and `/cli/projects/{id}/repositories` |
|
|
2361
|
+
| `lib/git.ts` | `origin` remote detection, Azure DevOps URL parsing (SSH, HTTPS, legacy), and the worktree helpers of `watch` |
|
|
2362
|
+
| `lib/ide.ts` | IDE detection and MCP config writing |
|
|
2363
|
+
| `lib/registry.ts` | Registry HTTP client — one code path for skills and agents, `?branch=` |
|
|
2364
|
+
| `lib/http.ts` | HTTP client for the `/cli/*` endpoints — file bodies, `multipart`, binary download, HTTP status kept in the error |
|
|
2365
|
+
| `lib/scope.ts` | Project scope — `project_id`/`repository_id` from `productdock.json`, flags override |
|
|
2366
|
+
| `lib/artifacts.ts` | Install core: destinations, zip extraction, SHA256 fingerprint, drift |
|
|
2367
|
+
| `lib/frontmatter.ts` | Frontmatter adaptation per platform (agents) — port of the ai-tools installer |
|
|
2368
|
+
| `lib/artifact-commands.ts` | The `skill` and `agent` command groups, generic over artifact kind |
|
|
2369
|
+
| `lib/work-items.ts` | The `wi` command group — `list`, `prd`, `spec-context`, `bugs`, `prototypes` and `attachments` (with `--download`) over `/cli/work-items/*` |
|
|
2370
|
+
| `lib/work-item-attachments.ts` | The `wi` writes — `comment` over `/cli/work-items/comments` and `evidence` (multipart) over `/cli/work-items/qa-evidence` |
|
|
2371
|
+
| `lib/code.ts` | The `code` command group — `map` and `search` over `/cli/code/*` |
|
|
2372
|
+
| `lib/phase-artifacts.ts` | The `artifact` command group — `submit` over `/cli/artifacts`, body from a file |
|
|
2373
|
+
| `lib/prd-review.ts` | The `prd-review` command group — `get` (mandatory read-back) and `submit` over `/cli/prd-review`, and `claim`/`release` of the interactive Tech Review request |
|
|
2374
|
+
| `lib/evaluations.ts` | The `eval` command group — `submit` over `/cli/evaluations` (envelope from a file), `latest` over `/cli/evaluations/report`, `list` over `/cli/evaluations/repositories` and `history` over `/cli/evaluations/history`, project-level |
|
|
2375
|
+
| `lib/test-reports.ts` | The `test-report` command group — `submit` over `/cli/test-reports` (report from a file), project-level |
|
|
2376
|
+
| `lib/sprints.ts` | The `sprint` command group — `list` over `/cli/sprints` and `items <id>` over `/cli/work-items?sprint_id=`, project-level |
|
|
2377
|
+
| `lib/sdlc-state.ts` | The `state` command group — `phase` over `/cli/state/phase` and `update` over `/cli/state`, the read/write pair over the same state |
|
|
2378
|
+
| `lib/prd-review-jobs.ts` | Tech Review queue client — `claim` (by work item, interactive), `heartbeat`, `release` and `finish` over `/cli/prd-review-jobs/*` |
|
|
2379
|
+
| `lib/watch.ts` | The `watch` command — the PRD Tech Review runner: disposable worktree, the two Claude Code stages, heartbeat — no question during the round |
|
|
2380
|
+
| `lib/user-config.ts` | The user's `config.json` in the configuration directory, and the private atomic writer shared with the credentials |
|
|
2381
|
+
| `lib/cli-version.ts` | The CLI's own version against the `latest` dist-tag on npm — used by `doctor` |
|
|
2382
|
+
| `lib/doctor.ts` | Diagnostics |
|
|
2383
|
+
| `lib/exit.ts` | Exit code taxonomy — `CliError` and the error → code mapping |
|
|
2384
|
+
| `lib/output.ts` | Output layer — JSON on `stdout`, prose on `stderr`, credential redaction |
|
|
2385
|
+
| `lib/tty.ts` | TTY guard — fails fast instead of blocking on a prompt |
|
|
2386
|
+
| `lib/types.d.ts` | Shared types — IDE keys, install targets, `productdock.json` shape |
|
|
2098
2387
|
|
|
2099
2388
|
### Building
|
|
2100
2389
|
|