@starlove/orbit 1.4.1 → 2.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.
Files changed (329) hide show
  1. package/Dockerfile +10 -8
  2. package/README.md +146 -164
  3. package/dist/full/csp.txt +1 -0
  4. package/dist/full/fonts/JetBrains_Mono/JetBrainsMono-subset.woff2 +0 -0
  5. package/dist/full/fonts/JetBrains_Mono/README.txt +5 -0
  6. package/dist/full/fonts/Mona_Sans/MonaSans-subset.woff2 +0 -0
  7. package/{public/fonts/Open_Sans → dist/full/fonts/Mona_Sans}/OFL.txt +93 -93
  8. package/dist/full/fonts/Mona_Sans/README.txt +10 -0
  9. package/{public/fonts/JetBrains_Mono → dist/full/fonts/Newsreader}/OFL.txt +93 -93
  10. package/dist/full/fonts/Newsreader/README.txt +8 -0
  11. package/dist/full/fonts/Newsreader/newsreader.woff2 +0 -0
  12. package/dist/full/index.html +36 -653
  13. package/dist/full/js/app.BmuponPJ.js +32 -0
  14. package/dist/full/js/app.BmuponPJ.js.map +1 -0
  15. package/dist/full/js/chunk.1fJGQGbW.js +2 -0
  16. package/dist/full/js/chunk.1fJGQGbW.js.map +1 -0
  17. package/dist/full/js/chunk.5D7JO2zp.js +2 -0
  18. package/dist/full/js/chunk.5D7JO2zp.js.map +1 -0
  19. package/dist/full/js/chunk.BrNn_D79.js +2 -0
  20. package/dist/full/js/chunk.BrNn_D79.js.map +1 -0
  21. package/dist/full/js/chunk.CokJXIqM.js +2 -0
  22. package/dist/full/js/chunk.CokJXIqM.js.map +1 -0
  23. package/dist/full/js/chunk.D_Haqy6R.js +2 -0
  24. package/dist/full/js/chunk.D_Haqy6R.js.map +1 -0
  25. package/dist/full/js/chunk.RO0jsH6I.js +15 -0
  26. package/dist/full/js/chunk.RO0jsH6I.js.map +1 -0
  27. package/dist/full/js/chunk.dqWOEtBM.js +2 -0
  28. package/dist/full/js/chunk.dqWOEtBM.js.map +1 -0
  29. package/dist/full/js/warm.f260bbbc.js +15 -0
  30. package/dist/full/orbits-favicon.png +0 -0
  31. package/dist/full/orbits-logo-bg-wide.png +0 -0
  32. package/dist/full/orbits-logo-bg.png +0 -0
  33. package/dist/full/orbits-logo.png +0 -0
  34. package/dist/full/styles.2b154ffe.css +1 -0
  35. package/dist/full/vendor/starlove-ui/theme-init.js +66 -0
  36. package/dist/full/version.json +2 -2
  37. package/docs/AGENT_GUIDE.md +114 -0
  38. package/docs/UPDATING.md +249 -64
  39. package/lib/adapters/indexeddb/blobs.d.ts +3 -0
  40. package/lib/adapters/indexeddb/blobs.js +54 -0
  41. package/lib/adapters/indexeddb/database.d.ts +60 -0
  42. package/lib/adapters/indexeddb/database.js +126 -0
  43. package/lib/adapters/indexeddb/index.d.ts +5 -0
  44. package/lib/adapters/indexeddb/index.js +3 -0
  45. package/lib/adapters/indexeddb/locks.d.ts +14 -0
  46. package/lib/adapters/indexeddb/locks.js +40 -0
  47. package/lib/adapters/indexeddb/store.d.ts +40 -0
  48. package/lib/adapters/indexeddb/store.js +424 -0
  49. package/lib/adapters/indexeddb/tables.d.ts +43 -0
  50. package/lib/adapters/indexeddb/tables.js +127 -0
  51. package/lib/adapters/memory/blobs.d.ts +3 -0
  52. package/lib/adapters/memory/blobs.js +44 -0
  53. package/lib/adapters/memory/board.d.ts +41 -0
  54. package/lib/adapters/memory/board.js +521 -0
  55. package/lib/adapters/memory/index.d.ts +2 -0
  56. package/lib/adapters/memory/index.js +2 -0
  57. package/lib/adapters/memory/search.d.ts +6 -0
  58. package/lib/adapters/memory/search.js +30 -0
  59. package/lib/adapters/memory/store.d.ts +34 -0
  60. package/lib/adapters/memory/store.js +266 -0
  61. package/lib/adapters/sqlite/backups.d.ts +53 -0
  62. package/lib/adapters/sqlite/backups.js +232 -0
  63. package/lib/adapters/sqlite/blobs.d.ts +14 -0
  64. package/lib/adapters/sqlite/blobs.js +109 -0
  65. package/lib/adapters/sqlite/board.d.ts +77 -0
  66. package/lib/adapters/sqlite/board.js +328 -0
  67. package/lib/adapters/sqlite/database.d.ts +67 -0
  68. package/lib/adapters/sqlite/database.js +285 -0
  69. package/lib/adapters/sqlite/index.d.ts +3 -0
  70. package/lib/adapters/sqlite/index.js +2 -0
  71. package/lib/adapters/sqlite/lock.d.ts +11 -0
  72. package/lib/adapters/sqlite/lock.js +34 -0
  73. package/lib/adapters/sqlite/records.d.ts +54 -0
  74. package/lib/adapters/sqlite/records.js +546 -0
  75. package/lib/adapters/sqlite/schema.d.ts +54 -0
  76. package/lib/adapters/sqlite/schema.js +276 -0
  77. package/lib/adapters/sqlite/store.d.ts +39 -0
  78. package/lib/adapters/sqlite/store.js +385 -0
  79. package/lib/browser/in-page.d.ts +31 -0
  80. package/lib/browser/in-page.js +46 -0
  81. package/lib/browser/old-preview.d.ts +13 -0
  82. package/lib/browser/old-preview.js +80 -0
  83. package/lib/browser/preview-board.d.ts +8 -0
  84. package/lib/browser/preview-board.js +69 -0
  85. package/lib/cli/main.d.ts +7 -0
  86. package/lib/cli/main.js +343 -0
  87. package/lib/cli/orbit.d.ts +8 -0
  88. package/lib/cli/orbit.js +25 -0
  89. package/lib/client/http.d.ts +38 -0
  90. package/lib/client/http.js +334 -0
  91. package/lib/client/local.d.ts +26 -0
  92. package/lib/client/local.js +190 -0
  93. package/lib/client/object-url.d.ts +8 -0
  94. package/lib/client/object-url.js +21 -0
  95. package/lib/client/types.d.ts +268 -0
  96. package/lib/client/types.js +8 -0
  97. package/lib/commands/agent-tools.d.ts +31 -0
  98. package/lib/commands/agent-tools.js +100 -0
  99. package/lib/commands/index.d.ts +56 -0
  100. package/lib/commands/index.js +298 -0
  101. package/lib/commands/parse.d.ts +73 -0
  102. package/lib/commands/parse.js +231 -0
  103. package/lib/commands/present.d.ts +134 -0
  104. package/lib/commands/present.js +198 -0
  105. package/lib/commands/session.d.ts +85 -0
  106. package/lib/commands/session.js +138 -0
  107. package/lib/commands/verbs.d.ts +35 -0
  108. package/lib/commands/verbs.js +842 -0
  109. package/lib/core/actors.d.ts +18 -0
  110. package/lib/core/actors.js +45 -0
  111. package/lib/core/agent.d.ts +128 -0
  112. package/lib/core/agent.js +323 -0
  113. package/lib/core/boards.d.ts +113 -0
  114. package/lib/core/boards.js +288 -0
  115. package/lib/core/bootstrap.d.ts +47 -0
  116. package/lib/core/bootstrap.js +100 -0
  117. package/lib/core/bytes.d.ts +10 -0
  118. package/lib/core/bytes.js +52 -0
  119. package/lib/core/card-paths.d.ts +25 -0
  120. package/lib/core/card-paths.js +44 -0
  121. package/lib/core/context.d.ts +60 -0
  122. package/lib/core/context.js +42 -0
  123. package/lib/core/cross-board.d.ts +81 -0
  124. package/lib/core/cross-board.js +228 -0
  125. package/lib/core/describe.d.ts +21 -0
  126. package/lib/core/describe.js +81 -0
  127. package/lib/core/errors.d.ts +159 -0
  128. package/lib/core/errors.js +160 -0
  129. package/lib/core/files.d.ts +79 -0
  130. package/lib/core/files.js +262 -0
  131. package/lib/core/history.d.ts +20 -0
  132. package/lib/core/history.js +53 -0
  133. package/lib/core/image-types.d.ts +16 -0
  134. package/lib/core/image-types.js +36 -0
  135. package/lib/core/model.d.ts +263 -0
  136. package/lib/core/model.js +34 -0
  137. package/lib/core/nebula-link.d.ts +14 -0
  138. package/lib/core/nebula-link.js +39 -0
  139. package/lib/core/relations.d.ts +58 -0
  140. package/lib/core/relations.js +112 -0
  141. package/lib/core/search.d.ts +38 -0
  142. package/lib/core/search.js +92 -0
  143. package/lib/core/sessions.d.ts +44 -0
  144. package/lib/core/sessions.js +158 -0
  145. package/lib/core/snapshot-schema.d.ts +295 -0
  146. package/lib/core/snapshot-schema.js +82 -0
  147. package/lib/core/snapshots.d.ts +75 -0
  148. package/lib/core/snapshots.js +409 -0
  149. package/lib/core/states.d.ts +25 -0
  150. package/lib/core/states.js +126 -0
  151. package/lib/core/text.d.ts +40 -0
  152. package/lib/core/text.js +113 -0
  153. package/lib/core/tickets.d.ts +69 -0
  154. package/lib/core/tickets.js +311 -0
  155. package/lib/core/trello.d.ts +17 -0
  156. package/lib/core/trello.js +269 -0
  157. package/lib/core/verdicts.d.ts +28 -0
  158. package/lib/core/verdicts.js +92 -0
  159. package/lib/core/views.d.ts +95 -0
  160. package/lib/core/views.js +186 -0
  161. package/lib/http/app.d.ts +46 -0
  162. package/lib/http/app.js +491 -0
  163. package/lib/mcp-server.d.ts +10 -0
  164. package/lib/mcp-server.js +120 -0
  165. package/lib/node/assets.d.ts +7 -0
  166. package/lib/node/assets.js +68 -0
  167. package/lib/node/data-folder.d.ts +21 -0
  168. package/lib/node/data-folder.js +34 -0
  169. package/lib/node/env.d.ts +38 -0
  170. package/lib/node/env.js +49 -0
  171. package/lib/node/host-check.d.ts +24 -0
  172. package/lib/node/host-check.js +53 -0
  173. package/lib/node/host-services.d.ts +9 -0
  174. package/lib/node/host-services.js +150 -0
  175. package/lib/node/local.d.ts +22 -0
  176. package/lib/node/local.js +61 -0
  177. package/lib/node/migrate.d.ts +53 -0
  178. package/lib/node/migrate.js +635 -0
  179. package/lib/node/package.d.ts +7 -0
  180. package/lib/node/package.js +14 -0
  181. package/lib/node/repo-board.d.ts +49 -0
  182. package/lib/node/repo-board.js +245 -0
  183. package/lib/node/serve.d.ts +8 -0
  184. package/lib/node/serve.js +106 -0
  185. package/lib/orbit.d.ts +47 -0
  186. package/lib/orbit.js +44 -0
  187. package/lib/quiet-sqlite-warning.d.ts +1 -0
  188. package/lib/quiet-sqlite-warning.js +18 -0
  189. package/lib/store/blob-path.d.ts +6 -0
  190. package/lib/store/blob-path.js +12 -0
  191. package/lib/store/conformance.d.ts +52 -0
  192. package/lib/store/conformance.js +1449 -0
  193. package/lib/store/search-words.d.ts +10 -0
  194. package/lib/store/search-words.js +19 -0
  195. package/lib/store/types.d.ts +452 -0
  196. package/lib/store/types.js +34 -0
  197. package/llms.txt +63 -0
  198. package/package.json +109 -25
  199. package/src/cli/orbit.js +11 -658
  200. package/src/mcp-server.js +16 -876
  201. package/SKILL-ORBIT.md +0 -151
  202. package/build.mjs +0 -210
  203. package/dist/full/js/app.4e6fbe20.js +0 -952
  204. package/dist/full/js/app.4e6fbe20.js.map +0 -7
  205. package/dist/full/styles.4e60d824.css +0 -1
  206. package/docs/AGENT_PROTOCOL.md +0 -424
  207. package/docs/MCP_SETUP.md +0 -54
  208. package/docs/ORBIT_DISPATCH.md +0 -280
  209. package/docs/SS-Orbit-Dark.png +0 -0
  210. package/docs/SS-Orbit-Light.png +0 -0
  211. package/docs/mcp-client.example.json +0 -13
  212. package/docs/setup/orbit-init-wizard.md +0 -174
  213. package/public/apple-touch-icon.png +0 -0
  214. package/public/cursors/live_arrow.cur +0 -0
  215. package/public/cursors/live_link.cur +0 -0
  216. package/public/cursors/live_move.cur +0 -0
  217. package/public/cursors/live_select.cur +0 -0
  218. package/public/cursors/live_unavail.cur +0 -0
  219. package/public/favicon-32x32.png +0 -0
  220. package/public/fonts/Chakra_Petch/ChakraPetch-Bold.ttf +0 -0
  221. package/public/fonts/Chakra_Petch/ChakraPetch-BoldItalic.ttf +0 -0
  222. package/public/fonts/Chakra_Petch/ChakraPetch-Italic.ttf +0 -0
  223. package/public/fonts/Chakra_Petch/ChakraPetch-Light.ttf +0 -0
  224. package/public/fonts/Chakra_Petch/ChakraPetch-LightItalic.ttf +0 -0
  225. package/public/fonts/Chakra_Petch/ChakraPetch-Medium.ttf +0 -0
  226. package/public/fonts/Chakra_Petch/ChakraPetch-MediumItalic.ttf +0 -0
  227. package/public/fonts/Chakra_Petch/ChakraPetch-Regular.ttf +0 -0
  228. package/public/fonts/Chakra_Petch/ChakraPetch-SemiBold.ttf +0 -0
  229. package/public/fonts/Chakra_Petch/ChakraPetch-SemiBoldItalic.ttf +0 -0
  230. package/public/fonts/Chakra_Petch/OFL.txt +0 -93
  231. package/public/fonts/Inter/Inter-Italic-VariableFont_opsz,wght.ttf +0 -0
  232. package/public/fonts/Inter/Inter-VariableFont_opsz,wght.ttf +0 -0
  233. package/public/fonts/Inter/OFL.txt +0 -93
  234. package/public/fonts/Inter/README.txt +0 -118
  235. package/public/fonts/JetBrains_Mono/JetBrainsMono-Italic-VariableFont_wght.ttf +0 -0
  236. package/public/fonts/JetBrains_Mono/JetBrainsMono-VariableFont_wght.ttf +0 -0
  237. package/public/fonts/JetBrains_Mono/README.txt +0 -79
  238. package/public/fonts/OpenRing-Regular.ttf +0 -0
  239. package/public/fonts/Open_Sans/OpenSans-Italic-VariableFont_wdth,wght.ttf +0 -0
  240. package/public/fonts/Open_Sans/OpenSans-VariableFont_wdth,wght.ttf +0 -0
  241. package/public/fonts/Open_Sans/README.txt +0 -100
  242. package/public/fonts/Orbitron/OFL.txt +0 -93
  243. package/public/fonts/Orbitron/Orbitron-VariableFont_wght.ttf +0 -0
  244. package/public/fonts/Orbitron/README.txt +0 -68
  245. package/public/fonts/Rajdhani/OFL.txt +0 -93
  246. package/public/fonts/Rajdhani/Rajdhani-Bold.ttf +0 -0
  247. package/public/fonts/Rajdhani/Rajdhani-Light.ttf +0 -0
  248. package/public/fonts/Rajdhani/Rajdhani-Medium.ttf +0 -0
  249. package/public/fonts/Rajdhani/Rajdhani-Regular.ttf +0 -0
  250. package/public/fonts/Rajdhani/Rajdhani-SemiBold.ttf +0 -0
  251. package/public/fonts/runescape-uf.ttf +0 -0
  252. package/public/index.html +0 -769
  253. package/public/js/actor-labels.js +0 -65
  254. package/public/js/api.js +0 -39
  255. package/public/js/app.js +0 -45
  256. package/public/js/artifact-drawer.js +0 -79
  257. package/public/js/board-export.js +0 -161
  258. package/public/js/board-menu.js +0 -374
  259. package/public/js/card-actions.js +0 -545
  260. package/public/js/config.js +0 -20
  261. package/public/js/create-card.js +0 -190
  262. package/public/js/dom.js +0 -19
  263. package/public/js/drawer.js +0 -273
  264. package/public/js/font-preference.js +0 -230
  265. package/public/js/format.js +0 -433
  266. package/public/js/help-menu.js +0 -31
  267. package/public/js/icons.js +0 -16
  268. package/public/js/kanban.js +0 -694
  269. package/public/js/local-backend.js +0 -1015
  270. package/public/js/main.js +0 -161
  271. package/public/js/modal.js +0 -33
  272. package/public/js/motion-preference.js +0 -64
  273. package/public/js/panel.js +0 -58
  274. package/public/js/router.js +0 -134
  275. package/public/js/search.js +0 -56
  276. package/public/js/settings-tabs.js +0 -7
  277. package/public/js/settings.js +0 -1634
  278. package/public/js/sse.js +0 -159
  279. package/public/js/starscape.js +0 -332
  280. package/public/js/state.js +0 -129
  281. package/public/js/text-editing.js +0 -128
  282. package/public/js/theme-preference.js +0 -95
  283. package/public/js/ticket-detail.js +0 -1516
  284. package/public/js/ticket-typeahead.js +0 -49
  285. package/public/js/toast.js +0 -89
  286. package/public/js/topbar-notes.js +0 -155
  287. package/public/js/transport.js +0 -22
  288. package/public/js/typeahead.js +0 -206
  289. package/public/js/unread.js +0 -121
  290. package/public/js/update-check.js +0 -58
  291. package/public/js/url-routes.js +0 -94
  292. package/public/orbits-favicon.png +0 -0
  293. package/public/orbits-logo-bg-wide.png +0 -0
  294. package/public/orbits-logo-bg.png +0 -0
  295. package/public/orbits-logo.png +0 -0
  296. package/public/styles.css +0 -7709
  297. package/src/core/agent.js +0 -387
  298. package/src/core/agents-md.js +0 -109
  299. package/src/core/artifacts.js +0 -149
  300. package/src/core/attachments.js +0 -238
  301. package/src/core/auth.js +0 -85
  302. package/src/core/backups.js +0 -142
  303. package/src/core/board.js +0 -148
  304. package/src/core/boards.js +0 -409
  305. package/src/core/bootstrap.js +0 -170
  306. package/src/core/css-bundle.js +0 -30
  307. package/src/core/db.js +0 -315
  308. package/src/core/delete-board.js +0 -163
  309. package/src/core/dispatch.js +0 -1007
  310. package/src/core/events.js +0 -314
  311. package/src/core/http.js +0 -115
  312. package/src/core/migrate.js +0 -198
  313. package/src/core/paths.js +0 -55
  314. package/src/core/provision-repo-board.js +0 -119
  315. package/src/core/queries.js +0 -246
  316. package/src/core/registry.js +0 -211
  317. package/src/core/relations.js +0 -163
  318. package/src/core/review-verdicts.js +0 -138
  319. package/src/core/router.js +0 -556
  320. package/src/core/search.js +0 -183
  321. package/src/core/seed.js +0 -234
  322. package/src/core/snapshots.js +0 -692
  323. package/src/core/states.js +0 -167
  324. package/src/core/system-picker.js +0 -109
  325. package/src/core/tickets.js +0 -400
  326. package/src/core/util.js +0 -106
  327. package/src/core/version-check.js +0 -154
  328. package/src/mcp/orbit-client.js +0 -287
  329. package/src/server.js +0 -115
package/SKILL-ORBIT.md DELETED
@@ -1,151 +0,0 @@
1
- # SKILL-ORBIT.md
2
-
3
- Read this before repo work. This board is the repo-local memory and execution layer.
4
-
5
- This file is managed by Orbit and may be overwritten by `orbit init` or refreshed by `orbit run`. Put repo/team-specific agent rules in `AGENTS.md` or board `agent_instructions`, not here.
6
-
7
- ## Orbit Coordinates
8
-
9
- Optional project-local hints. Explicit user instructions, MCP/API selectors, and live board metadata win.
10
-
11
- Optional coordinates:
12
- - orbit_api_url:
13
- - orbit_board:
14
-
15
- Leave unknown values blank rather than guessing. These hints are for orientation only; agents must still resolve the intended board before mutating tickets.
16
-
17
- ## Local vs Hosted Boards
18
-
19
- - Always resolve the intended board before reading or mutating tickets.
20
- - Prefer Orbit API/MCP tools over direct database edits.
21
- - If an Orbit API URL or hosted board is configured for the task, treat that board as the planning-state source of truth.
22
- - Local `.orbit/board.db` files may be stale, absent, or unrelated when a hosted board is in use.
23
- - Artifact paths may be repo-relative paths, local filesystem paths, or hosted-accessible paths; verify availability before citing them as readable.
24
-
25
- ## MCP, cwd, and this file
26
-
27
- These are separate concerns; mixing them causes confusion:
28
-
29
- - **Where Orbit is installed** — Your MCP client stores an **absolute path** to Orbit's `src/mcp-server.js` (the generated snippet under **Settings → AI**). Claude Code / Codex / Cursor keep that registration. Starting your agent **from another folder** does not change that path.
30
-
31
- - **Which board MCP tools use** — Orbit can target either a local board discovered from a repo path or a hosted board by remote URL. For local boards, the MCP helper uses the explicit project root passed by `orbit mcp --cwd <repo>` or `PROJECT_ROOT`; without either, it falls back to the process current working directory and walks upward until it finds a repo with `.orbit/board.db` (details in [`docs/MCP_SETUP.md`](docs/MCP_SETUP.md)). For remote/hosted boards, use the explicit board/server URL from the prompt or environment, then `board_list` + `board_set_active` before mutations; repo cwd remains code context, not planning-state authority. Prefer explicit `--cwd` / `PROJECT_ROOT` or explicit remote URL in persistent MCP configs so the right board attaches even when the agent launches elsewhere.
32
-
33
- - **This file** — Coding agents resolve `SKILL-ORBIT.md` through normal **filesystem / workspace search**, not through MCP tools. Keep a copy **in each repo** where you run an agent against that board—usually the repo that contains `.orbit/board.db`. If you edit in a multi-root workspace with more than one `SKILL-ORBIT.md`, name the repo or path explicitly in your prompt.
34
-
35
- ## Use The Board
36
-
37
- ### Orbit vocabulary rule
38
-
39
- In Orbit / kanban / ticket contexts, `epic` is a ticket `type`, not an adjective. If Bruce says "make/create an epic ticket/card about X" or "make an epic for X," create or update a ticket with `type: "epic"` whose subject is X. Do not reinterpret the word as "impressive," "big," or "high quality," and do not expand scope beyond the requested ticket type unless the prompt separately asks for planning/decomposition.
40
-
41
- - Read `agent_instructions` on the board first, then the ticket context pack.
42
- - Respect blockers and parent epics.
43
- - Use comments for discussion and compact breadcrumbs.
44
- - Keep human-visible ticket fields terse and use the existing fields by intent:
45
- - `ai_plan` / AI Plan: terse visible plan summary; full markdown handoffs live in `plan_artifact_path`.
46
- - `implementation_summary` / Work Summary: terse visible result summary; full markdown reports/evidence live in `implementation_artifact_path`.
47
- - `implementation_updates` / Revisions: terse later changes/corrections after initial implementation. Leave blank for normal first completion; do not store chronology, command logs, routine run receipts, or durable project lessons here.
48
- - Use board Journal entries (`decision` / `lesson`) only for durable reusable project decisions/lessons every future board agent should load.
49
-
50
- ## Dispatching Agents
51
-
52
- `orbit dispatch --board <slug> --ticket <number-or-id> --profile <name> --worktree` is the preferred human/orchestrator entrypoint for starting an agent on a specific card.
53
-
54
- Dispatch responsibilities:
55
- - Generate the full handoff as a linked markdown artifact and put only a terse summary in the existing `ai_plan` / AI Plan field.
56
- - Move the card to In Progress.
57
- - Preserve a git worktree/branch for human testing when `--worktree` is used.
58
- - Add a compact run-record comment with profile, policy, branch, worktree, pid, command, and artifact path.
59
- - Apply the default safe PATH policy wrappers unless `--policy none` is explicit.
60
-
61
- Agent completion responsibilities:
62
- - Write a terse human-readable result to the existing `implementation_summary` / Work Summary field.
63
- - If details matter, write a markdown report and link it with `implementation_artifact_path`.
64
- - Leave Revisions (`implementation_updates`) blank unless this is a later change/correction after initial implementation. No chronology, logs, normal run details, or durable project lessons.
65
- - Promote project-wide code/pattern lessons and decisions to the board Journal (`lesson` / `decision`) instead of burying them on one card.
66
- - Add compact comments for transient breadcrumbs/run events.
67
- - Move the card to Review unless the human explicitly asked for Done.
68
-
69
- ## Human CLI Checks
70
-
71
- - `orbit -v` / `orbit --version`: print the installed Orbit CLI version for support, bug reports, and reproducibility notes.
72
-
73
- ## Historical Backfill
74
-
75
- If asked to create historical tickets from logs, docs, commit history, notes, or conversations, reconstruct planning structure instead of making a flat list.
76
-
77
- - `epic`: multi-phase chunk or large initiative.
78
- - `feature`: standalone capability or one coherent stage of an epic.
79
- - `task`: smaller scoped unit of work, including maintenance, cleanup, config, refactor, or repo hygiene.
80
- - `bug`: defect, regression, incident, or broken behavior.
81
-
82
- Rules:
83
-
84
- - Prefer fewer, clearer epics with named feature cards underneath.
85
- - Preserve source references in descriptions or comments.
86
- - Mark uncertainty with `Inferred from...` or `Source suggests...`.
87
- - Put only terse work-summary facts in `implementation_summary`.
88
- - Put full historical detail in linked markdown artifacts or comments, not the visible card fields.
89
- - Put only terse card-specific later revision notes in `implementation_updates`; promote reusable code/pattern/project lessons and decisions to board Journal entries.
90
- - Keep future work open unless the source clearly supports `Done`.
91
- - Do not invent acceptance criteria.
92
-
93
- ## Board Context Model
94
-
95
- The board is the unit of organization. Each board is tied to one repo and carries:
96
-
97
- - `repo_url`, `system_path`, `default_branch`: where the code lives. `system_path` is the project folder linked under Settings → AI → AI Helper Files.
98
- - `agent_instructions`: project-level context for agents (purpose, surface area, stack, constraints, operating rules — included in ticket context packs). Edited under Settings → AI.
99
- - `project_notes`: Notes For You — personal reminders on the board (Settings → Notes).
100
-
101
- Use board-level memory entries for durable history:
102
-
103
- - `decision`: important UX, architecture, workflow, naming, or project choices every future agent on this board should follow instead of defaulting to generic codegen.
104
- - `lesson`: important code, pattern, or project failure modes/discoveries distilled as "do X instead of Y when working with Z."
105
-
106
- Board Journal entries are durable project memory loaded for agents working this board, not general notes or persona guidance. Keep active decisions/lessons focused on the most important mechanisms, architectural/product boundaries, workflow invariants, public-product implications, and reusable pitfalls. Prefer ticket comments/implementation fields for one-run chronology, and strike or consolidate stale overlapping entries once a doctrine stabilizes.
107
-
108
- ## Ticket Relationships
109
-
110
- Two distinct, non-overlapping mechanisms:
111
-
112
- - **Hierarchy** — `parent_ticket_id` on the ticket row. One epic owns many features/tasks/bugs. Set on create or via `PATCH /api/tickets/:id`. Only epics can have children; pass `null` to detach. An epic itself cannot have a parent (`parent_ticket_id` must be `null`). Do not duplicate this link in `relations`.
113
- - **Relations** — rows in the `relations` table with `type` of `relates_to`, `blocks`, or `blocked_by`. Use these for cross-cutting connections that aren't ownership: another team's ticket relates to mine, ticket A blocks ticket B, etc. The board rejects relations between a ticket and its direct parent epic (`relation_redundant_with_parent`) and self-relations (`relation_self`).
114
-
115
- Before working a ticket, check blockers. A ticket is **not workable** while it has any `blocked_by` relation row. The relation row is the source of truth — it gets removed when the blocking ticket moves into the Done lane (state role `done`, server auto-deletes) or when a user removes the link manually in the UI. If a `blocked_by` target is an epic, the rule expands to *the epic's open children* — the ticket only becomes workable once every child sits in a Done-role lane (or is archived). The `claim-next` scheduler skips blocked tickets automatically; for ad-hoc checks call `GET /api/tickets/:id/blockers` (returns `can_start` + the unresolved blockers list, with `via_epic_id` on entries that came from epic expansion).
116
-
117
- For a full picture of cross-cutting links call `GET /api/tickets/:id/relations`. The context pack (`GET /api/tickets/:id/context`) already includes both relations and blockers, so this dedicated endpoint is mostly for status-style queries that don't need the full pack.
118
-
119
- ## Common API Actions
120
-
121
- - `GET /api/boards/:board_id/context`
122
- - `GET /api/boards/:board_id/archive`
123
- - `GET /api/tickets/:ticket_id`
124
- - `GET /api/tickets/lookup?board=<slug>&number=<n>` / `GET /api/tickets/lookup?board=<slug>&title=<exact-title>`
125
- - `GET /api/tickets/:ticket_id/context?depth=1`
126
- - `GET /api/tickets/:ticket_id/relations`
127
- - `GET /api/tickets/:ticket_id/blockers`
128
- - `POST /api/agent/claim-next`
129
- - `PATCH /api/tickets/:ticket_id`
130
- - `POST /api/tickets/:ticket_id/archive`
131
- - `POST /api/tickets/:ticket_id/restore`
132
- - `DELETE /api/tickets/:ticket_id`
133
- - `POST /api/relations` / `DELETE /api/relations/:id`
134
- - `POST /api/boards/:board_id/entries`
135
-
136
- ## Archive and Delete
137
-
138
- Removing a card is a two-step process:
139
-
140
- 1. **Archive** (`POST /api/tickets/:ticket_id/archive`) — soft-deletes the card. Archived tickets are excluded from `bootstrap`, `search`, `claim-next`, blockers, relations, and the kanban view, but their data and comments are preserved. Reversible via `POST /api/tickets/:ticket_id/restore`.
141
- 2. **Delete** (`DELETE /api/tickets/:ticket_id`) — permanently removes the card. The ticket MUST already be archived; calling DELETE on a live card returns `409 ticket_not_archived`. Comments, labels, and relations are removed via cascade. Events for the ticket are kept but their `ticket_id` becomes `NULL`.
142
-
143
- `GET /api/boards/:board_id/archive` returns `{ tickets: [...] }` listing archived tickets ordered by archive time (most recent first).
144
-
145
- The same flow is exposed over MCP as `board_archive_ticket`, `board_restore_ticket`, `board_delete_ticket`, and `board_list_archive`. Always archive before deleting; archive when in doubt — restore is cheap, deletion is not.
146
-
147
- ## Current Rule
148
-
149
- Board is canonical for planning state. Git repo is canonical for code.
150
-
151
- Use Orbit API/MCP tools for tickets/cards and board memory. Do not open, edit, patch, script, or write .orbit/board.db directly unless you are explicitly debugging Orbit internals and the user asked for database repair.
package/build.mjs DELETED
@@ -1,210 +0,0 @@
1
- #!/usr/bin/env node
2
- // Two-edition static build. Bundles public/js/main.js and public/styles.css
3
- // with esbuild, copies HTML/images alongside, and rewrites asset tags to point
4
- // at hashed bundles. Edition is selected via `--edition=full|preview`; preview
5
- // substitutes `__ORBIT_EDITION__` so config.js reports edition="preview".
6
-
7
- import { build } from "esbuild";
8
- import { bundleCss } from "./src/core/css-bundle.js";
9
- import {
10
- cpSync,
11
- existsSync,
12
- mkdirSync,
13
- readFileSync,
14
- readdirSync,
15
- rmSync,
16
- statSync,
17
- writeFileSync
18
- } from "node:fs";
19
- import { createHash } from "node:crypto";
20
- import { extname, join, resolve } from "node:path";
21
- import { fileURLToPath } from "node:url";
22
-
23
- const ROOT = resolve(fileURLToPath(import.meta.url), "..");
24
- const PUBLIC_DIR = join(ROOT, "public");
25
- const DIST_DIR = join(ROOT, "dist");
26
-
27
- function parseArgs(argv) {
28
- const args = { edition: "full" };
29
- for (const a of argv.slice(2)) {
30
- if (a.startsWith("--edition=")) args.edition = a.slice("--edition=".length);
31
- }
32
- if (!["full", "preview", "site"].includes(args.edition)) {
33
- throw new Error(`--edition must be "full", "preview", or "site" (got "${args.edition}")`);
34
- }
35
- return args;
36
- }
37
-
38
- // "site" output combines the marketing landing at / with the preview app
39
- // at /app/ — the layout Vercel deploys for orbit.starscape.app.
40
- function assembleSite() {
41
- const previewDir = join(DIST_DIR, "preview");
42
- const siteDir = join(DIST_DIR, "site");
43
- if (!existsSync(previewDir)) {
44
- throw new Error("dist/preview missing — run `npm run build:preview` first");
45
- }
46
- rmSync(siteDir, { recursive: true, force: true });
47
- mkdirSync(siteDir, { recursive: true });
48
-
49
- // Marketing assets live at the repo root (the landing page references
50
- // public/orbits-logo.png etc., which we mirror under public/ at the site
51
- // root so existing href values keep resolving).
52
- const marketingHtml = readFileSync(join(ROOT, "index.html"), "utf8")
53
- .replace(/href="public\/index\.html"/g, 'href="/app/"');
54
- writeFileSync(join(siteDir, "index.html"), marketingHtml);
55
- writeFileSync(join(siteDir, "install.html"), marketingHtml);
56
- writeFileSync(join(siteDir, "support.html"), marketingHtml);
57
-
58
- for (const file of ["apple-touch-icon.png", "favicon-32x32.png", "orbits-favicon.png"]) {
59
- const src = join(ROOT, file);
60
- if (existsSync(src)) cpSync(src, join(siteDir, file));
61
- }
62
- const faviconSrc = join(ROOT, "favicon-32x32.png");
63
- if (existsSync(faviconSrc)) cpSync(faviconSrc, join(siteDir, "favicon.ico"));
64
-
65
- // Marketing references public/orbits-logo.png etc. — mirror the public/
66
- // image set at the site root so we don't have to rewrite every img src.
67
- mkdirSync(join(siteDir, "public"), { recursive: true });
68
- for (const entry of readdirSync(join(ROOT, "public"))) {
69
- if (!entry.endsWith(".png")) continue;
70
- cpSync(join(ROOT, "public", entry), join(siteDir, "public", entry));
71
- }
72
- const cursorsSrc = join(ROOT, "public", "cursors");
73
- if (existsSync(cursorsSrc)) {
74
- cpSync(cursorsSrc, join(siteDir, "public", "cursors"), { recursive: true });
75
- }
76
-
77
- // Preview app at /app/.
78
- cpSync(previewDir, join(siteDir, "app"), { recursive: true });
79
- const appIndexPath = join(siteDir, "app", "index.html");
80
- let appHtml = readFileSync(appIndexPath, "utf8");
81
- appHtml = appHtml
82
- .replace(/href="(?:\.\/|\/)(apple-touch-icon\.png|favicon-32x32\.png)"/g, 'href="/app/$1"')
83
- .replace(/href="(styles\.[^"]+\.css)"/g, 'href="/app/$1"')
84
- .replace(/src="(?:\.\/|\/)([^"]+\.png)"/g, 'src="/app/$1"')
85
- .replace(/src="(js\/app\.[^"]+\.js)"/g, 'src="/app/$1"');
86
- writeFileSync(appIndexPath, appHtml);
87
-
88
- console.log(`✓ site → ${siteDir}`);
89
- console.log(` / marketing landing`);
90
- console.log(` /app/ preview kanban (IndexedDB)`);
91
- return;
92
- }
93
-
94
- function hashContent(buffer) {
95
- return createHash("sha256").update(buffer).digest("hex").slice(0, 8);
96
- }
97
-
98
- // Preview build replaces api.js's transport import with the IndexedDB
99
- // backend. Filter matches the literal `./transport.js` import string only —
100
- // other imports keep their normal resolution.
101
- function previewTransportPlugin() {
102
- return {
103
- name: "preview-transport",
104
- setup(build) {
105
- build.onResolve({ filter: /^\.\/transport\.js$/ }, (args) => ({
106
- path: resolve(args.resolveDir, "local-backend.js")
107
- }));
108
- }
109
- };
110
- }
111
-
112
- async function run() {
113
- const { edition } = parseArgs(process.argv);
114
- if (edition === "site") {
115
- return assembleSite();
116
- }
117
- const outDir = join(DIST_DIR, edition);
118
-
119
- rmSync(outDir, { recursive: true, force: true });
120
- mkdirSync(outDir, { recursive: true });
121
-
122
- // 1. Bundle JS. Single entry → single file, ESM, minified, tree-shaken.
123
- const bundleResult = await build({
124
- entryPoints: [join(PUBLIC_DIR, "js", "main.js")],
125
- bundle: true,
126
- format: "esm",
127
- target: "es2022",
128
- minify: true,
129
- sourcemap: true,
130
- write: false,
131
- outfile: "app.js",
132
- define: {
133
- __ORBIT_EDITION__: JSON.stringify(edition)
134
- },
135
- legalComments: "none",
136
- plugins: edition === "preview" ? [previewTransportPlugin()] : []
137
- });
138
-
139
- const jsFile = bundleResult.outputFiles.find((f) => f.path.endsWith(".js") && !f.path.endsWith(".map"));
140
- const mapFile = bundleResult.outputFiles.find((f) => f.path.endsWith(".map"));
141
- const jsHash = hashContent(jsFile.contents);
142
- const jsName = `app.${jsHash}.js`;
143
- mkdirSync(join(outDir, "js"), { recursive: true });
144
- writeFileSync(join(outDir, "js", jsName), jsFile.contents);
145
- if (mapFile) writeFileSync(join(outDir, "js", `${jsName}.map`), mapFile.contents);
146
-
147
- // 2. Bundle CSS package imports, then hash + copy the flattened output.
148
- const cssSrc = join(PUBLIC_DIR, "styles.css");
149
- const cssBundle = await bundleCss({
150
- entryPoint: cssSrc,
151
- outfile: join(outDir, "styles.css"),
152
- minify: true
153
- });
154
- const cssBuf = cssBundle.cssFile.contents;
155
- const cssHash = hashContent(cssBuf);
156
- const cssName = `styles.${cssHash}.css`;
157
- writeFileSync(join(outDir, cssName), cssBuf);
158
-
159
- // 3. Copy static assets (images, favicons) — anything in public/ that
160
- // isn't HTML/CSS/JS source. Hashing not necessary; long-cache via headers.
161
- for (const entry of readdirSync(PUBLIC_DIR)) {
162
- const src = join(PUBLIC_DIR, entry);
163
- if (entry === "js" || entry === "styles.css") continue;
164
- if (entry.endsWith(".html")) continue;
165
- if (statSync(src).isDirectory()) {
166
- cpSync(src, join(outDir, entry), { recursive: true });
167
- } else {
168
- cpSync(src, join(outDir, entry));
169
- }
170
- }
171
-
172
- // 4. Render index.html with rewritten asset references.
173
- const htmlSrc = join(PUBLIC_DIR, "index.html");
174
- if (!existsSync(htmlSrc)) {
175
- throw new Error(`Missing ${htmlSrc}`);
176
- }
177
- let html = readFileSync(htmlSrc, "utf8");
178
- // Use relative paths so the bundle works whether the build is mounted at
179
- // "/" or "/app/" (preview on Vercel).
180
- html = html.replace(/"\/?js\/main\.js"/g, `"js/${jsName}"`);
181
- html = html.replace(/"\/?styles\.css"/g, `"${cssName}"`);
182
- writeFileSync(join(outDir, "index.html"), html);
183
-
184
- // 5. version.json — consumed by support/debug, also lets a status check
185
- // confirm which bundle a host is serving.
186
- const pkg = JSON.parse(readFileSync(join(ROOT, "package.json"), "utf8"));
187
- writeFileSync(
188
- join(outDir, "version.json"),
189
- JSON.stringify(
190
- {
191
- name: pkg.name,
192
- version: pkg.version,
193
- edition,
194
- builtAt: new Date().toISOString()
195
- },
196
- null,
197
- 2
198
- ) + "\n"
199
- );
200
-
201
- const ext = extname(jsName);
202
- console.log(`✓ ${edition} build → ${outDir}`);
203
- console.log(` js: js/${jsName} (${(jsFile.contents.length / 1024).toFixed(1)} KB${ext === ".js" ? " min" : ""})`);
204
- console.log(` css: ${cssName} (${(cssBuf.length / 1024).toFixed(1)} KB)`);
205
- }
206
-
207
- run().catch((err) => {
208
- console.error(err);
209
- process.exit(1);
210
- });