orbitmap 0.3.0 → 0.4.0-next.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.
Files changed (158) hide show
  1. package/README.md +443 -212
  2. package/dist/adapters/cloud.d.ts +334 -0
  3. package/dist/adapters/cloud.js +520 -0
  4. package/dist/adapters/cloud.js.map +1 -0
  5. package/dist/adapters/factory.d.ts +11 -0
  6. package/dist/adapters/factory.js +27 -0
  7. package/dist/adapters/factory.js.map +1 -0
  8. package/dist/adapters/local/adapter.d.ts +351 -0
  9. package/dist/adapters/local/adapter.js +346 -0
  10. package/dist/adapters/local/adapter.js.map +1 -0
  11. package/dist/adapters/local/context.d.ts +111 -0
  12. package/dist/adapters/local/context.js +136 -0
  13. package/dist/adapters/local/context.js.map +1 -0
  14. package/dist/adapters/local/entities/documents.d.ts +85 -0
  15. package/dist/adapters/local/entities/documents.js +251 -0
  16. package/dist/adapters/local/entities/documents.js.map +1 -0
  17. package/dist/adapters/local/entities/planning.d.ts +108 -0
  18. package/dist/adapters/local/entities/planning.js +540 -0
  19. package/dist/adapters/local/entities/planning.js.map +1 -0
  20. package/dist/adapters/local/entities/tasks.d.ts +95 -0
  21. package/dist/adapters/local/entities/tasks.js +442 -0
  22. package/dist/adapters/local/entities/tasks.js.map +1 -0
  23. package/dist/adapters/local/entities/work-items.d.ts +110 -0
  24. package/dist/adapters/local/entities/work-items.js +623 -0
  25. package/dist/adapters/local/entities/work-items.js.map +1 -0
  26. package/dist/adapters/local/rules.d.ts +172 -0
  27. package/dist/adapters/local/rules.js +319 -0
  28. package/dist/adapters/local/rules.js.map +1 -0
  29. package/dist/adapters/local/shapes.d.ts +209 -0
  30. package/dist/adapters/local/shapes.js +558 -0
  31. package/dist/adapters/local/shapes.js.map +1 -0
  32. package/dist/adapters/local/store.d.ts +200 -0
  33. package/dist/adapters/local/store.js +665 -0
  34. package/dist/adapters/local/store.js.map +1 -0
  35. package/dist/adapters/local/types.d.ts +226 -0
  36. package/dist/adapters/local/types.js +41 -0
  37. package/dist/adapters/local/types.js.map +1 -0
  38. package/dist/adapters/types.d.ts +332 -0
  39. package/dist/adapters/types.js +2 -0
  40. package/dist/adapters/types.js.map +1 -0
  41. package/dist/agent-instructions.d.ts +25 -9
  42. package/dist/agent-instructions.js +285 -237
  43. package/dist/agent-instructions.js.map +1 -1
  44. package/dist/api-client.d.ts +8 -239
  45. package/dist/api-client.js +8 -403
  46. package/dist/api-client.js.map +1 -1
  47. package/dist/commands/agents.d.ts +1 -1
  48. package/dist/commands/agents.js +10 -10
  49. package/dist/commands/agents.js.map +1 -1
  50. package/dist/commands/areas.d.ts +3 -0
  51. package/dist/commands/areas.js +29 -0
  52. package/dist/commands/areas.js.map +1 -0
  53. package/dist/commands/assign.d.ts +3 -2
  54. package/dist/commands/assign.js +47 -15
  55. package/dist/commands/assign.js.map +1 -1
  56. package/dist/commands/context.d.ts +1 -1
  57. package/dist/commands/context.js +18 -12
  58. package/dist/commands/context.js.map +1 -1
  59. package/dist/commands/create-area.d.ts +7 -0
  60. package/dist/commands/create-area.js +29 -0
  61. package/dist/commands/create-area.js.map +1 -0
  62. package/dist/commands/create.d.ts +3 -1
  63. package/dist/commands/create.js +4 -2
  64. package/dist/commands/create.js.map +1 -1
  65. package/dist/commands/dep.d.ts +2 -2
  66. package/dist/commands/dep.js +3 -3
  67. package/dist/commands/dep.js.map +1 -1
  68. package/dist/commands/doc-import.d.ts +1 -1
  69. package/dist/commands/doc-import.js +2 -2
  70. package/dist/commands/doc-import.js.map +1 -1
  71. package/dist/commands/doc-patch.d.ts +1 -1
  72. package/dist/commands/doc-patch.js +2 -2
  73. package/dist/commands/doc-patch.js.map +1 -1
  74. package/dist/commands/doc-share.d.ts +6 -6
  75. package/dist/commands/doc-share.js +13 -13
  76. package/dist/commands/doc-share.js.map +1 -1
  77. package/dist/commands/doc-update.d.ts +1 -1
  78. package/dist/commands/doc-update.js +2 -2
  79. package/dist/commands/doc-update.js.map +1 -1
  80. package/dist/commands/doc.d.ts +1 -1
  81. package/dist/commands/doc.js +5 -4
  82. package/dist/commands/doc.js.map +1 -1
  83. package/dist/commands/docs-cache.d.ts +2 -2
  84. package/dist/commands/docs-cache.js +3 -3
  85. package/dist/commands/docs-cache.js.map +1 -1
  86. package/dist/commands/docs.d.ts +1 -1
  87. package/dist/commands/docs.js +2 -2
  88. package/dist/commands/docs.js.map +1 -1
  89. package/dist/commands/get.d.ts +1 -1
  90. package/dist/commands/get.js +43 -3
  91. package/dist/commands/get.js.map +1 -1
  92. package/dist/commands/ideas.d.ts +4 -4
  93. package/dist/commands/ideas.js +5 -5
  94. package/dist/commands/ideas.js.map +1 -1
  95. package/dist/commands/init.d.ts +17 -3
  96. package/dist/commands/init.js +262 -30
  97. package/dist/commands/init.js.map +1 -1
  98. package/dist/commands/intent.d.ts +41 -0
  99. package/dist/commands/intent.js +237 -0
  100. package/dist/commands/intent.js.map +1 -0
  101. package/dist/commands/issues.d.ts +6 -5
  102. package/dist/commands/issues.js +7 -6
  103. package/dist/commands/issues.js.map +1 -1
  104. package/dist/commands/log.d.ts +1 -1
  105. package/dist/commands/log.js +2 -2
  106. package/dist/commands/log.js.map +1 -1
  107. package/dist/commands/mission.d.ts +42 -0
  108. package/dist/commands/mission.js +219 -0
  109. package/dist/commands/mission.js.map +1 -0
  110. package/dist/commands/orbit.d.ts +40 -3
  111. package/dist/commands/orbit.js +231 -58
  112. package/dist/commands/orbit.js.map +1 -1
  113. package/dist/commands/overview.d.ts +2 -2
  114. package/dist/commands/overview.js +25 -28
  115. package/dist/commands/overview.js.map +1 -1
  116. package/dist/commands/setup-agent.d.ts +11 -0
  117. package/dist/commands/setup-agent.js +47 -25
  118. package/dist/commands/setup-agent.js.map +1 -1
  119. package/dist/commands/setup-mcp.d.ts +1 -1
  120. package/dist/commands/setup-mcp.js +9 -9
  121. package/dist/commands/setup-mcp.js.map +1 -1
  122. package/dist/commands/start.d.ts +1 -1
  123. package/dist/commands/start.js +2 -2
  124. package/dist/commands/start.js.map +1 -1
  125. package/dist/commands/status.d.ts +2 -1
  126. package/dist/commands/status.js +3 -3
  127. package/dist/commands/status.js.map +1 -1
  128. package/dist/commands/subtask.d.ts +1 -1
  129. package/dist/commands/subtask.js +2 -2
  130. package/dist/commands/subtask.js.map +1 -1
  131. package/dist/commands/task-edit-content.d.ts +1 -1
  132. package/dist/commands/task-edit-content.js +2 -2
  133. package/dist/commands/task-edit-content.js.map +1 -1
  134. package/dist/commands/task.d.ts +10 -3
  135. package/dist/commands/task.js +16 -8
  136. package/dist/commands/task.js.map +1 -1
  137. package/dist/commands/tasks.d.ts +1 -1
  138. package/dist/commands/tasks.js +2 -2
  139. package/dist/commands/tasks.js.map +1 -1
  140. package/dist/commands/vibes.d.ts +4 -4
  141. package/dist/commands/vibes.js +5 -5
  142. package/dist/commands/vibes.js.map +1 -1
  143. package/dist/config.d.ts +10 -2
  144. package/dist/config.js +13 -4
  145. package/dist/config.js.map +1 -1
  146. package/dist/doc-cache.d.ts +2 -2
  147. package/dist/doc-cache.js.map +1 -1
  148. package/dist/errors.d.ts +19 -2
  149. package/dist/errors.js +35 -0
  150. package/dist/errors.js.map +1 -1
  151. package/dist/index.js +452 -93
  152. package/dist/index.js.map +1 -1
  153. package/dist/output.js +7 -2
  154. package/dist/output.js.map +1 -1
  155. package/dist/workspace-resolve.d.ts +126 -0
  156. package/dist/workspace-resolve.js +203 -0
  157. package/dist/workspace-resolve.js.map +1 -0
  158. package/package.json +53 -50
package/README.md CHANGED
@@ -1,212 +1,443 @@
1
- # OrbitMap CLI
2
-
3
- > Project management for AI coding agents — without MCP.
4
-
5
- ## What is this?
6
-
7
- OrbitMap CLI gives AI agents (Gemini CLI, GPT Codex, Claude Code without MCP, etc.) access to [OrbitMap](https://orbitmap.app) project management through simple shell commands. It's the non-MCP alternative to [orbitmap-mcp](https://github.com/BTA-Systems/orbitmap-mcp).
8
-
9
- **Use cases:**
10
- - AI agents that can run shell commands but don't support MCP (Gemini CLI, GPT Codex CLI)
11
- - Environments where MCP configuration is impractical
12
- - Quick task management from your terminal
13
-
14
- ## Quick Start
15
-
16
- ```bash
17
- # 1. Run the setup wizard
18
- npx orbitmap init
19
-
20
- # 2. Enter your credentials:
21
- # - API Key (from OrbitMap dashboard)
22
- # - Project ID (optional auto-detected if you have one project)
23
-
24
- # 3. Start working
25
- npx orbitmap start
26
- ```
27
-
28
- ## Commands
29
-
30
- ### Task Management
31
-
32
- | Command | Description |
33
- |---------|-------------|
34
- | `orbitmap tasks` | List your assigned tasks |
35
- | `orbitmap task <id>` | Show full task details (UUID or 6-char task number) |
36
- | `orbitmap start [id]` | Start working on a task (auto-picks next TODO if no ID) |
37
- | `orbitmap status <task-id> <status>` | Update task status |
38
- | `orbitmap create <title>` | Create a new task (`--from-issue` to link an issue) |
39
- | `orbitmap subtask <parent-id> <title>` | Create a subtask |
40
- | `orbitmap assign <task-id> <agent-id>` | Assign an agent to a task |
41
- | `orbitmap get <prefixed-id>` | Show any object by prefixed ID (TS-xxx, IS-xxx, ID-xxx, VB-xxx) |
42
- | `orbitmap dep add <id> <target-id>` | Add a dependency between tasks |
43
- | `orbitmap dep remove <id> <target-id>` | Remove a dependency |
44
- | `orbitmap task-edit-content <id>` | Edit task title, description, or agent instructions |
45
-
46
- **Valid statuses:** `backlog`, `todo`, `in_progress`, `in_review`, `review_changes`, `done`, `blocked`
47
-
48
- ### Work Logging
49
-
50
- | Command | Description |
51
- |---------|-------------|
52
- | `orbitmap log <task-id> <message>` | Log work on a task |
53
-
54
- **Options:**
55
- - `--type <type>` — Log type: `note` (default), `code_change`, `decision`, `blocker`
56
- - `--meta <json>` — JSON metadata, e.g. `'{"files":["src/app.ts"]}'`
57
-
58
- **Examples:**
59
- ```bash
60
- orbitmap log abc123 "Implemented user auth endpoint" --type code_change
61
- orbitmap log abc123 "Using JWT over sessions for stateless auth" --type decision
62
- orbitmap log abc123 "Blocked on missing API credentials" --type blocker
63
- ```
64
-
65
- ### Documents
66
-
67
- | Command | Description |
68
- |---------|-------------|
69
- | `orbitmap docs` | List project documents |
70
- | `orbitmap doc <id-or-slug>` | Show full document content |
71
- | `orbitmap doc-import <title>` | Import a markdown file (`--context` to set when-to-use hint) |
72
- | `orbitmap doc-update <id-or-slug>` | Update a document from a file |
73
- | `orbitmap doc-patch <id-or-slug>` | Patch a document with operations (replace_section, append, etc.) |
74
- | `orbitmap doc-share <doc-id> <project-id>` | Share a document with another project |
75
- | `orbitmap doc-unshare <doc-id> <project-id>` | Remove document sharing |
76
- | `orbitmap docs pull [slug]` | Download document(s) to local cache |
77
- | `orbitmap docs list-cache` | Show locally cached documents |
78
- | `orbitmap docs clean` | Remove stale cached documents |
79
-
80
- **Examples:**
81
- ```bash
82
- # List all API docs
83
- orbitmap docs --type api
84
-
85
- # Search documents by title
86
- orbitmap docs --search "auth"
87
-
88
- # View a document
89
- orbitmap doc api-specification
90
-
91
- # Import a new document
92
- orbitmap doc-import "API Spec" --type api --file ./docs/api-spec.md
93
-
94
- # Update existing document
95
- orbitmap doc-update api-specification --file ./docs/api-spec.md --changelog "Added auth section"
96
-
97
- # Share with another project
98
- orbitmap doc-share <doc-uuid> <project-uuid> --agents agent1-uuid,agent2-uuid
99
- ```
100
-
101
- ### Project & Agent Info
102
-
103
- | Command | Description |
104
- |---------|-------------|
105
- | `orbitmap context` | Show agent identity and current project |
106
- | `orbitmap projects` | List all your projects |
107
- | `orbitmap members <project-id>` | List agents and users in a project (accepts slug) |
108
- | `orbitmap overview [project-id]` | Project overview with task statistics (uses default project) |
109
-
110
- ### Issues, Ideas & Vibes
111
-
112
- | Command | Description |
113
- |---------|-------------|
114
- | `orbitmap issues` | List open issues |
115
- | `orbitmap issue show <id>` | Show issue details (UUID or number) |
116
- | `orbitmap issue register` | Register a new issue |
117
- | `orbitmap issue resolve <id>` | Resolve an issue |
118
- | `orbitmap ideas` | List ideas |
119
- | `orbitmap idea add` | Add a new idea |
120
- | `orbitmap idea show <id>` | Show idea details (UUID or number) |
121
- | `orbitmap idea status <id>` | Update idea status |
122
- | `orbitmap vibes` | List vibes |
123
- | `orbitmap vibe log` | Log a new vibe |
124
- | `orbitmap vibe show <id>` | Show vibe details |
125
- | `orbitmap vibe update <id>` | Update a vibe |
126
-
127
- ### Orbits
128
-
129
- | Command | Description |
130
- |---------|-------------|
131
- | `orbitmap orbit items <id-or-slug>` | List items in an orbit |
132
- | `orbitmap orbit attach <id-or-slug>` | Attach an object to an orbit |
133
- | `orbitmap orbit detach <id-or-slug>` | Detach an object from an orbit |
134
-
135
- ### Delivery Status
136
-
137
- Track code delivery lifecycle on tasks:
138
-
139
- ```bash
140
- orbitmap status abc123 done --delivery on_branch
141
- orbitmap status abc123 done --delivery merged
142
- orbitmap status abc123 done --delivery released
143
- ```
144
-
145
- ### Global Options
146
-
147
- | Option | Description |
148
- |--------|-------------|
149
- | `--json` | Output raw JSON (for scripting/piping) |
150
- | `--project <id>` | Override project context (UUID or slug) |
151
-
152
- ## Configuration
153
-
154
- ### Setup
155
-
156
- Run `npx orbitmap init` for interactive setup. Credentials are stored in `~/.orbitmap/config.json`.
157
-
158
- ### Config file
159
-
160
- ```json
161
- {
162
- "api_url": "https://orbitmap.app/api/agent",
163
- "api_key": "orbitmap_...",
164
- "project_id": "my-project-slug"
165
- }
166
- ```
167
-
168
- ### Environment Variables
169
-
170
- Environment variables take precedence over the config file:
171
-
172
- | Variable | Description |
173
- |----------|-------------|
174
- | `ORBITMAP_API_KEY` | Agent API key |
175
- | `ORBITMAP_API_URL` | API base URL (default: `https://orbitmap.app/api/agent`) |
176
- | `ORBITMAP_PROJECT_ID` | Project UUID or slug |
177
-
178
- ### Resolution Priority
179
-
180
- 1. Environment variables
181
- 2. Config file (`~/.orbitmap/config.json`)
182
- 3. Defaults
183
-
184
- ## Authentication
185
-
186
- OrbitMap CLI uses a single **Agent API Key** for authentication (`Authorization: Bearer` header). Each agent has its own key — get it from the OrbitMap dashboard.
187
-
188
- Optionally, set a default **Project ID** if your agent is assigned to multiple projects.
189
-
190
- ## For AI Agents
191
-
192
- Run the setup wizard to teach your agent about OrbitMap:
193
-
194
- ```bash
195
- npx orbitmap setup-agent # auto-detects your agent
196
- npx orbitmap setup-agent --agent claude
197
- ```
198
-
199
- It installs two layers, mirroring the OrbitMap MCP server:
200
-
201
- - A **thin always-on hook** (~10 lines) in your agent config (`CLAUDE.md`, `AGENTS.md`, …) so the agent always knows the project uses OrbitMap and knows the workflow skeleton.
202
- - The **deep, on-demand instructions** — full parity with the MCP `full` profile (all 27 tools mapped to commands). For **Claude Code** this is installed as a loaded-on-demand skill at `.claude/skills/orbitmap/SKILL.md` (zero per-turn context cost); for other agents it's inlined as a markdown fallback.
203
-
204
- See [Agent Instructions](docs/agent-instructions.md) for details.
205
-
206
- ## Requirements
207
-
208
- - Node.js 18+
209
-
210
- ## License
211
-
212
- MIT
1
+ # OrbitMap CLI
2
+
3
+ > Project management for AI coding agents — without MCP.
4
+
5
+ ## What is this?
6
+
7
+ OrbitMap CLI gives AI agents (Gemini CLI, GPT Codex, Claude Code without MCP, etc.) access to [OrbitMap](https://orbitmap.app) project management through simple shell commands. It's the non-MCP alternative to [orbitmap-mcp](https://github.com/BTA-Systems/orbitmap-mcp), and tracks the same Agent API contract (currently **schema_version 6.3.0**).
8
+
9
+ **Use cases:**
10
+ - AI agents that can run shell commands but don't support MCP (Gemini CLI, GPT Codex CLI)
11
+ - Environments where MCP configuration is impractical
12
+ - Quick task management from your terminal
13
+
14
+ ## Quick Start
15
+
16
+ ```bash
17
+ # 1. Run the setup wizard — it asks where your data should live:
18
+ # [1] Orbitmap.ai account (cloud) [2] Local files (no account)
19
+ npx orbitmap init
20
+
21
+ # 2. Cloud: enter your credentials
22
+ # - API Key (from OrbitMap dashboard)
23
+ # - Area ID (optional — auto-detected if you belong to a single area)
24
+ # Local: pick a workspace directory, a workspace name and a first area
25
+
26
+ # 3. Start working
27
+ npx orbitmap start
28
+ ```
29
+
30
+ ## Local mode
31
+
32
+ The CLI runs in one of two modes, chosen once during `orbitmap init`:
33
+
34
+ | | **Cloud mode** | **Local mode** |
35
+ |---|---|---|
36
+ | Storage | Orbitmap.ai workspace (Agent API) | Markdown files with YAML frontmatter on your disk |
37
+ | Account | required | none |
38
+ | Web UI, team, multiple agents | yes | no solo developer |
39
+ | Commands | all of them | all of them, minus the limitations below |
40
+
41
+ Both modes speak the **same commands with the same output** `orbitmap start`, `orbitmap log`,
42
+ `orbitmap tasks --json` behave identically, and agent skills installed by `orbitmap init` never
43
+ need to know which mode is active.
44
+
45
+ ### Set up local mode
46
+
47
+ Interactive — answer `2` at the mode question, then accept or override the three defaults
48
+ (workspace directory `./.orbitmap`, workspace name, first area):
49
+
50
+ ```bash
51
+ npx orbitmap init
52
+ ```
53
+
54
+ Scripted / CI:
55
+
56
+ ```bash
57
+ npx orbitmap init --local \
58
+ --workspace ~/orbits/personal \ # where the files live (default: ./.orbitmap)
59
+ --workspace-name "My Orbit" \ # default: current directory name
60
+ --area "My App" \ # first area (default: current directory name)
61
+ --no-skills # skip installing agent skills
62
+ ```
63
+
64
+ If the workspace directory is **outside** the project, `init` writes a pointer at
65
+ `<project>/.orbitmap/link.json` (`{"workspace": "…", "area": "…"}`) and adds `.orbitmap/` to
66
+ `.gitignore`. The pointer is found by walking up from the current directory, like `.git`, so
67
+ commands work from any subdirectory. If the workspace *is* `./.orbitmap`, nothing is gitignored —
68
+ the data is meant to be committable.
69
+
70
+ Resolution order for the workspace directory: `--workspace` `ORBITMAP_WORKSPACE`
71
+ `.orbitmap/link.json` `./.orbitmap/workspace.yml` `workspace_path` in
72
+ `~/.orbitmap/config.json`. The mode itself is resolved per-project, first match wins: `--workspace`
73
+ (explicit local) `ORBITMAP_MODE=local|cloud` auto-detect (walk up from cwd looking for
74
+ `.orbitmap/workspace.yml` or `.orbitmap/link.json`, same as git looking for `.git` local)
75
+ `mode` in the config file, defaulting to `cloud` when absent. The auto-detect rung is what lets
76
+ one project stay local and another stay cloud on the same machine — `init` never writes `mode` to
77
+ the global config.
78
+
79
+ ### Where the data lives
80
+
81
+ ```
82
+ <workspace-dir>/
83
+ workspace.yml # workspace header, default area + entity-number counters
84
+ missions/MS-<num>.md
85
+ intents/IN-<num>.md
86
+ ideas/ID-<num>.md
87
+ documents/<slug>.md
88
+ issues/IS-<num>.md # workspace-level issues (no area)
89
+ areas/
90
+ <area-slug>/
91
+ area.yml # area header (git url, default branch, …)
92
+ tasks/TS-<num>.md
93
+ issues/IS-<num>.md # area-scoped issues
94
+ vibes/VB-<num>.md
95
+ ```
96
+
97
+ Every entity is one Markdown file: the YAML frontmatter holds the fields, the body holds the long
98
+ text (`## Description`, and for tasks an append-only `## Work Log`). Relations are stored as entity
99
+ numbers and slugs, so the files stay readable and diff cleanly in git.
100
+
101
+ **The CLI is the only writer.** Editing these files by hand (or letting an agent do it) bypasses
102
+ validation and the counters — always go through `orbitmap` commands.
103
+
104
+ ### Current limitations
105
+
106
+ Local mode is a proof of concept. Not supported yet:
107
+
108
+ - **No import/export between a local workspace and the cloud** (planned next; entity-number format
109
+ and response shapes are already identical so the future import is a data copy).
110
+ - **No orbits** `orbit *` commands fail with `NOT_SUPPORTED_IN_LOCAL_MODE` and exit 1.
111
+ - **No document section-patching, sharing or presigned uploads** — `doc-patch`, `doc-share`,
112
+ `doc-unshare`, `doc-visibility` fail the same way. `docs`, `doc`, `doc-import` and `doc-update`
113
+ work.
114
+ - **No OAuth** (`login` / `logout`) meaningless without a server.
115
+ - **No human team members**: exactly one implicit user (`me`) and one implicit agent
116
+ (`local-agent`). `members` returns them; `assign` accepts only them.
117
+ - **No sync or merge between machines** you may sync the workspace directory with git yourself,
118
+ the CLI does not mediate conflicts.
119
+
120
+ See [`docs/architecture.md`](docs/architecture.md) for the adapter split and
121
+ [`docs/adr/0001-local-mode.md`](docs/adr/0001-local-mode.md) for why local storage exists at all.
122
+
123
+ ## Object model
124
+
125
+ OrbitMap organises work on several levels. The CLI mirrors them 1:1:
126
+
127
+ | Level | Prefix | What it is |
128
+ |-------|--------|-----------|
129
+ | **Workspace** | | Top-level container that owns areas, orbits, intents and missions |
130
+ | **Area** | — | A single product/repo/domain (formerly called *project*) — the default scope of most commands |
131
+ | **Orbit** | | Cross-area grouping of work (a theme, an initiative); items of any type can be attached |
132
+ | **Intent** | `IN-` | A desired outcome at workspace level; tasks and issues can be linked to it |
133
+ | **Mission** | `MS-` | A time-boxed workspace focus; only one mission can be `active` |
134
+ | **Task** | `TS-` | The unit of work agents execute |
135
+ | **Issue** | `IS-` | A reported problem |
136
+ | **Idea** | `ID-` | A future possibility |
137
+ | **Vibe** | `VB-` | Ad-hoc work context outside the task lifecycle |
138
+
139
+ > **Project → Area rename.** What used to be called a *project* is now an **area**. The global flag is `--area`, the env var is `ORBITMAP_AREA`, and the config key is `area`. Legacy `ORBITMAP_PROJECT_ID` / `project_id` are still read as a fallback, so old configs keep working — but they are never written back.
140
+
141
+ ## Commands
142
+
143
+ ### Task Management
144
+
145
+ | Command | Description |
146
+ |---------|-------------|
147
+ | `orbitmap tasks` | List your assigned tasks (`--status`, `--priority`, `--orbit`) |
148
+ | `orbitmap task <id>` | Show full task details (UUID or 6-char task number) |
149
+ | `orbitmap start [id]` | Start working on a task (auto-picks next TODO if no ID) |
150
+ | `orbitmap status <task-id> <status>` | Update task status (`--force` to move a parent to `done` with unfinished subtasks) |
151
+ | `orbitmap create <title>` | Create a new task (`--from-issue`, `--intent`, `--orbit`) |
152
+ | `orbitmap subtask <parent-id> <title>` | Create a subtask |
153
+ | `orbitmap assign <id> [agent-id]` | Assign a task, issue, idea, or intent to an agent or user |
154
+ | `orbitmap get <prefixed-id>` | Show any object by prefixed ID (TS-, IS-, ID-, VB-, IN-, MS-) |
155
+ | `orbitmap dep add <id> <target-id>` | Add a dependency between tasks |
156
+ | `orbitmap dep remove <id> <target-id>` | Remove a dependency |
157
+ | `orbitmap task-edit-content <id>` | Edit task title, description, or agent instructions |
158
+
159
+ **Valid statuses:** `backlog`, `todo`, `in_progress`, `in_review`, `review_changes`, `done`, `blocked`
160
+
161
+ `assign` auto-detects the object type from the prefix (`IS-…` → issue, `IN-…` → intent, …); pass `--type task|issue|idea|intent` for bare UUIDs.
162
+
163
+ ### Work Logging
164
+
165
+ | Command | Description |
166
+ |---------|-------------|
167
+ | `orbitmap log <task-id> <message>` | Log work on a task |
168
+
169
+ **Options:**
170
+ - `--type <type>` Log type: `note` (default), `code_change`, `decision`, `blocker`, `discovery`, `exploration`, `fix`
171
+ - `--meta <json>` — JSON metadata, e.g. `'{"files":["src/app.ts"]}'`
172
+
173
+ **Examples:**
174
+ ```bash
175
+ orbitmap log abc123 "Implemented user auth endpoint" --type code_change
176
+ orbitmap log abc123 "Using JWT over sessions for stateless auth" --type decision
177
+ orbitmap log abc123 "Blocked on missing API credentials" --type blocker
178
+ ```
179
+
180
+ ### Documents
181
+
182
+ | Command | Description |
183
+ |---------|-------------|
184
+ | `orbitmap docs` | List area documents |
185
+ | `orbitmap doc <id-or-slug>` | Show document (TOC by default, `--full`, `--section`) |
186
+ | `orbitmap doc-import <title>` | Import a markdown file (`--context` to set when-to-use hint) |
187
+ | `orbitmap doc-update <id-or-slug>` | Replace a document from a file |
188
+ | `orbitmap doc-patch <id-or-slug>` | Patch a document with section operations |
189
+ | `orbitmap doc-share <doc-id> <area-id>` | Share a document with another area |
190
+ | `orbitmap doc-unshare <doc-id> <area-id>` | Remove document sharing |
191
+ | `orbitmap doc-visibility <doc-id> <area-id>` | Restrict a share to specific agents (or allow all) |
192
+ | `orbitmap docs pull [slug]` | Download document(s) to local cache |
193
+ | `orbitmap docs list-cache` | Show locally cached documents |
194
+ | `orbitmap docs clean` | Remove stale cached documents |
195
+
196
+ **Examples:**
197
+ ```bash
198
+ # List all API docs
199
+ orbitmap docs --type api
200
+
201
+ # Search documents by title
202
+ orbitmap docs --search "auth"
203
+
204
+ # Read cheaply: TOC → one section → full content
205
+ orbitmap doc api-specification
206
+ orbitmap doc api-specification --section "## Authentication"
207
+ orbitmap doc api-specification --full
208
+
209
+ # Import a new document
210
+ orbitmap doc-import "API Spec" --type api --file ./docs/api-spec.md
211
+
212
+ # Update existing document
213
+ orbitmap doc-update api-specification --file ./docs/api-spec.md --changelog "Added auth section"
214
+
215
+ # Patch a single section (optimistic locking via --base-version)
216
+ orbitmap doc-patch api-specification --base-version 7 \
217
+ --replace-section "## Authentication" --content "Bearer tokens only." \
218
+ --changelog "Reworded auth"
219
+
220
+ # Share with another area
221
+ orbitmap doc-share <doc-uuid> <area-uuid> --agents agent1-uuid,agent2-uuid
222
+ ```
223
+
224
+ ### Area & Agent Info
225
+
226
+ | Command | Description |
227
+ |---------|-------------|
228
+ | `orbitmap context` | Show agent identity and current area |
229
+ | `orbitmap areas` | List all areas assigned to this agent |
230
+ | `orbitmap create-area <name>` | Create a new area (`--desc`, `--slug`, `--workspace-id`) |
231
+ | `orbitmap members <area-id>` | List agents and users in an area (accepts slug) |
232
+ | `orbitmap overview [area-id]` | Area overview with task statistics (uses default area) |
233
+
234
+ ### Issues, Ideas & Vibes
235
+
236
+ | Command | Description |
237
+ |---------|-------------|
238
+ | `orbitmap issues` | List open issues |
239
+ | `orbitmap issue show <id>` | Show issue details (UUID or number) |
240
+ | `orbitmap issue register` | Register a new issue (`--intent` to link it to an intent) |
241
+ | `orbitmap issue status <id> <status>` | Update issue status |
242
+ | `orbitmap issue resolve <id>` | Resolve an issue |
243
+ | `orbitmap ideas` | List ideas |
244
+ | `orbitmap idea add` | Add a new idea |
245
+ | `orbitmap idea show <id>` | Show idea details (UUID or number) |
246
+ | `orbitmap idea status <id>` | Update idea status |
247
+ | `orbitmap vibes` | List vibes |
248
+ | `orbitmap vibe log` | Log a new vibe |
249
+ | `orbitmap vibe show <id>` | Show vibe details |
250
+ | `orbitmap vibe update <id>` | Update a vibe |
251
+
252
+ ### Intents
253
+
254
+ Workspace-level desired outcomes. Tasks and issues hang off an intent; an intent can sit in an orbit.
255
+
256
+ | Command | Description |
257
+ |---------|-------------|
258
+ | `orbitmap intents` | List intents (shortcut for `intent list`) |
259
+ | `orbitmap intent show <id-or-number>` | Show an intent (UUID or `IN-xxxxxx`) |
260
+ | `orbitmap intent create <title>` | Create an intent (`--outcome`, `--status`, `--orbit`) |
261
+ | `orbitmap intent update <id>` | Update title, outcome, or status |
262
+ | `orbitmap intent link <id> --type task\|issue --id <uuid>` | Link a task or issue |
263
+ | `orbitmap intent unlink <id> --type task\|issue --id <uuid>` | Unlink a task or issue |
264
+ | `orbitmap intent orbit <id> [orbit-id]` | Set the intent's orbit (`--clear` to remove) |
265
+
266
+ **Statuses:** `new`, `design`, `plan`, `build`, `done`, `cancelled`
267
+
268
+ ```bash
269
+ orbitmap intent create "Cut onboarding time in half" \
270
+ --outcome "New users reach first value in under 5 minutes" \
271
+ --status design --orbit growth-q3
272
+
273
+ orbitmap intent link IN-a1b2c3 --type task --id <task-uuid>
274
+ ```
275
+
276
+ `intent create --orbit` is create-then-attach. If the attach step fails the intent is still created — the CLI reports the failure and does not retry.
277
+
278
+ ### Missions
279
+
280
+ Time-boxed workspace focus. Only one mission can be `active` at a time.
281
+
282
+ | Command | Description |
283
+ |---------|-------------|
284
+ | `orbitmap missions` | List missions (shortcut for `mission list`) |
285
+ | `orbitmap mission show <id-or-number>` | Show a mission (UUID or `MS-xxxxxx`) |
286
+ | `orbitmap mission create <title>` | Create a mission (`--desc`, `--outcome`, `--end-date`) |
287
+ | `orbitmap mission update <id>` | Update title, description, outcome, or end date |
288
+ | `orbitmap mission status <id> <status>` | Set lifecycle status (`--move-to` to relocate unfinished work) |
289
+ | `orbitmap mission link <id> --type <t> --id <uuid>` | Link a task, issue, idea, or intent |
290
+ | `orbitmap mission unlink <id> --type <t> --id <uuid>` | Unlink a directly-linked item |
291
+
292
+ **Statuses:** created as `new`; then `active`, `completed`, `cancelled`.
293
+
294
+ ```bash
295
+ orbitmap mission create "Ship v2 beta" --outcome "Beta live for 50 customers" --end-date 2026-09-30
296
+ orbitmap mission status MS-a1b2c3 active
297
+ orbitmap mission status MS-a1b2c3 completed --move-to MS-d4e5f6
298
+ ```
299
+
300
+ Linking a task or issue to a mission clears its `intent_id` — an item belongs either to an intent or directly to a mission.
301
+
302
+ ### Orbits
303
+
304
+ | Command | Description |
305
+ |---------|-------------|
306
+ | `orbitmap orbit list` | List orbits (workspace-scoped from the area context, `--workspace`) |
307
+ | `orbitmap orbit show <id-or-slug>` | Show orbit details (areas, task counts, resources) |
308
+ | `orbitmap orbit create <name>` | Create an orbit (`--desc`, `--color`, `--areas`) |
309
+ | `orbitmap orbit update <id-or-slug>` | Update name, description, status, or color |
310
+ | `orbitmap orbit items <id-or-slug>` | List items in an orbit (`--type`) |
311
+ | `orbitmap orbit attach <id-or-slug>` | Attach an object to an orbit |
312
+ | `orbitmap orbit detach <id-or-slug>` | Detach an object from an orbit |
313
+ | `orbitmap orbit area link <id-or-slug> <area-id>` | Link an area to an orbit |
314
+ | `orbitmap orbit area unlink <id-or-slug> <area-id>` | Unlink an area from an orbit |
315
+ | `orbitmap orbit dep <id-or-slug> <target-orbit-id>` | Add an orbit-to-orbit dependency |
316
+
317
+ **Item types:** `task`, `issue`, `vibe`, `idea`, `document`
318
+ **Orbit statuses:** `active`, `completed`, `archived`
319
+
320
+ ```bash
321
+ orbitmap orbit create "Growth Q3" --color "#5B8DEF" --areas <area-uuid>,<area-uuid>
322
+ orbitmap orbit attach growth-q3 --type task --id <task-uuid> --note "core flow"
323
+ orbitmap orbit items growth-q3 --type task
324
+ ```
325
+
326
+ There is no orbit delete and no dependency remove in the API — archive via `orbit update --status archived`.
327
+
328
+ ### Delivery Status
329
+
330
+ Track code delivery lifecycle on tasks:
331
+
332
+ ```bash
333
+ orbitmap status abc123 done --delivery on_branch
334
+ orbitmap status abc123 done --delivery merged
335
+ orbitmap status abc123 done --delivery released
336
+ ```
337
+
338
+ ### Setup helpers
339
+
340
+ | Command | Description |
341
+ |---------|-------------|
342
+ | `orbitmap init` | Interactive setup — mode, then credentials or workspace (`--key`, `--area`, `--profile`, `--advanced`; `--local`, `--workspace`, `--workspace-name`, `--no-skills`) |
343
+ | `orbitmap login` / `orbitmap logout` | Browser-based OAuth login / token revocation |
344
+ | `orbitmap setup-agent` | Install OrbitMap instructions into your agent config |
345
+ | `orbitmap setup-mcp` | Write/merge an `orbitmap` entry into `.mcp.json` (no API calls) |
346
+
347
+ ### Global Options
348
+
349
+ | Option | Description |
350
+ |--------|-------------|
351
+ | `--json` | Output raw JSON (for scripting/piping) |
352
+ | `--area <id>` | Override area context (UUID or slug) |
353
+ | `--workspace <path>` | Override the local workspace directory (local mode only) |
354
+
355
+ ## Configuration
356
+
357
+ ### Setup
358
+
359
+ Run `npx orbitmap init` for interactive setup. Credentials are stored in `~/.orbitmap/config.json`.
360
+
361
+ ### Config file
362
+
363
+ ```json
364
+ {
365
+ "api_url": "https://orbitmap.app/api/agent",
366
+ "api_key": "orbitmap_...",
367
+ "area": "my-area-slug",
368
+ "mode": "cloud",
369
+ "workspace_path": "/home/me/orbits/personal"
370
+ }
371
+ ```
372
+
373
+ `mode` is `"cloud"` (the default when the key is absent, so existing configs keep working) or
374
+ `"local"`; `workspace_path` is the default local workspace directory and is written only in local
375
+ mode. A legacy `"project_id"` key is still honoured if `area` is absent.
376
+
377
+ ### Environment Variables
378
+
379
+ Environment variables take precedence over the config file:
380
+
381
+ | Variable | Description |
382
+ |----------|-------------|
383
+ | `ORBITMAP_API_KEY` | Agent API key |
384
+ | `ORBITMAP_API_URL` | API base URL |
385
+ | `ORBITMAP_AREA` | Area UUID or slug |
386
+ | `ORBITMAP_MODE` | `cloud` or `local` — overrides the config `mode` |
387
+ | `ORBITMAP_WORKSPACE` | Local workspace directory (local mode) |
388
+ | `ORBITMAP_PROJECT_ID` | Deprecated alias for `ORBITMAP_AREA` (read-only fallback) |
389
+
390
+ ### Resolution Priority
391
+
392
+ 1. Explicit `--area` flag (area context only)
393
+ 2. Environment variables (`ORBITMAP_AREA`, then legacy `ORBITMAP_PROJECT_ID`)
394
+ 3. `.orbitmap/link.json` (`area`) found by walking up from the current directory — local mode
395
+ 4. `default_area` in the workspace's `workspace.yml` — local mode; written by `orbitmap init` for
396
+ the first area, so a workspace outranks the machine-wide default of an unrelated project
397
+ 5. Config file (`~/.orbitmap/config.json` — `area`, then legacy `project_id`). In local mode this
398
+ rung is ignored when it names an area the workspace does not have (the workspace's own single
399
+ area is used instead); an area you name explicitly always fails loudly when it does not exist
400
+ 6. Defaults (local mode: the only area in the workspace, when there is exactly one)
401
+
402
+ ## Authentication
403
+
404
+ In cloud mode, OrbitMap CLI uses a single **Agent API Key** for authentication (`Authorization: Bearer` header). Local mode has no authentication at all — access to the workspace directory is the only credential. Each agent has its own key — get it from the OrbitMap dashboard. Area context travels in the `X-Orbitmap-Area` header.
405
+
406
+ Optionally, set a default **Area ID** if your agent is assigned to multiple areas.
407
+
408
+ ## Error handling
409
+
410
+ API errors are printed as `Error [CODE] (status): message`. Alongside the regular envelope, the client normalises the flat billing/usage shape returned by 402/429 responses into:
411
+
412
+ | Code | When |
413
+ |------|------|
414
+ | `PAYMENT_REQUIRED` | HTTP 402 — billing action needed |
415
+ | `RATE_LIMITED` | HTTP 429 — too many requests |
416
+ | `USAGE_LIMIT` | Other flat-error responses |
417
+ | `TIMEOUT` | No response within 30s |
418
+
419
+ ## For AI Agents
420
+
421
+ Run the setup wizard to teach your agent about OrbitMap:
422
+
423
+ ```bash
424
+ npx orbitmap setup-agent # auto-detects your agent
425
+ npx orbitmap setup-agent --agent claude
426
+ ```
427
+
428
+ It installs two layers, mirroring the OrbitMap MCP server:
429
+
430
+ - A **thin always-on hook** (~10 lines) in your agent config (`CLAUDE.md`, `AGENTS.md`, …) so the agent always knows the project uses OrbitMap and knows the workflow skeleton.
431
+ - The **deep, on-demand instructions** — full parity with the MCP `full` profile. For **Claude Code** these are installed as loaded-on-demand skills (`.claude/skills/orbitmap`, `orbitmap-working`, `orbitmap-planning`, `orbitmap-docs`, zero per-turn context cost); for other agents they're inlined as a markdown fallback.
432
+
433
+ The instructions are mode-agnostic: they reference CLI commands only, so the same skills drive an agent whether the data goes to the cloud or to local files.
434
+
435
+ See [Agent Instructions](docs/agent-instructions.md) for details.
436
+
437
+ ## Requirements
438
+
439
+ - Node.js 18+
440
+
441
+ ## License
442
+
443
+ MIT