@lumoai/cli 1.15.0 → 1.17.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 +13 -13
- package/assets/skill/SKILL.md +111 -0
- package/assets/skill/references/artifacts-figma.md +124 -0
- package/assets/skill/references/docs.md +306 -0
- package/assets/skill/references/memory.md +69 -0
- package/assets/skill/references/milestones.md +244 -0
- package/assets/skill/references/onboarding.md +102 -0
- package/assets/skill/references/sessions.md +142 -0
- package/assets/skill/references/sprints.md +157 -0
- package/assets/skill/references/task-context.md +109 -0
- package/assets/skill/references/tasks.md +205 -0
- package/dist/cli/src/commands/milestone-show.js +23 -0
- package/dist/cli/src/commands/setup.js +50 -22
- package/dist/cli/src/commands/sprint-show.js +32 -3
- package/dist/cli/src/index.js +1 -1
- package/package.json +1 -1
- package/assets/skill.md +0 -1445
package/README.md
CHANGED
|
@@ -24,7 +24,7 @@ npx @lumoai/cli setup
|
|
|
24
24
|
|
|
25
25
|
The command interactively asks whether to install for the current user (`~/.claude/`) or just the current project (`./.claude/`), then:
|
|
26
26
|
|
|
27
|
-
1. Drops the `SKILL.md` into `.claude/skills/lumo/`
|
|
27
|
+
1. Drops the skill files (`SKILL.md` + `references/`) into `.claude/skills/lumo/`
|
|
28
28
|
2. Idempotently merges 25 Lumo hook handlers into `.claude/settings.json` (existing hooks and permissions are preserved)
|
|
29
29
|
3. Prints any remaining steps (global install, `lumo auth login`)
|
|
30
30
|
|
|
@@ -91,18 +91,18 @@ lumo task update LUM-42 --status done
|
|
|
91
91
|
|
|
92
92
|
## Commands
|
|
93
93
|
|
|
94
|
-
| Group | Highlights
|
|
95
|
-
| ----------- |
|
|
96
|
-
| `setup` | Install SKILL.md + hooks into `~/.claude/` or `./.claude/`
|
|
97
|
-
| `auth` | `login`, `logout`
|
|
98
|
-
| `whoami` | Show current identity + workspace
|
|
99
|
-
| `update` | Self-update to the latest npm release
|
|
100
|
-
| `task` | `create`, `update`, `list`, `show`, `comment`, `context`
|
|
101
|
-
| `session` | `attach`, `status`, `detach` (binds Claude Code sessions)
|
|
102
|
-
| `project` | `list`
|
|
103
|
-
| `milestone` | `create`, `update`, `list`, `show`, `delete`
|
|
104
|
-
| `sprint` | `create`, `start`, `close`, `list`, `show`, `add`, `remove`, `summary`
|
|
105
|
-
| `doc` | `create`, `update`, `list`, `show`, `move`, `bind`, `share`
|
|
94
|
+
| Group | Highlights |
|
|
95
|
+
| ----------- | -------------------------------------------------------------------------------------- |
|
|
96
|
+
| `setup` | Install skill files (SKILL.md + references/) + hooks into `~/.claude/` or `./.claude/` |
|
|
97
|
+
| `auth` | `login`, `logout` |
|
|
98
|
+
| `whoami` | Show current identity + workspace |
|
|
99
|
+
| `update` | Self-update to the latest npm release |
|
|
100
|
+
| `task` | `create`, `update`, `list`, `show`, `comment`, `context` |
|
|
101
|
+
| `session` | `attach`, `status`, `detach` (binds Claude Code sessions) |
|
|
102
|
+
| `project` | `list` |
|
|
103
|
+
| `milestone` | `create`, `update`, `list`, `show`, `delete` |
|
|
104
|
+
| `sprint` | `create`, `start`, `close`, `list`, `show`, `add`, `remove`, `summary` |
|
|
105
|
+
| `doc` | `create`, `update`, `list`, `show`, `move`, `bind`, `share` |
|
|
106
106
|
|
|
107
107
|
Every command accepts `--help` for full flags and examples:
|
|
108
108
|
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: lumo
|
|
3
|
+
description: 'Use the Lumo CLI to load task context, manage session bindings, and run tasks / projects / milestones / sprints / docs / memory from the terminal. Activate when: the user mentions a Lumo task identifier (LUM-42 etc.), asks to load task background/context, wants to bind/check/detach a Claude Code session''s task, is about to start work on a task, or wants to create/update/list/show/comment on tasks, projects, milestones, sprints, documents, artifacts, Figma links, or memory. Triggers on: "LUM-", "task context", "load context", "session start", "session attach", "session status", "session detach", "which task", "what task am I on", "work on LUM", "session wrap", "wrap up session", "进度评论", "卡住检测", "create task", "new task", "file a task", "list tasks", "my tasks", "show task", "view task", "comment on task", "update task", "change task status", "rename task", "reassign task", "mark task as done", "lumo next", "next task", "what should I work on", "推荐下一个任务", "list projects", "what projects", "milestone", "里程碑", "list/create/update/delete/show milestone", "set milestone", "attach/unbind milestone", "tasks in milestone", "search milestones", "find milestone", "milestone health", "at-risk", "overdue", "archive/unarchive milestone", "归档里程碑", "milestone summary", "里程碑复盘", "reorder/move milestone", "排序里程碑", "milestone add/remove", "挂任务到里程碑", "auth login", "log in", "logout", "sign out", "switch account", "whoami", "who am I", "current workspace", "登录", "切换账号", "create/update/list/show/delete doc", "write doc", "写文档", "新建文档", "修改文档", "查看文档", "bind/unbind doc", "把文档关联到任务", "doc scope", "personal/workspace doc", "tag", "add/remove tag", "标签", "share/unshare doc", "分享文档", "doc share-list", "viewer/editor/manager", "doc tree", "doc move", "move/reparent doc", "移动文档", "sprint", "冲刺", "迭代", "create/list/show/update/delete sprint", "start/close sprint", "开始/关闭冲刺", "add to sprint", "active sprints", "sprint summary", "冲刺总结", "把任务挂到冲刺", "sprint health", "sprint risk", "is this sprint at risk", "冲刺风险", "冲刺健康度", "sprint blockers", "冲刺阻塞", "lumo update", "upgrade lumo", "升级 lumo", "new lumo version", "lumo setup", "install lumo skill/hooks", "wire up lumo", "set up lumo", "安装 lumo", "配置 lumo", "task artifact", "artifact add/list/show/update/rm", "spec artifact", "record/attach spec", "attach plan", "记录 spec", "查看 artifact", figma, attach figma, figma link, 关联 figma, 设计稿, figma design, "memory", "记忆", "remember", "record a memory", "记一条", "promote memory", "promote to project", "沉淀", "task/project memory", "retrieval", "取全文", "拉全文", "task slack show", "看 thread", "show slack thread", "task web show", "web 正文", "task figma context", "figma metadata", "task comments list", "list comments", "看评论", "task pr show", "查看 PR", "show pr", "PR 详情", "import google doc", "sync google doc", "google drive", "doc import-gdoc", "doc sync", "导入/同步 google 文档", "mark blocked", "blocked tag", "标记 blocked", "stuck", "repeatedly failing".'
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
## Prerequisites
|
|
7
|
+
|
|
8
|
+
Before running any `lumo` command, verify the CLI is available and authenticated:
|
|
9
|
+
|
|
10
|
+
```bash
|
|
11
|
+
which lumo && lumo whoami
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
- If `lumo` is not found: tell the user to install it (`npm install -g @lumoai/cli`; for monorepo dev, `cd cli && npm install && npm link` also works)
|
|
15
|
+
- If `lumo whoami` fails with an auth error: tell the user to run `lumo auth login`
|
|
16
|
+
- Do NOT proceed with any lumo commands until both checks pass
|
|
17
|
+
|
|
18
|
+
## How this skill is organized
|
|
19
|
+
|
|
20
|
+
The command catalog below is a **map**: it lists every command grouped by domain with a one-line summary. **Detailed flags, examples, output formats, and "when to suggest" guidance live in the `references/` files** — when a user request lands in a domain, **Read the matching reference file before composing the command**. Don't run a command from memory if its flags/edge-cases matter; open the reference first.
|
|
21
|
+
|
|
22
|
+
| Domain | Read this reference |
|
|
23
|
+
| --------------------------------------------------------------------------------- | -------------------------------------------------------------- |
|
|
24
|
+
| `setup`, `auth login/logout`, `whoami`, `update` | [references/onboarding.md](references/onboarding.md) |
|
|
25
|
+
| `task context`, retrieval (`slack/web/figma context`, `comments list`, `pr show`) | [references/task-context.md](references/task-context.md) |
|
|
26
|
+
| `task create/update/list/show/comment`, `next` | [references/tasks.md](references/tasks.md) |
|
|
27
|
+
| `task artifact*`, `task figma*` | [references/artifacts-figma.md](references/artifacts-figma.md) |
|
|
28
|
+
| `project list`, `milestone*` | [references/milestones.md](references/milestones.md) |
|
|
29
|
+
| `doc*` | [references/docs.md](references/docs.md) |
|
|
30
|
+
| `sprint*` | [references/sprints.md](references/sprints.md) |
|
|
31
|
+
| `task/project memory`, `memory promote/rm` | [references/memory.md](references/memory.md) |
|
|
32
|
+
| `session attach/status/detach/wrap`, auto-bind, Layer-2 review | [references/sessions.md](references/sessions.md) |
|
|
33
|
+
|
|
34
|
+
## Command catalog
|
|
35
|
+
|
|
36
|
+
**Onboarding / auth / update** — see [onboarding.md](references/onboarding.md)
|
|
37
|
+
|
|
38
|
+
- `lumo setup [--user|--project] [--force] [--agent <token>]` — install skill files + hooks
|
|
39
|
+
- `lumo auth login` / `lumo auth logout` — paste an API key / clear credentials
|
|
40
|
+
- `lumo whoami` — show current identity (email, workspace, key)
|
|
41
|
+
- `lumo update` — upgrade the CLI to the latest npm release
|
|
42
|
+
|
|
43
|
+
**Task context & retrieval** — see [task-context.md](references/task-context.md)
|
|
44
|
+
|
|
45
|
+
- `lumo task context <id>` — load task background (memory, source cards, PR review todos, prior sessions)
|
|
46
|
+
- `lumo task slack show <id> <contextId>` — full stored Slack thread
|
|
47
|
+
- `lumo task web show <id> <linkId>` — fetched web link body
|
|
48
|
+
- `lumo task figma context <id> <linkId>` — Figma link metadata (v1)
|
|
49
|
+
- `lumo task comments list <id>` — full comment thread (read-only; ≠ `task comment`)
|
|
50
|
+
- `lumo task pr show <id> <number>` — synced PR metadata (v1)
|
|
51
|
+
|
|
52
|
+
**Tasks** — see [tasks.md](references/tasks.md)
|
|
53
|
+
|
|
54
|
+
- `lumo task create <title> [flags]` — create a task
|
|
55
|
+
- `lumo task update <id> [flags]` — patch status/title/priority/assignee/milestone/sprint/tags
|
|
56
|
+
- `lumo task list [flags]` — list tasks assigned to you
|
|
57
|
+
- `lumo next [--count N]` — recommend the next task to work on (read-only)
|
|
58
|
+
- `lumo task show <id>` — print one task's detail
|
|
59
|
+
- `lumo task comment <id> <body>` — leave a comment
|
|
60
|
+
|
|
61
|
+
**Artifacts & Figma** — see [artifacts-figma.md](references/artifacts-figma.md)
|
|
62
|
+
|
|
63
|
+
- `lumo task artifact add/update/list/show/rm` — record spec/plan products on a task
|
|
64
|
+
- `lumo task figma add/list/rm/refresh` — attach & manage Figma designs
|
|
65
|
+
|
|
66
|
+
**Projects & milestones** — see [milestones.md](references/milestones.md)
|
|
67
|
+
|
|
68
|
+
- `lumo project list` — list projects (slugs feed `--project`)
|
|
69
|
+
- `lumo milestone list/create/show/update/delete` — milestone CRUD (`show` includes a Sprint-coverage section)
|
|
70
|
+
- `lumo milestone archive/unarchive` — soft-archive / restore
|
|
71
|
+
- `lumo milestone add/remove <id> <task...>` — batch bind/unbind tasks
|
|
72
|
+
- `lumo milestone summary [--retry]` — AI retro
|
|
73
|
+
- `lumo milestone reorder/move` — manual ordering
|
|
74
|
+
|
|
75
|
+
**Documents** — see [docs.md](references/docs.md)
|
|
76
|
+
|
|
77
|
+
- `lumo doc create/update/show/list/delete` — document CRUD
|
|
78
|
+
- `lumo doc move` — reparent under a parent / to root
|
|
79
|
+
- `lumo doc bind/unbind <doc> <task>` — task linkage
|
|
80
|
+
- `lumo doc share/unshare/share-list` — member sharing
|
|
81
|
+
- `lumo doc import-gdoc` / `lumo doc sync` — Google Doc import & re-sync
|
|
82
|
+
|
|
83
|
+
**Sprints** — see [sprints.md](references/sprints.md)
|
|
84
|
+
|
|
85
|
+
- `lumo sprint list/create/show/update/delete` — sprint CRUD (`show` includes Progress / Health / Blockers)
|
|
86
|
+
- `lumo sprint start/close` — status transitions (no `--status` flag)
|
|
87
|
+
- `lumo sprint add/remove <id> <task>` — bind/unbind a task
|
|
88
|
+
- `lumo sprint summary [--retry]` — AI retro
|
|
89
|
+
|
|
90
|
+
**Memory** — see [memory.md](references/memory.md)
|
|
91
|
+
|
|
92
|
+
- `lumo task memory add/list` · `lumo project memory add/list` — record/curate Memory (TASK vs PROJECT)
|
|
93
|
+
- `lumo memory promote <id>` / `lumo memory rm <id> --yes` — TASK→PROJECT / delete
|
|
94
|
+
|
|
95
|
+
**Sessions** — see [sessions.md](references/sessions.md)
|
|
96
|
+
|
|
97
|
+
- `lumo session attach <id>` — bind this session to a task (then run `task context`)
|
|
98
|
+
- `lumo session status` / `lumo session detach` — show / clear binding
|
|
99
|
+
- `lumo session wrap [--yes] [--dry-run]` — end-of-session panel: progress comment + memory review + blocked-tag prompt
|
|
100
|
+
- Auto-bind at session start + Layer-2 project-memory review — see the reference
|
|
101
|
+
|
|
102
|
+
## Core workflow
|
|
103
|
+
|
|
104
|
+
Typical flow when a user says "help me with LUM-42":
|
|
105
|
+
|
|
106
|
+
1. `lumo session attach LUM-42` — bind this session
|
|
107
|
+
2. `lumo task context LUM-42` — load background
|
|
108
|
+
3. Review unresolved items, PR-review todos, and the task description
|
|
109
|
+
4. Begin working on the task
|
|
110
|
+
|
|
111
|
+
**Auto-bind:** session-start may already bind the task from the git branch / recent commits and print `已自动绑定 LUM-N …`. If the user says "不是"/"不对"/"wrong task", run `lumo session detach` (then `session attach <LUM-N>` if they name the right one). See [sessions.md](references/sessions.md) for the full session-start behavior.
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
# Task Artifacts & Figma Designs
|
|
2
|
+
|
|
3
|
+
### Task ↔ Spec Artifacts
|
|
4
|
+
|
|
5
|
+
Record Claude Code spec-engineering products (spec / plan / design …) on a task. The artifacts show up in the task detail "规格" (definition) layer and are injected into `lumo task context`.
|
|
6
|
+
|
|
7
|
+
#### `lumo task artifact add <task> --kind <kind> --title <title> --file <path> --source <source> --agent <agent>`
|
|
8
|
+
|
|
9
|
+
Attaches an artifact to a task. `--kind`, `--title`, `--source` are stored verbatim — **`kind` is opaque** (no enumeration; `spec` / `plan` / `requirements` / anything is accepted). `--source` is **required** and names the spec-generation framework that produced the artifact, written as its **formal name** (`Superpowers` / `Spec Kit` / `BMad` / `OpenSpec` / `GSD` / …) — it is also opaque (no enumeration), but there is **no default**, so you must pass it. Quote names that contain spaces (`--source "Spec Kit"`). `--file` supplies the body (file contents). Each call appends to the end of the task's artifact list — call once per artifact (e.g. Superpowers: one `spec`, one `plan`). The `<task>` (e.g. `LUM-42`) is resolved server-side. **`--file` is sandboxed:** the CLI rejects any path that resolves **outside the current project directory** (parent-traversal, absolute paths, escaping symlinks) or that matches a **sensitive-file denylist** (`.env*`, `id_rsa`/`id_ed25519`, `*.pem`/`*.key`, `.aws`/`.ssh` contents, `credentials`, `.npmrc`, …). There is no override flag — pass only project-local, non-secret files (e.g. `docs/spec.md`). To record an out-of-tree file, copy it into the project first.
|
|
10
|
+
|
|
11
|
+
`--agent` is **required** and names the coding tool that produced the artifact (enum). Valid values: `claude-code | codex | cursor | gemini-cli | github-copilot | windsurf` (case-insensitive; `gemini` and `copilot` are accepted aliases).
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
lumo task artifact add LUM-42 --kind spec --title "Spec" --file docs/spec.md --source Superpowers --agent claude-code
|
|
15
|
+
lumo task artifact add LUM-42 --kind plan --title "Implementation plan" --file docs/plan.md --source "Spec Kit" --agent claude-code
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
Output: `Added [spec] "Spec" to LUM-42`
|
|
19
|
+
|
|
20
|
+
#### `lumo task artifact update <task> <artifact-id> [--kind <kind>] [--title <title>] [--source <source>] [--agent <agent>]`
|
|
21
|
+
|
|
22
|
+
Patches an existing artifact's metadata in place. Editable fields are **`kind`, `title`, `source`, and `agent`** — **content is immutable** (to change the body, `rm` the artifact and `add` it again). At least one flag is required; passing none errors before any network call. Empty values (`--kind ""`) are rejected. The `<artifact-id>` is the cuid in column 1 of `artifact list`. `--agent` accepts the same valid values and aliases as `artifact add`: `claude-code | codex | cursor | gemini-cli | github-copilot | windsurf` (case-insensitive; `gemini` and `copilot` are accepted aliases).
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
lumo task artifact update LUM-42 cma_xxx --kind plan # re-classify spec → plan
|
|
26
|
+
lumo task artifact update LUM-42 cma_xxx --source "Spec Kit" # fix the framework label
|
|
27
|
+
lumo task artifact update LUM-42 cma_xxx --title "Final spec" --source OpenSpec
|
|
28
|
+
lumo task artifact update LUM-42 cma_xxx --agent cursor # fix the agent label
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
Output: `Updated [plan] "Final spec" (OpenSpec) on LUM-42`. A 404 (task or artifact missing in this workspace) prints the server message and exits 1.
|
|
32
|
+
|
|
33
|
+
#### `lumo task artifact list <task>`
|
|
34
|
+
|
|
35
|
+
Lists artifacts on the task in order: `<id> <kind> <agent> <source> <title>`. Prints `No artifacts on <task>` when there are none.
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
lumo task artifact list LUM-42
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
#### `lumo task artifact show <task> <artifact-id>`
|
|
42
|
+
|
|
43
|
+
Prints one artifact's key:value header (id, kind, title, agent, source, order, task) followed by the full content body. The `<artifact-id>` is the cuid in column 1 of `artifact list`.
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
lumo task artifact show LUM-42 cma_xxx
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
#### `lumo task artifact rm <task> <artifact-id> --yes`
|
|
50
|
+
|
|
51
|
+
Deletes an artifact from a task. Irreversible — `--yes` is required and there is no interactive prompt (agent-friendly). On success prints `Removed <artifact-id> from <task>`. A 404 (task or artifact missing in this workspace) prints the server message and exits 1.
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
lumo task artifact rm LUM-42 cma_xxx --yes
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
When to suggest: after running a spec/plan workflow in Claude Code, offer to record the product(s) with `task artifact add` (one call per artifact) — always pass `--source` with the framework you used. Use `task artifact list` to see what's already recorded, `task artifact show` to inspect a single artifact's content, `task artifact update` to fix a wrong kind/title/source without re-uploading, and `task artifact rm` to drop one that's wrong or stale.
|
|
58
|
+
|
|
59
|
+
### Task ↔ Figma Designs
|
|
60
|
+
|
|
61
|
+
#### `lumo task figma add <task> <url>` — attach a Figma file/frame
|
|
62
|
+
|
|
63
|
+
Fetches file name, frame name, and thumbnail via Figma OAuth and stores them
|
|
64
|
+
on the task.
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
lumo task figma add LUM-42 "https://www.figma.com/design/abc123/Onboarding?node-id=1-234"
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
If the URL omits `node-id`, the link is stored as file-level; the CLI prints
|
|
71
|
+
a `(file-level, thumbnail from "...")` note showing the auto-picked
|
|
72
|
+
representative frame.
|
|
73
|
+
|
|
74
|
+
Idempotent — re-adding the same URL within 7 days returns the existing row
|
|
75
|
+
without re-calling Figma.
|
|
76
|
+
|
|
77
|
+
**Not connected?** Errors with:
|
|
78
|
+
|
|
79
|
+
```
|
|
80
|
+
✗ You haven't connected Figma yet.
|
|
81
|
+
Run: open https://www.uselumo.ai/settings/integrations
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
#### `lumo task figma list <task>` — list attachments
|
|
85
|
+
|
|
86
|
+
```
|
|
87
|
+
$ lumo task figma list LUM-42
|
|
88
|
+
cfl_xxx1 Onboarding Welcome screen 2026-05-28
|
|
89
|
+
cfl_xxx2 Design System Button / Primary 2026-05-27
|
|
90
|
+
cfl_xxx3 Onboarding (file-level) 2026-05-20 ⚠ thumbnail stale
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
`⚠ thumbnail stale` appears when `thumbnailFetchedAt > 25 days`.
|
|
94
|
+
|
|
95
|
+
#### `lumo task figma rm <task> <link-id-or-url>` — remove an attachment
|
|
96
|
+
|
|
97
|
+
Accepts a `cfl_*` cuid or the original URL. Idempotent (`Not linked: ...` + exit 0 when no match).
|
|
98
|
+
|
|
99
|
+
#### `lumo task figma refresh <task>` — manual refresh
|
|
100
|
+
|
|
101
|
+
Re-fetches metadata + thumbnail for every Figma link on the task. Per-link
|
|
102
|
+
failures are isolated.
|
|
103
|
+
|
|
104
|
+
```
|
|
105
|
+
$ lumo task figma refresh LUM-42
|
|
106
|
+
Refreshed 3 Figma links on LUM-42
|
|
107
|
+
✓ Onboarding · Welcome screen
|
|
108
|
+
✓ Onboarding · Sign-up form
|
|
109
|
+
✗ Design System · Button (file not accessible)
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
### When to suggest the `task figma` commands
|
|
113
|
+
|
|
114
|
+
- User pastes a Figma URL or mentions a design ("here's the mock", "the
|
|
115
|
+
Figma is at...").
|
|
116
|
+
- User asks "what designs are linked to this task" or "show me the Figma
|
|
117
|
+
for LUM-42".
|
|
118
|
+
- After implementing a UI change, suggest `lumo task figma refresh <task>`
|
|
119
|
+
if the user mentioned updating the Figma source.
|
|
120
|
+
|
|
121
|
+
OAuth connection lives in the Web UI at
|
|
122
|
+
`/settings/integrations`. The CLI does **not** have a `figma auth`
|
|
123
|
+
command; if the user tries `task figma add` without connecting, the error
|
|
124
|
+
message directs them to the Web UI.
|
|
@@ -0,0 +1,306 @@
|
|
|
1
|
+
# Document Management
|
|
2
|
+
|
|
3
|
+
## Document Management
|
|
4
|
+
|
|
5
|
+
### `lumo doc create [title] [flags]` — create a new document
|
|
6
|
+
|
|
7
|
+
Use this when the user wants to write a new document from the terminal. Title is positional and optional. When omitted, the doc title defaults to empty (server renders as "Untitled" via i18n).
|
|
8
|
+
|
|
9
|
+
| Flag | Type | Notes |
|
|
10
|
+
| ------------------ | ------------------- | ---------------------------------------------------------------------------------------------------------------- |
|
|
11
|
+
| `--content <text>` | string | Inline markdown body. |
|
|
12
|
+
| `--file <path>` | string | Read markdown body from file. |
|
|
13
|
+
| (stdin) | — | Pipe markdown; treated as content when stdin is not a TTY. |
|
|
14
|
+
| `--scope <scope>` | enum | `personal` (default) or `workspace`. Maps to PRIVATE / WORKSPACE. |
|
|
15
|
+
| `--project <ref>` | string | Project name or slug to file under. Default null. (Note: v1 does not server-resolve names; pass a cuid or omit.) |
|
|
16
|
+
| `--task <LUM-N>` | string | Bind to this task immediately after create. |
|
|
17
|
+
| `--tag <name>` | string (repeatable) | Attach tag by name. Creates tag if missing. Max 20 per call. |
|
|
18
|
+
| `--tag-id <cuid>` | string (repeatable) | Attach tag by id. Combines with `--tag`. Max 20 per call. |
|
|
19
|
+
| `--parent <doc>` | string | cuid or case-insensitive title. Files the new doc under this parent. Omit for root. |
|
|
20
|
+
|
|
21
|
+
The three content channels (`--content`, `--file`, stdin) are mutually exclusive — specify at most one. **`--file` is sandboxed:** the CLI rejects a path that resolves outside the current project directory (parent-traversal, absolute, escaping symlinks) or matches a sensitive-file denylist (`.env*`, private keys, `*.pem`/`*.key`, `credentials`, `.ssh`/`.aws` contents, …). Pass only project-local, non-secret files; there is no override flag.
|
|
22
|
+
|
|
23
|
+
Examples:
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
lumo doc create "RFC: doc CLI" --scope workspace --file scratch/rfc.md --task LUM-66
|
|
27
|
+
lumo doc create "RFC: tags" --tag rfc --tag draft
|
|
28
|
+
lumo doc create "Design spec" --tag-id clm_abc123 --tag draft
|
|
29
|
+
lumo doc create "Sub-doc" --parent "RFC"
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
Success output:
|
|
33
|
+
|
|
34
|
+
```
|
|
35
|
+
Created cmd_xxx "RFC: doc CLI" https://www.uselumo.ai/workspace/lumo/documents/rfc-doc-cli-42
|
|
36
|
+
Tags: rfc, draft
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
The cuid (`cmd_xxx`) is still printed as a stable identifier you can pass back into other `lumo doc ...` commands; the URL switched to the per-workspace slug shape (`slugify(title)-<number>`) and the cuid is no longer a valid web URL.
|
|
40
|
+
|
|
41
|
+
The `Tags:` line is omitted when no tags were attached.
|
|
42
|
+
|
|
43
|
+
### When to suggest `doc create`
|
|
44
|
+
|
|
45
|
+
- User says "write a doc", "起一篇 RFC", "新建文档", or describes a deliverable that should live as a document.
|
|
46
|
+
- After a discussion that needs a write-up, offer to create the doc with a title and the right scope.
|
|
47
|
+
|
|
48
|
+
### `lumo doc update <doc> [flags]` — update a document
|
|
49
|
+
|
|
50
|
+
`<doc>` accepts a cuid or a case-insensitive title. Ambiguous titles fail with a candidate list — re-run with the cuid.
|
|
51
|
+
|
|
52
|
+
| Flag | Type | Notes |
|
|
53
|
+
| ------------------------ | ------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
54
|
+
| `--title <text>` | string | New title (cannot be empty). |
|
|
55
|
+
| `--content <text>` | string | Replace content (inline). |
|
|
56
|
+
| `--file <path>` | string | Replace content from file. |
|
|
57
|
+
| (stdin) | — | Pipe to replace content. |
|
|
58
|
+
| `--scope <scope>` | enum | `personal` / `workspace`. |
|
|
59
|
+
| `--project <ref>` | string | Project name/slug. `--project ""` clears the filing. |
|
|
60
|
+
| `--tag <name>` | string (repeatable) | **Bulk replace** the tag set by name. Creates tag if missing. Max 20. Mutually exclusive with `--add-tag*` / `--remove-tag*`. |
|
|
61
|
+
| `--tag-id <cuid>` | string (repeatable) | **Bulk replace** the tag set by id. Max 20. Mutually exclusive with `--add-tag*` / `--remove-tag*`. |
|
|
62
|
+
| `--add-tag <name>` | string (repeatable) | Attach tag by name (find-or-create). Max 20. |
|
|
63
|
+
| `--add-tag-id <cuid>` | string (repeatable) | Attach tag by id. Max 20. |
|
|
64
|
+
| `--remove-tag <name>` | string (repeatable) | Detach tag by name. `--remove-tag <name>` resolves the name via find-or-create on the workspace. If the name was unknown, a new Tag row is created (orphan, no attachments) before the detach runs as a no-op. Use `--remove-tag-id <cuid>` to avoid orphans. Max 20. |
|
|
65
|
+
| `--remove-tag-id <cuid>` | string (repeatable) | Detach tag by id. Unknown ids are a no-op (no side effects). Max 20. |
|
|
66
|
+
|
|
67
|
+
`--tag` / `--tag-id` (bulk replace) are mutually exclusive with `--add-tag` / `--add-tag-id` / `--remove-tag` / `--remove-tag-id`. The CLI errors before any network call if both families are mixed.
|
|
68
|
+
|
|
69
|
+
Like `doc create`, `--file` is sandboxed: the CLI rejects paths that resolve outside the project directory or match the sensitive-file denylist (`.env*`, private keys, `credentials`, …). No override flag.
|
|
70
|
+
|
|
71
|
+
Examples:
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
lumo doc update "RFC: doc CLI" --scope personal
|
|
75
|
+
lumo doc update cmd_xxx --title "RFC v2"
|
|
76
|
+
lumo doc update cmd_xxx --file rfc-v2.md
|
|
77
|
+
lumo doc update RFC --add-tag urgent --remove-tag draft
|
|
78
|
+
lumo doc update cmd_xxx --tag final --tag approved # replace entire tag set
|
|
79
|
+
lumo doc update RFC --tag final --add-tag oops
|
|
80
|
+
# Error: --tag/--tag-id are mutually exclusive with --add-tag/--add-tag-id/--remove-tag/--remove-tag-id
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
### When to suggest `doc update`
|
|
84
|
+
|
|
85
|
+
- User wants to revise an existing doc.
|
|
86
|
+
- After running `lumo doc list` or `doc show`, if the user wants to change a doc's scope, title, or content.
|
|
87
|
+
|
|
88
|
+
### `lumo doc show <doc>` — print one document's detail
|
|
89
|
+
|
|
90
|
+
Prints a key:value header (id, title, scope, project, created/updated timestamps, mentioned tasks) and the content rendered back to markdown.
|
|
91
|
+
|
|
92
|
+
```bash
|
|
93
|
+
lumo doc show "RFC: doc CLI"
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
Note: the markdown rendered by `doc show` is best-effort. Round-trip via `doc show > tmp.md && doc update --file tmp.md` is NOT guaranteed to be a no-op.
|
|
97
|
+
|
|
98
|
+
Use when the user wants the current state or content of a doc without loading full task context.
|
|
99
|
+
|
|
100
|
+
### `lumo doc list [flags]` — list documents
|
|
101
|
+
|
|
102
|
+
Default behavior: lists every document the current user can see, as fixed-width rows: `<cuid> <SCOPE> <project|-> <title>`.
|
|
103
|
+
|
|
104
|
+
| Flag | Type | Notes |
|
|
105
|
+
| ----------------- | ------- | -------------------------------------------------------------------------------------- |
|
|
106
|
+
| `--scope <scope>` | enum | `personal`, `workspace`, or `all`. Default `all`. |
|
|
107
|
+
| `--project <ref>` | string | Filter by project. |
|
|
108
|
+
| `--task <LUM-N>` | string | Only docs bound to this task. Routes through `GET /api/tasks/<id>/documents`. |
|
|
109
|
+
| `--limit <n>` | int | Cap output to the first N rows. |
|
|
110
|
+
| `--tree` | boolean | Render as an indented tree (two spaces per depth level) instead of the flat row table. |
|
|
111
|
+
|
|
112
|
+
`--tree` plus the existing filters work together: the CLI fetches with the filters applied, then builds the tree from whatever rows came back. Docs whose parent is **not** in the result (e.g. filtered out by `--task LUM-N`) render as top-level rows. `--limit N --tree` truncates the flat list to N rows _before_ the tree is built, so a deeply nested subtree may not appear contiguously.
|
|
113
|
+
|
|
114
|
+
When `--task` is combined with `--scope` / `--project`, those become client-side filters on the task-scoped result.
|
|
115
|
+
|
|
116
|
+
Examples:
|
|
117
|
+
|
|
118
|
+
```bash
|
|
119
|
+
lumo doc list --scope workspace
|
|
120
|
+
lumo doc list --task LUM-42
|
|
121
|
+
lumo doc list --scope workspace --tree
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
### When to suggest `doc list`
|
|
125
|
+
|
|
126
|
+
- The user asks "what docs do I have", "show me workspace docs", "what's on LUM-42".
|
|
127
|
+
- Before suggesting `doc update` or `doc delete` when no doc ID is in context — run `doc list` first to surface candidates.
|
|
128
|
+
|
|
129
|
+
### `lumo doc move <doc> [flags]` — move a doc under a different parent or to root
|
|
130
|
+
|
|
131
|
+
Reparents a doc. `<doc>` accepts a cuid or a case-insensitive title; ambiguous titles fail with a candidate list — re-run with the cuid.
|
|
132
|
+
|
|
133
|
+
| Flag | Type | Notes |
|
|
134
|
+
| ---------------- | ------- | ------------------------------------------------ |
|
|
135
|
+
| `--parent <doc>` | string | New parent doc (cuid or case-insensitive title). |
|
|
136
|
+
| `--root` | boolean | Move to top level (`parentId = null`). |
|
|
137
|
+
|
|
138
|
+
`--parent` and `--root` are **mutually exclusive** and one of them is **required**. CLI errors before any network call if both or neither is supplied.
|
|
139
|
+
|
|
140
|
+
The new `sortOrder` is computed CLI-side as `max(sibling.sortOrder) + 1` — the moved doc lands at the end of its new sibling list. Reordering among siblings (`--before` / `--after`) is not yet supported; for now use the Web UI to reorder.
|
|
141
|
+
|
|
142
|
+
Examples:
|
|
143
|
+
|
|
144
|
+
```bash
|
|
145
|
+
lumo doc move "Sub-doc" --parent "Roadmap"
|
|
146
|
+
lumo doc move "Sub-doc" --root
|
|
147
|
+
lumo doc move cmd_xxx --parent cmd_yyy
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
Output:
|
|
151
|
+
|
|
152
|
+
```
|
|
153
|
+
Moved cmd_xxx "Sub-doc" → "Roadmap"
|
|
154
|
+
Moved cmd_xxx "Sub-doc" → root
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
### When to suggest `doc move`
|
|
158
|
+
|
|
159
|
+
- User says "move doc X under Y", "把文档 X 挂到 Y 下", "reparent X to root", "promote X to top level".
|
|
160
|
+
- After `doc create`, if the user realizes the new doc should live elsewhere in the tree — suggest `doc move` rather than recreating.
|
|
161
|
+
|
|
162
|
+
### `lumo doc delete <doc> --yes` — delete a document
|
|
163
|
+
|
|
164
|
+
Requires `--yes`; no interactive prompt (agent-friendly).
|
|
165
|
+
|
|
166
|
+
```bash
|
|
167
|
+
lumo doc delete cmd_xxx --yes
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
### `lumo doc bind <doc> <task>` — bind a doc to a task
|
|
171
|
+
|
|
172
|
+
Adds an explicit DocumentMention row. Survives content edits in the Web UI. If a CONTENT-derived mention already exists for the same pair, it's upgraded to EXPLICIT so a later `unbind` can remove it.
|
|
173
|
+
|
|
174
|
+
Output:
|
|
175
|
+
|
|
176
|
+
```
|
|
177
|
+
Bound cmd_xxx ↔ LUM-42
|
|
178
|
+
Bound cmd_xxx ↔ LUM-42 (upgraded from content) # when upgrading a CONTENT row
|
|
179
|
+
Already bound cmd_xxx ↔ LUM-42 # idempotent
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
### `lumo doc unbind <doc> <task>` — unbind a doc from a task
|
|
183
|
+
|
|
184
|
+
Removes EXPLICIT mentions only. A purely CONTENT-derived mention can't be unbound from CLI — fails with 409 and a message instructing the user to remove the @LUM-N from the doc body in the Web UI.
|
|
185
|
+
|
|
186
|
+
```bash
|
|
187
|
+
lumo doc unbind cmd_xxx LUM-42
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
### `lumo doc share <doc> <member> [--role viewer|editor|manager]` — share with a workspace member
|
|
191
|
+
|
|
192
|
+
Adds (or updates) a DocumentShare row for the given member. `<member>` resolves the same way as `task --assignee`: `me`, an email, or a display name (case-insensitive). Role defaults to `viewer`.
|
|
193
|
+
|
|
194
|
+
**Auto-promotion**: when invoked on a PRIVATE doc, server-side transactionally flips the doc's visibility to SHARED before upserting the share row. No flag needed — sharing a doc is treated as expressing the intent that it should be SHARED.
|
|
195
|
+
|
|
196
|
+
Examples:
|
|
197
|
+
|
|
198
|
+
```bash
|
|
199
|
+
lumo doc share "RFC" alice@example.com --role editor
|
|
200
|
+
lumo doc share cmd_xxx "Alice Wong" --role manager
|
|
201
|
+
lumo doc share cmd_xxx me # share with yourself (rare; mostly for testing)
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
Output:
|
|
205
|
+
|
|
206
|
+
```
|
|
207
|
+
Shared cmd_xxx ↔ Alice Wong (EDITOR)
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
A second invocation with a different role updates the existing row in place (upsert semantics).
|
|
211
|
+
|
|
212
|
+
### `lumo doc unshare <doc> <member>` — remove a member's share
|
|
213
|
+
|
|
214
|
+
Idempotent. If the member has no share row, prints `Not shared with <name>` and exits 0.
|
|
215
|
+
|
|
216
|
+
```bash
|
|
217
|
+
lumo doc unshare "RFC" alice@example.com
|
|
218
|
+
# → Unshared cmd_xxx ↔ Alice Wong
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
Unshare does **not** flip visibility back to PRIVATE — that has to be done explicitly via `lumo doc update --scope personal`.
|
|
222
|
+
|
|
223
|
+
### `lumo doc share-list <doc>` — list current shares
|
|
224
|
+
|
|
225
|
+
Prints fixed-width rows: `<displayName> <ROLE>`. Empty output means the doc has no shares (it may still be WORKSPACE-visible).
|
|
226
|
+
|
|
227
|
+
```bash
|
|
228
|
+
lumo doc share-list "RFC"
|
|
229
|
+
# Alice Wong EDITOR
|
|
230
|
+
# Bob Chan VIEWER
|
|
231
|
+
```
|
|
232
|
+
|
|
233
|
+
### When to suggest the doc share commands
|
|
234
|
+
|
|
235
|
+
- User says "share doc X with Y", "give Y access to X", "把文档分享给 Y"
|
|
236
|
+
- After `doc create --scope personal`, if the user mentions teammates needing access, suggest `doc share` rather than `doc update --scope workspace` when only specific members should see it
|
|
237
|
+
- Before `doc unshare`, run `doc share-list` if the user hasn't named a specific member
|
|
238
|
+
|
|
239
|
+
### `lumo doc import-gdoc <url> [--scope personal|workspace] [--task LUM-N]` — import a Google Doc
|
|
240
|
+
|
|
241
|
+
One-way import of a Google Doc into Lumo. The doc is exported from Google as markdown and turned into a native Lumo document (markdown → HTML), storing the source `googleDocId` and importer so it can be re-synced later (`lumo doc sync`). `<url>` accepts a Google Doc URL or a bare doc id.
|
|
242
|
+
|
|
243
|
+
| Flag | Type | Notes |
|
|
244
|
+
| ----------------- | ------ | ------------------------------------------------------------------------------------------ |
|
|
245
|
+
| `--scope <scope>` | enum | `personal` (→ PRIVATE) or `workspace` (→ WORKSPACE). Omit to use the server default scope. |
|
|
246
|
+
| `--task <LUM-N>` | string | Bind the imported doc to this task immediately after import. |
|
|
247
|
+
|
|
248
|
+
**Over-share note:** once imported, the content follows **Lumo's** sharing model (PRIVATE / SHARED / WORKSPACE) and is **no longer gated by Google permissions**. Importing a `workspace`-scoped doc can therefore expose it to everyone in the workspace even if the Google Doc was restricted — the command prints this reminder on success.
|
|
249
|
+
|
|
250
|
+
Requires a connected Google Drive integration; connect it in the Web UI at `/settings/integrations`. There is no CLI `google auth` command.
|
|
251
|
+
|
|
252
|
+
```bash
|
|
253
|
+
lumo doc import-gdoc "https://docs.google.com/document/d/<id>/edit"
|
|
254
|
+
lumo doc import-gdoc "https://docs.google.com/document/d/<id>/edit" --scope workspace --task LUM-127
|
|
255
|
+
```
|
|
256
|
+
|
|
257
|
+
Output:
|
|
258
|
+
|
|
259
|
+
```
|
|
260
|
+
Imported cmd_xxx "Quarterly Plan" https://www.uselumo.ai/workspace/lumo/documents/quarterly-plan-42
|
|
261
|
+
Note: imported content follows Lumo sharing and is no longer gated by Google permissions.
|
|
262
|
+
Bound cmd_xxx ↔ LUM-127
|
|
263
|
+
```
|
|
264
|
+
|
|
265
|
+
The `Bound ... ↔ LUM-N` line appears only when `--task` is supplied.
|
|
266
|
+
|
|
267
|
+
### When to suggest `doc import-gdoc`
|
|
268
|
+
|
|
269
|
+
- User pastes a Google Doc URL or says "import this Google Doc", "pull this gdoc into Lumo", "把这篇 Google 文档导入".
|
|
270
|
+
- User wants a Google Doc tracked alongside Lumo tasks/docs — suggest import (with `--task LUM-N` if a task is in context) and remind them about the over-share semantics for `--scope workspace`.
|
|
271
|
+
|
|
272
|
+
### `lumo doc sync <doc>` — re-sync an imported doc from Google
|
|
273
|
+
|
|
274
|
+
Re-imports a previously imported Google Doc and **overwrites the Lumo body** with the current Google content. **One-way and destructive** — any edits made to the doc inside Lumo are discarded; Google is the source of truth for synced docs.
|
|
275
|
+
|
|
276
|
+
Sync always runs as the **importer** (owner model): it re-exports using the importer's stored Google token, not the token of whoever runs the command. If the importer has lost access to the Google Doc, sync fails with a clear error.
|
|
277
|
+
|
|
278
|
+
`<doc>` accepts a doc cuid or a case-insensitive title; ambiguous titles fail with a candidate list — re-run with the cuid.
|
|
279
|
+
|
|
280
|
+
```bash
|
|
281
|
+
lumo doc sync cmd_xxx
|
|
282
|
+
lumo doc sync "Quarterly Plan"
|
|
283
|
+
```
|
|
284
|
+
|
|
285
|
+
Output:
|
|
286
|
+
|
|
287
|
+
```
|
|
288
|
+
Synced cmd_xxx "Quarterly Plan" from Google
|
|
289
|
+
```
|
|
290
|
+
|
|
291
|
+
### When to suggest `doc sync`
|
|
292
|
+
|
|
293
|
+
- User says "re-sync the Google Doc", "pull the latest from Google", "refresh the imported doc", "更新一下从 Google 导入的文档".
|
|
294
|
+
- After the user mentions the Google Doc changed upstream. Warn first that local Lumo edits to that doc will be overwritten (one-way, destructive).
|
|
295
|
+
|
|
296
|
+
### Out of scope (CLI v1)
|
|
297
|
+
|
|
298
|
+
The CLI does **not** currently support:
|
|
299
|
+
|
|
300
|
+
- `--from-editor` (interactive $EDITOR).
|
|
301
|
+
- Lossless markdown round-trip.
|
|
302
|
+
- Reordering siblings within the same parent (`--before` / `--after`); use the Web UI for that.
|
|
303
|
+
|
|
304
|
+
### When to suggest session binding for docs
|
|
305
|
+
|
|
306
|
+
If user creates a doc with `--task LUM-N` and the current Claude Code session is not bound, suggest `lumo session attach LUM-N` so subsequent hook events also tag that task.
|