@brainervirus/workit-cli 4.0.0 → 6.0.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 CHANGED
@@ -26,8 +26,13 @@ workit upgrade [--hosts=opencode,cursor,codex,pi] [--cli] [--preview | --apply -
26
26
  workit launch <opencode|cursor|codex|pi> [--auto-upgrade] [-- host arguments]
27
27
  workit doctor # offline installation health report
28
28
  workit doctor --json # machine-readable report
29
- workit <family> <action> [--payload <json|@file|->] [--task <id>] [--revision <uuid>] [--workspace-revision <uuid|null>] [--view full] [--actor <id>] [--confirm] [--json]
30
- workit action <operation> --payload <JSON> [--preview] [--confirm] [--task <id>] [--json] # preview or run one approved external action
29
+ workit <family> <action> [--payload <json|@file|->] [--task <id>] [--revision <uuid>] [--workspace-revision <uuid|null>] [--view full] [--actor <id>] [--json]
30
+ workit grant show [<workspace>] [--all] # effective autonomy grants
31
+ workit grant set <workspace> <kind>=<true|false|verified>… [defaultEndpoint=commit|pr]
32
+ workit grant unset <workspace> <kind>…
33
+ workit youtrack note <ISSUE> (--markdown <t>|--file <p>) [--minutes n] [--date auto|YYYY-MM-DD]
34
+ workit youtrack time|meeting <ISSUE> --minutes n [--text t] [--date …]
35
+ workit changelog apply (--entries <JSON|@file|->|--normalize-only) [--path CHANGELOG.md] [--preview]
31
36
  workit handoff --task <id> [--json] # export task state and compact destination context
32
37
  workit check <name> | workit check [--name <n>] [--shell] [--timeout <s>] [--task <id>] [--json] -- <cmd…> # run a check, record CLI-observed evidence (exit = the command's)
33
38
  workit uninstall # remove host registrations (keeps ~/.config/workit)
@@ -36,7 +41,7 @@ workit # help
36
41
 
37
42
  `workit init` guides you through: detected host selection, basic global config (locale, branch policy), optional advanced commit policy, YouTrack, VCS, workspaces (scoped hosting/tracker/branch/commit rules, profiles and release tracks), and project hygiene files. The wizard is a TTY application — `workit init` requires an interactive terminal and prints guidance (exiting nonzero) when stdin is not a TTY.
38
43
 
39
- Authenticate GitHub or GitLab with `gh auth login` or `glab auth login` before hosting actions; Workit does not need a second provider token file. `workit action` Git/hosting payloads accept `cwd` to target any checkout while task state stays in the session directory. Non-Git directories can host tasks for OS work; YouTrack keeps its own permanent token.
44
+ Authenticate GitHub or GitLab with `gh auth login` or `glab auth login` before hosting actions; Workit does not need a second provider token file. Non-Git directories can host tasks for OS work; YouTrack keeps its own permanent token.
40
45
 
41
46
  The platforms step lists all four supported hosts. Installed tools are selected
42
47
  initially; absent tools are disabled. Select all available, clear all, or pick
@@ -71,16 +76,22 @@ or host-permission change is performed.
71
76
 
72
77
  `workit doctor` checks the offline installation health and exits nonzero when problems are found; `--json` prints the full report as JSON instead of the human-readable table.
73
78
 
74
- The task surface exposes the eight shared operation families (`task`, `policy`,
75
- `evidence`, `finding`, `decision`, `worker`, `writer`, and `state`) and their 24
76
- closed actions. Payloads can be inline JSON, a UTF-8 `@file`, or UTF-8 stdin
79
+ The task surface exposes the seven shared operation families (`task`, `policy`,
80
+ `evidence`, `finding`, `decision`, `worker`, and `state`) and their closed
81
+ actions. Payloads can be inline JSON, a UTF-8 `@file`, or UTF-8 stdin
77
82
  with `-`; `--json` preserves the structured Result shape and exits nonzero for
78
- failures. Headless mutations that require consent use `--confirm` (agent-reported)
79
- or an observed TTY prompt; the action route additionally requires an
80
- interactive TTY — headless action calls return `needs_input` even with
81
- `--confirm`. `workit handoff --task` is read-only and refuses to
83
+ failures. Task-family mutations ask no consent prompt; `--confirm` is accepted
84
+ and ignored. `workit handoff --task` is read-only and refuses to
82
85
  emit a handoff when export and inspection revisions differ.
83
86
 
87
+ Delivery authority is the host's own permission system plus per-workspace
88
+ autonomy grants in `~/.config/workit/workspaces.json` (see the root README).
89
+ `workit grant set` raises a grant only for a user at an interactive terminal who
90
+ types the workspace name; headless or agent shells get `blocked` with the
91
+ command to give the user. Lowering is always allowed, and writes keep a
92
+ `workspaces.json.bak`. The `youtrack` and `changelog` verbs are gated by host
93
+ permission only. Workit 5.0 removed `workit action` and the checkout lease verb.
94
+
84
95
  ## Behavior
85
96
 
86
97
  - **Safe apply semantics** — a malformed `config.json` is detected before the wizard renders and reported as a friendly blocked output instead of crashing; the same guard runs after the Apply preview.
@@ -1,27 +1,26 @@
1
- # <Feature> Implementation Plan
1
+ # <Feature> plan
2
2
 
3
- > **For agentic workers:** Load `workit-implement` when policy selects implementation. Use bounded `workit_worker` delegation when the host supports it; otherwise execute inline within writer scope. Steps use checkbox (`- [ ]`) syntax for tracking.
3
+ Spec: `docs/<slug>/spec.md` · Goal: <one sentence>
4
4
 
5
- **Spec:** `docs/<slug>/spec.md`
6
- **Branch:** `feature/<slug>`
5
+ A plan records decisions, not code: per slice the branch, what it touches, its
6
+ acceptance, how it is verified, and what it depends on (workit-shape
7
+ `references/slicing.md`). Independent slices fan out (workit-fanout);
8
+ dependent ones stack (`workit stack plan <bottom> … <top>`).
7
9
 
8
- **Goal:** <one sentence>
10
+ ## Global constraints
9
11
 
10
- ## Global Constraints
11
-
12
- - Each task lands exactly one contiguous non-empty commit range (`base..head`): fix rounds append commits to that range and never rewrite/amend an active review range; record the real base..head shas in task progress.
13
- - The final task closes the lead Workit task with `workit_task` `action: "close"` (CLI: `workit task close --payload … [--confirm]`) once requirements are satisfied and repository verification passes — never finish while the task is still `active` or `paused`.
14
- - <project-wide requirements, one line each>
12
+ - <project-wide requirement, one line each>
15
13
 
16
14
  ---
17
15
 
18
- ### Task N: <Component>
19
-
20
- - [ ] **Step 1: <action>**
16
+ ### S1 <type>/<slug> (base: main)
21
17
 
22
- <!-- per-task criteria: how this task is verified -->
23
- **Criteria:** <verifiable check>
18
+ Touches: <areas, not line numbers>
19
+ Acceptance:
20
+ - Given <state>, When <action>, Then <observable result>
21
+ Verify: `workit check test`; verify-<app> "<feature>"
22
+ Decisions: <ledger refs or one-line rulings>
24
23
 
25
- | Status | Task |
26
- | --- | --- |
27
- | pending | N: <Component> |
24
+ | Slice | Branch | Depends on | Status |
25
+ | --- | --- | --- | --- |
26
+ | S1 | <type>/<slug> | — | pending |
@@ -19,14 +19,15 @@ no durable agreement: `Spec: none (<reason>)`, no file.)
19
19
 
20
20
  ## Architecture
21
21
 
22
- <!-- May be `N/A (<reason>)` when the change has no flows or architecture. -->
23
- <!-- Otherwise REQUIRED: render a mermaid diagram (workit-diagram skill). -->
22
+ <!-- Optional: only when a diagram argues a decision (workit-shape
23
+ references/diagrams.md); otherwise delete this section. -->
24
24
  ```mermaid
25
25
  flowchart TD
26
26
  A[Start] --> B[Step]
27
27
  ```
28
28
 
29
- <!-- REQUIRED if this spec touches UI: render an ASCII wireframe (workit-mockup skill). -->
29
+ <!-- Optional: a UI choice still open gets an ASCII sketch (workit-shape
30
+ references/mockups.md). -->
30
31
  ```text
31
32
  ┌──────────────┐
32
33
  │ Header │
@@ -2,9 +2,10 @@
2
2
 
3
3
  Workit keeps one accountable lead and one shared task state. Inspect current
4
4
  task state before acting; use only the shared operations for task, policy,
5
- evidence, finding, decision, worker, writer, and state changes. Authority is
5
+ evidence, finding, decision, worker, and state changes. Authority is
6
6
  bounded by the requested scope, current revision, caller/session provenance, and
7
- observed capabilities. Never claim host enforcement or evidence that the host
7
+ observed capabilities; delivery is bounded by the workspace autonomy grants
8
+ (`workit grant show`). Never claim host enforcement or evidence that the host
8
9
  cannot provide. Preserve unresolved requirements, gaps, and uncertain workers.
9
10
 
10
11
  Focused methods are loaded only when the resolved policy requires them. A method