@workser/cli 0.3.1 → 0.6.1

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.
@@ -1,18 +1,31 @@
1
1
  ---
2
2
  topic: neon
3
- title: The project's own Neon backend
4
- summary: Neon-branch object storage and functions. Dedicated tenancy only.
3
+ title: The project's own database
4
+ summary: Branches, databases, compute, plus Neon-branch object storage and functions. Dedicated tenancy only.
5
5
  commands: [neon]
6
6
  ---
7
7
 
8
- # The project's own Neon backend
8
+ # The project's own database
9
9
 
10
- S3-compatible object storage and Node.js HTTP functions on the project's own Neon
11
- branch they branch with the database. **Additive** infrastructure, not a
12
- replacement for `workser storage`.
10
+ The project's database, run the way an operator runs one: branches (copies of
11
+ the data), the databases on them, and the compute that serves them. Plus
12
+ S3-compatible object storage and Node.js HTTP functions on the same branch.
13
13
 
14
14
  ```
15
15
  workser neon status # tenancy + toggles + region verdict
16
+
17
+ workser neon branch list # copies of the data; the live one is marked
18
+ workser neon branch create qa-run # a copy to work on, made in a second
19
+ workser neon branch create qa --from <id> --no-compute
20
+ workser neon branch reset <branchId> # throw its changes away (asks the owner)
21
+ workser neon branch rm <branchId> # delete it and its data (asks the owner)
22
+
23
+ workser neon database list [--branch <id>]
24
+ workser neon database create <name> [--branch <id>] [--owner <role>]
25
+ workser neon database rm <name> [--branch <id>] # asks the owner
26
+
27
+ workser neon endpoints # what compute is running, and idle
28
+
16
29
  workser neon storage list | create <name> | rm <bucket>
17
30
  workser neon storage ls <bucket> [prefix]
18
31
  workser neon storage put <bucket> <local> [key]
@@ -30,6 +43,24 @@ Region is fixed when the project is created. `regionSupportsNeonBackend: false`
30
43
  **final, not retryable** — no amount of waiting or retrying changes it. When you see
31
44
  it, say so plainly and fall back to `workser storage` (the default bucket).
32
45
 
46
+ ## Branches are the useful one
47
+
48
+ A branch is a **full copy of the data**, made in about a second, costing almost
49
+ nothing until something writes to it. That is what lets a check run against real
50
+ data without being able to damage it — give a QA step its own branch instead of
51
+ pointing it at the live database.
52
+
53
+ Two things cannot happen at all, whatever anyone approves: **the branch the app
54
+ runs on cannot be deleted or reset**, and neither can **the database it connects
55
+ to**. Those refusals come from the server, not from the approval prompt. If you
56
+ meant to reset a copy and got that message, you named the live one.
57
+
58
+ `reset` deletes nothing by name and destroys just as much: it replaces a
59
+ branch's contents with its source's. It asks the owner for exactly that reason.
60
+
61
+ `--no-compute` makes a branch with no compute. It is cheaper and **nothing can
62
+ connect to it** — useful as a snapshot, useless as somewhere to run tests.
63
+
33
64
  ## Notes that matter
34
65
 
35
66
  - **`neon storage rm <bucket>` deletes the bucket and everything in it.** Not
@@ -38,5 +69,8 @@ it, say so plainly and fall back to `workser storage` (the default bucket).
38
69
  through Workser.
39
70
  - **Functions deploy from a zip.** Build the bundle first, then
40
71
  `workser neon functions deploy <slug> <zip>`.
41
- - **Most apps don't need this.** If the user just wants to store uploads, the default
42
- bucket in `reference/storage.md` is the answer.
72
+ - **`neon endpoints` is the cost question.** `active` means it is billing;
73
+ `idle` means it is not. It is the only place in the product that answers "what
74
+ is this database costing me while nothing is happening".
75
+ - **Most apps never need the storage or functions half.** If the user just wants
76
+ to store uploads, the default bucket in `reference/storage.md` is the answer.
@@ -1,28 +1,27 @@
1
1
  ---
2
2
  topic: sdlc-entities
3
- title: Board cards, decisions, requirements, and docs
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.
5
- commands: [board, decision, requirement, doc]
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
+ commands: [board, decision, requirement]
6
6
  ---
7
7
 
8
- # Board cards, decisions, requirements, and docs
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, Project Memory, and Docs panels use, so anything here
12
- appears there too — and (when this CLI runs inside an Orbit-spawned agent run)
13
- as an inline card in the conversation you're working in.
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>
@@ -33,11 +32,6 @@ workser requirement show <id>
33
32
  workser requirement create <title> --body <text> [--status <text>]
34
33
  workser requirement update <id> [--title <text>] [--body <text>] [--status <text>]
35
34
 
36
- workser doc list [--work-item <id>]
37
- workser doc show <id> [--markdown]
38
- workser doc create <title> [--work-item <id>] [--markdown <text>]
39
- [--content-json <json>]
40
- workser doc update <id> [--title <text>] [--markdown <text>]
41
35
  ```
42
36
 
43
37
  ## Read first — this is the part that matters
@@ -45,7 +39,6 @@ workser doc update <id> [--title <text>] [--markdown <text>]
45
39
  Before starting anything beyond a trivial edit:
46
40
 
47
41
  ```
48
- workser board list --json # what's already tracked (don't re-file it)
49
42
  workser decision list --json # what was already decided (don't reverse it)
50
43
  ```
51
44
 
@@ -55,20 +48,18 @@ purpose — `workser decision show <id>` gives you the context and consequences,
55
48
  not just the title. Reach for `workser doc list` / `workser requirement list`
56
49
  the same way when the task touches documented behaviour.
57
50
 
58
- ## Work with phases → cards + a plan doc, before you build
51
+ ## Work with phases → subtasks + a plan doc, before you build
59
52
 
60
53
  The moment you split a task into more than one phase, file it — not afterwards,
61
54
  and not only in your reply, which is gone once the conversation scrolls.
62
55
 
63
56
  ```bash
64
- # one card per phase; only the one you're doing goes to in-progress
65
- workser board create "Phase 1 — schema + migration" \
66
- --description "Add orders/line_items tables and the migration." \
67
- --status in-progress --json
68
- workser board create "Phase 2 — checkout API" --description "…" --json
69
- workser board create "Phase 3 cart UI" --description "…" --json
70
-
71
- # the plan itself, ONE doc, deliberately NOT linked to a card
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 "…"
61
+
62
+ # the plan's narrative, ONE doc, deliberately NOT linked to a subtask
72
63
  workser doc create "Checkout — implementation plan" --markdown "$(cat plan.md)" --json
73
64
 
74
65
  # the approach, if the plan settled something with real alternatives
@@ -76,49 +67,23 @@ workser decision create "Carts live server-side" --context "…" --decision "…
76
67
  ```
77
68
 
78
69
  **Don't pass `--work-item` for a multi-phase plan.** A linked document renders on
79
- its card and is *hidden* from the Docs panel; a plan spanning three phases belongs
80
- to the project, not to phase 1.
81
-
82
- The bar: if the user closed this conversation now, the Board should still show
83
- what's left and the doc should still explain the plan to whoever continues it.
84
-
85
- ## Keep the Board honest while you work
86
-
87
- A Board still reading `backlog` after the feature shipped tells the user the
88
- opposite of the truth. Moving the card is part of finishing the work:
89
-
90
- ```
91
- workser board move <id> in-progress # you picked it up
92
- workser board move <id> in-review # ready for the user to look at
93
- workser board close <id> # done and verified
94
- ```
95
-
96
- `--status` is one of `backlog | in-progress | in-review | done` (default
97
- `backlog`). `--priority` is one of `low | normal | high | urgent` (default
98
- `normal`). `--label` repeats for more than one label:
70
+ its card and is *hidden* from the Docs panel; a plan spanning three phases
71
+ belongs to the project, not to phase 1.
99
72
 
100
- ```
101
- workser board create "Fix the login bug" --status in-progress --priority high \
102
- --label bug --label auth
103
- ```
104
-
105
- `board update` replaces the labels you pass rather than merging them, and
106
- touches only the fields you name. There is no `board delete` — `done` is the
107
- terminal state for finished work, and removing a card the user filed is theirs
108
- 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.
109
76
 
110
77
  ## Decisions are append-only
111
78
 
112
79
  `decision create` is for something with real tradeoffs worth a paper trail:
113
- `--context` is why it came up, `--decision` is what was decided,
114
- `--consequences` is the follow-on effects. There is deliberately **no
115
- `decision update`** — a decision record states what was decided at a point in
116
- time. When it stops being right, record a new decision that supersedes it and
117
- say so in its `--context`. Editing the history is how a decision log stops
118
- being worth reading.
80
+ `--context` is why it came up, `--decision` what was decided, `--consequences`
81
+ the follow-on effects. There is deliberately **no `decision update`** — a record
82
+ states what was decided at a point in time. When it stops being right, record a
83
+ new decision that supersedes it and say so in its `--context`. Editing the
84
+ history is how a decision log stops being worth reading.
119
85
 
120
- Requirements are different: they legitimately move along, so they do have
121
- `update`.
86
+ Requirements legitimately move along, so they do have `update`.
122
87
 
123
88
  ```
124
89
  workser requirement create "Support SSO" --body "Enterprise customers need SAML." \
@@ -129,22 +94,8 @@ workser requirement update <id> --status done
129
94
  ## Docs
130
95
 
131
96
  `--markdown` is the normal way to write one. The body is stored both as the
132
- rich-text content the Docs panel renders and as a git-tracked markdown mirror
133
- at `.workser/docs/<id>.md` `workser doc show <id> --markdown` reports that
134
- path so you can read the file with your normal tools.
135
-
136
- Revise the page that exists rather than creating a second copy of it:
137
-
138
- ```
139
- workser doc list --json # is there already a page for this?
140
- workser doc update <id> --markdown "$(cat updated.md)"
141
- ```
142
-
143
- `--work-item <id>` links a document to a Board card (a card has at most one).
144
-
145
- ## When to record, and when not to
97
+ rich text the Docs panel renders and as a git-tracked mirror at
98
+ `.workser/docs/<id>.md`; `workser doc show <id> --markdown` reports that path so
99
+ you can read the file with your normal tools.
146
100
 
147
- Record what a future maintainer would need: follow-up work you found but didn't
148
- do, a choice between real alternatives, a behaviour worth writing down. Don't
149
- narrate every small step — and never treat filing a card as a substitute for the
150
- work. A card saying "fix the bug" is not fixing the bug.
101
+ Revise trd saying "fix the bug" is not fixing the bug.
@@ -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...>]
@@ -22,6 +25,7 @@ workser task subtask add <title> [--role <value>] [--kind <value>]
22
25
  workser task subtask list [taskId]
23
26
  workser task subtask update <id> [--title|--note|--role|--kind|--scope]
24
27
  workser task subtask remove <id>
28
+ workser task subtask send-back <id> --note <text> # redo it, and say why
25
29
 
26
30
  workser task can-start [id] # may work begin? refuses until approved
27
31
  workser task approval request # tell the owner the plan is ready
@@ -36,6 +40,16 @@ Team's own table. Filing your plan on the Board puts it somewhere the owner's
36
40
  task page never reads: they see "created work item" and an empty plan. Use
37
41
  `task subtask add`.
38
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
+
39
53
  ## Planning a task
40
54
 
41
55
  Read the project first, then propose. One `subtask add` per step:
@@ -80,3 +94,23 @@ workser task done --summary "The report now shows cost per KOL, with six months
80
94
  ```
81
95
 
82
96
  Write the summary for someone who runs a business and does not read code.
97
+
98
+ ## Sending a step back
99
+
100
+ A step that finished but is not good enough is **sent back**, not replaced:
101
+
102
+ ```
103
+ workser task subtask send-back 3f2a… --note "The totals ignore refunds."
104
+ ```
105
+
106
+ That puts it in the queue again as a **second attempt** on the same step. Two
107
+ reasons it matters that this is not a new step:
108
+
109
+ - The owner's screen can then say *"1 send-back, fixed — 2nd run passed"*. A
110
+ replacement step says only that two steps exist, which tells them nothing
111
+ about whether their team caught its own mistake.
112
+ - `--note` is the reason, and it is recorded against the attempt being
113
+ rejected. Without it the history can say a step ran twice but not why.
114
+
115
+ It refuses a step that is still working. Let it finish first — the run is
116
+ still writing to it.
@@ -0,0 +1,48 @@
1
+ ---
2
+ topic: usage
3
+ title: Usage — what is being used, against the plan
4
+ summary: How much database, file storage, projects and apps are in use, and how close that is to what the plan allows.
5
+ commands: [usage]
6
+ ---
7
+
8
+ # Usage — what is being used, against the plan
9
+
10
+ ```
11
+ workser usage # storage, projects, apps — and how close each is to the limit
12
+ ```
13
+
14
+ Run it before you propose anything that adds to a count. "Create another
15
+ project" is a plan you can only sensibly make if you know the plan allows two
16
+ and two already exist.
17
+
18
+ ## Two scopes in one answer, on purpose
19
+
20
+ * **Database and files are ORGANISATION-wide.** One pool across every project.
21
+ There is no per-project storage limit, and reporting one would invent it.
22
+ * **Projects, and apps in this project, are counted where they apply.** These
23
+ are the limits people actually hit.
24
+
25
+ ## Two kinds of limit, which do not mean the same thing
26
+
27
+ * **Hard cap** — projects, apps. Going over is **refused**. `workser usage`
28
+ exits non-zero when one is reached, so a step can gate on it.
29
+ * **Soft allowance** — database, files. Going over is **billed as extra**,
30
+ never blocked. It does not fail the command, because a customer growing past
31
+ their allowance should not have their automation start breaking that day.
32
+
33
+ ## "not measured" is not zero
34
+
35
+ A figure that could not be read prints as `not measured`, with the reason, and
36
+ draws no bar. Do not report it as `0`, and do not tell the user they have room
37
+ based on it — nobody looked.
38
+
39
+ If a scan comes back with a figure missing, say which one and why. "Your
40
+ database is using 2.5 GB of 10; the file total could not be read" is a useful
41
+ sentence. "You are using 2.5 GB of 20" is not, and it is wrong.
42
+
43
+ ## What to do with it
44
+
45
+ - Near a **soft** limit: tell the owner what the extra will cost them, and what
46
+ is taking the space. Do not delete anything to make a number look better.
47
+ - At a **hard** cap: say which plan raises it. Do not attempt the create — it
48
+ will be refused, and a failed attempt reads to the owner as a broken product.