@workser/cli 0.6.0 → 0.6.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@workser/cli",
3
- "version": "0.6.0",
3
+ "version": "0.6.2",
4
4
  "description": "Workser CLI — give your local AI agent native DevOps & infrastructure on Workser. The agent runs `workser …` to provision, deploy, and manage real apps.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -18,7 +18,8 @@ load.
18
18
 
19
19
  | You need to… | Commands | Run |
20
20
  | --- | --- | --- |
21
- | See what's tracked, decided, or written down for this project | `board …`, `decision …`, `requirement …`, `doc …` | `workser help sdlc-entities` |
21
+ | Track a business requirement too big for one task, and its phases | `goal …` | `workser help goals` |
22
+ | See what was decided or written down for this project | `decision …`, `requirement …`, `doc …` | `workser help sdlc-entities` |
22
23
  | Follow the project's brand — colours, fonts, logo | `design …` | `workser help brand` |
23
24
  | Provision or query Postgres; list end users | `db …`, `auth …` | `workser help database` |
24
25
  | Deploy, set env vars, read logs, check a domain | `deploy`, `env …`, `logs`, `versions`, `domain`, `open` | `workser help deploy` |
@@ -70,15 +71,16 @@ pick or switch it.
70
71
  2. **Orient first.** Run `workser status --json` to see the connection, the pinned
71
72
  project, and the latest deploy before acting. You don't pick or switch projects.
72
73
  For anything beyond a trivial edit, also read what the project already knows:
73
- `workser board list --json` (what's tracked), `workser decision list --json`
74
- (what was already decided, so you don't quietly reverse it), and
75
- `workser design show --json` before writing UI. This project outlives your
76
- session; that context is how you don't start from zero.
77
- 3. **A phased plan goes on the Board before you build it.** One `board create`
78
- card per phase, the plan itself as one `doc create` (no `--work-item`, or it's
79
- hidden from the Docs panel), and a `decision create` if it settled a real
80
- tradeoff. A plan that lives only in your reply is gone when the conversation
81
- scrolls. Details: `workser help sdlc-entities`.
74
+ `workser decision list --json` (what was already decided, so you don't quietly
75
+ reverse it), and `workser design show --json` before writing UI. This project
76
+ outlives your session; that context is how you don't start from zero.
77
+ 3. **A phased plan goes on the subtask list, never the Board.** Phases are
78
+ `workser task subtask add` (`workser help tasks`) not `board create`,
79
+ which makes a second, driftable "the plan" the task page never reads.
80
+ Write the narrative once as `doc create` (no `--work-item`, or it's hidden
81
+ from the Docs panel), plus `decision create` for a real tradeoff. A plan
82
+ in your reply alone is gone when the conversation scrolls. Details:
83
+ `workser help sdlc-entities`.
82
84
  4. **Stay in your lane.** `error.code = "owner_only"` (exit 6) means the action is
83
85
  reserved for the owner in Orbit. Don't retry or look for a workaround — tell the
84
86
  user, then continue. Provisioning the *pinned project's own* db / bucket / auth is
@@ -98,17 +100,15 @@ pick or switch it.
98
100
  ## Typical flow: build → ship
99
101
 
100
102
  ```bash
101
- workser status --json # 1. orient (project is already pinned)
102
- workser board list --json # 2. what's already tracked
103
- workser decision list --json # …and already decided
104
- workser board create "Phase 2 …" --json # 3. phases? file them + the plan doc
105
- workser board move <id> in-progress --json # 4. claim the card you're doing
106
- workser db create --json # 5. provision infra the app needs (idempotent)
107
- workser env set STRIPE_KEY=sk_live_… --json # 6. configure it
103
+ workser status --json # 1. orient (project is already pinned)
104
+ workser decision list --json # 2. what's already decided
105
+ workser task subtask add "Phase 2 — …" --json # 3. phases? file them as subtasks
106
+ workser doc create "Plan" --markdown "…" --json # 4. the plan's narrative, once
107
+ workser db create --json # 5. provision infra the app needs (idempotent)
108
+ workser env set STRIPE_KEY=sk_live_… --json # 6. configure it
108
109
  # … you write the app code with your normal tools …
109
- workser verify --json # 7. green build is the bar for "done"
110
- workser deploy --prod --watch --json # 8. ship; returns the stable *.workser.app URL
111
- workser board close <id> --json # 9. the Board now matches reality
110
+ workser verify --json # 7. green build is the bar for "done"
111
+ workser deploy --prod --watch --json # 8. ship; returns the stable *.workser.app URL
112
112
  ```
113
113
 
114
114
  ## Reading results
@@ -0,0 +1,69 @@
1
+ ---
2
+ topic: goals
3
+ title: Business goals & phases
4
+ summary: The level above a task — a business requirement too big for one sitting, and the ordered phases that deliver it.
5
+ commands: [goal]
6
+ ---
7
+
8
+ # Business goals & phases
9
+
10
+ A **goal** is a business requirement — "customers can buy from my site" — that
11
+ does not fit in one task. It carries an ordered list of **phase names**; a task
12
+ joins one by carrying that name (`workser task create --goal <id> --phase <name>`).
13
+ A phase has no existence apart from the tasks inside it, so it cannot drift from
14
+ the work it names.
15
+
16
+ ```
17
+ workser goal list
18
+ workser goal show <id>
19
+ workser goal create <title> --phase <name...> [--outcome <text>]
20
+ [--criteria <json>]
21
+ workser goal update <id> [--title <text>] [--outcome <text>]
22
+ [--phase <name...>] [--status <value>]
23
+ workser goal check <id> <criterionId> --phase <name> (--pass|--fail|--reset) [--note <text>]
24
+ ```
25
+
26
+ Status is one of: proposed, agreed, working, delivered, abandoned.
27
+
28
+ ## A goal has to be argued for
29
+
30
+ Most requests are one task and should stay one task. Turning a two-hour job into
31
+ four milestones buries the owner in ceremony before anything is built — use
32
+ `workser task create` unless you can genuinely name two-plus slices that each
33
+ deliver something the owner would notice.
34
+
35
+ ```
36
+ workser goal create "Launch checkout" \
37
+ --phase "Cart" --phase "Payment" --phase "Receipts" \
38
+ --outcome "A customer can buy something and get a receipt"
39
+ ```
40
+
41
+ `--phase` needs 2–6 names. Propose the shape only — nothing is created until the
42
+ owner agrees it; planning phase four now is waste, since it will change once
43
+ phase one is real.
44
+
45
+ ## Acceptance criteria are agreed with the shape
46
+
47
+ `--criteria` maps each phase name to the owner's own sentences about what "done"
48
+ means for it, e.g. `'{"Payment":["A customer can pay by card and gets a receipt"]}'`.
49
+ Written afterwards they only describe what got built; written with the shape they
50
+ can still change the plan.
51
+
52
+ Record whether one is met with `workser goal check`:
53
+
54
+ ```
55
+ workser goal check g_123 c1 --phase Payment --pass \
56
+ --note "Tested a card payment end to end; receipt emailed."
57
+ ```
58
+
59
+ `--note` is required on `--pass` — a tick the owner cannot verify is worse than no
60
+ tick.
61
+
62
+ ## Joining tasks to a goal
63
+
64
+ ```
65
+ workser task create "Build the payment form" --goal g_123 --phase Payment
66
+ ```
67
+
68
+ A goal's apps and progress are derived from the tasks that join it, not declared
69
+ up front — most of the apps a goal will touch don't exist when it's proposed.
@@ -1,28 +1,27 @@
1
1
  ---
2
2
  topic: sdlc-entities
3
- title: Board cards, decisions and requirements
4
- summary: Read what this project already tracks and decided, keep the Board honest as you work, and record what a future maintainer will need.
3
+ title: Decisions and requirements
4
+ summary: Read what this project already decided, and record what a future maintainer will need. Phased work itself is subtasks, not board cards see `workser help tasks`.
5
5
  commands: [board, decision, requirement]
6
6
  ---
7
7
 
8
- # Board cards, decisions and requirements
8
+ # Decisions and requirements
9
9
 
10
10
  These are the project's memory across sessions. They write to the **same tables**
11
- the Orbit desktop's Board and Project Memory panels use, so anything here appears
12
- there too — and, inside an Orbit-spawned run, as an inline card in the
13
- conversation. Documents have their own guide: `workser help docs`.
11
+ the Orbit desktop's Project Memory panel uses, so anything here appears there too
12
+ — and, inside an Orbit-spawned run, as an inline card in the conversation.
13
+ Documents have their own guide: `workser help docs`. Phased work is tracked as
14
+ subtasks, not here — see `workser help tasks`.
15
+
16
+ > **The Board (`workser board ...`) is deprecated for agent use.** It used to be
17
+ > where a multi-phase plan went, one card per phase — and the phase was ALSO a
18
+ > subtask the planning turn had just filed for the same piece of work. That gave
19
+ > a task two competing plans, one of which this task's own page never reads and
20
+ > nothing kept in sync with the other. Phases are `project_tasks` subtasks now,
21
+ > full stop: `workser task subtask add`. Do not run `workser board create` for
22
+ > planned work — see `workser help tasks`.
14
23
 
15
24
  ```
16
- workser board list [--status <value>] [--label <value>] [--limit <n>]
17
- workser board show <id>
18
- workser board create <title> [--description <text>] [--status <value>]
19
- [--priority <value>] [--label <value>]
20
- [--owner <name>] [--milestone <id>]
21
- workser board update <id> [--title|--description|--status|--priority
22
- |--label|--owner|--milestone ...]
23
- workser board move <id> <backlog|in-progress|in-review|done>
24
- workser board close <id>
25
-
26
25
  workser decision list [--limit <n>]
27
26
  workser decision show <id>
28
27
  workser decision create <title> --context <text> --decision <text>
@@ -40,7 +39,6 @@ workser requirement update <id> [--title <text>] [--body <text>] [--status <text
40
39
  Before starting anything beyond a trivial edit:
41
40
 
42
41
  ```
43
- workser board list --json # what's already tracked (don't re-file it)
44
42
  workser decision list --json # what was already decided (don't reverse it)
45
43
  ```
46
44
 
@@ -50,19 +48,18 @@ purpose — `workser decision show <id>` gives you the context and consequences,
50
48
  not just the title. Reach for `workser doc list` / `workser requirement list`
51
49
  the same way when the task touches documented behaviour.
52
50
 
53
- ## Work with phases → cards + a plan doc, before you build
51
+ ## Work with phases → subtasks + a plan doc, before you build
54
52
 
55
53
  The moment you split a task into more than one phase, file it — not afterwards,
56
54
  and not only in your reply, which is gone once the conversation scrolls.
57
55
 
58
56
  ```bash
59
- # one card per phase; only the one you're doing goes to in-progress
60
- workser board create "Phase 1 — schema + migration" \
61
- --description "Add orders/line_items tables and the migration." \
62
- --status in-progress --json
63
- workser board create "Phase 2 — checkout API" --description "…" --json
57
+ # the phases themselves this task's own subtask list, not the Board
58
+ workser task subtask add "Phase 1 — schema + migration" --role api \
59
+ --note "Add orders/line_items tables and the migration."
60
+ workser task subtask add "Phase 2 — checkout API" --role api --note "…"
64
61
 
65
- # the plan itself, ONE doc, deliberately NOT linked to a card
62
+ # the plan's narrative, ONE doc, deliberately NOT linked to a subtask
66
63
  workser doc create "Checkout — implementation plan" --markdown "$(cat plan.md)" --json
67
64
 
68
65
  # the approach, if the plan settled something with real alternatives
@@ -73,32 +70,9 @@ workser decision create "Carts live server-side" --context "…" --decision "…
73
70
  its card and is *hidden* from the Docs panel; a plan spanning three phases
74
71
  belongs to the project, not to phase 1.
75
72
 
76
- The bar: if the user closed this conversation now, the Board should still show
77
- what's left and the doc should still explain the plan to whoever continues it.
78
-
79
- ## Keep the Board honest while you work
80
-
81
- A Board still reading `backlog` after the feature shipped tells the user the
82
- opposite of the truth. Moving the card is part of finishing the work:
83
-
84
- ```
85
- workser board move <id> in-progress # you picked it up
86
- workser board move <id> in-review # ready for the user to look at
87
- workser board close <id> # done and verified
88
- ```
89
-
90
- `--status` is one of `backlog | in-progress | in-review | done` (default
91
- `backlog`). `--priority` is one of `low | normal | high | urgent` (default
92
- `normal`). `--label` repeats for more than one label:
93
-
94
- ```
95
- workser board create "Fix the login bug" --status in-progress --priority high \
96
- --label bug --label auth
97
- ```
98
-
99
- `board update` replaces the labels you pass rather than merging them, and
100
- touches only the fields you name. There is no `board delete`: `done` is the
101
- terminal state, and removing a card the user filed is theirs to do in Orbit.
73
+ The bar: if the user closed this conversation now, the subtask list should still
74
+ show what's left and the doc should still explain the plan to whoever continues
75
+ it.
102
76
 
103
77
  ## Decisions are append-only
104
78
 
@@ -14,6 +14,9 @@ below defaults to it and you rarely pass an id at all.
14
14
  ```
15
15
  workser task list [--status <value>] [--label <value>] [--limit <n>]
16
16
  workser task show [id] # the task you are in, with its steps
17
+ workser task create <title> [--note <text>] [--kind <value>]
18
+ [--label <value...>] [--app <id...>]
19
+ [--infra <ref...>]
17
20
 
18
21
  workser task subtask add <title> [--role <value>] [--kind <value>]
19
22
  [--note <text>] [--app <id...>]
@@ -37,6 +40,16 @@ Team's own table. Filing your plan on the Board puts it somewhere the owner's
37
40
  task page never reads: they see "created work item" and an empty plan. Use
38
41
  `task subtask add`.
39
42
 
43
+ ## Opening work from a project channel
44
+
45
+ When a project-channel conversation produces actionable work, the PM may record
46
+ it with `workser task create`. Orbit supplies the channel and source-message IDs;
47
+ the command records them and posts the new task card as a Project Manager message
48
+ automatically. Do not invent or ask for those IDs.
49
+
50
+ Opening a task does **not** approve it or start implementation. The task remains
51
+ awaiting the owner. Never approve or dispatch a task you opened yourself.
52
+
40
53
  ## Planning a task
41
54
 
42
55
  Read the project first, then propose. One `subtask add` per step: