@sixb/agent 0.0.0-stage → 0.2.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 (240) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +31 -2
  3. package/dist/abort.d.ts +6 -0
  4. package/dist/abort.d.ts.map +1 -0
  5. package/dist/agent-prompt.d.ts +126 -0
  6. package/dist/agent-prompt.d.ts.map +1 -0
  7. package/dist/agent-runtime/errors.d.ts +13 -0
  8. package/dist/agent-runtime/errors.d.ts.map +1 -0
  9. package/dist/agent-runtime/preflight.d.ts +18 -0
  10. package/dist/agent-runtime/preflight.d.ts.map +1 -0
  11. package/dist/agent-runtime/profile.d.ts +14 -0
  12. package/dist/agent-runtime/profile.d.ts.map +1 -0
  13. package/dist/artifacts/layout-check/layout-check.d.ts +87 -0
  14. package/dist/artifacts/layout-check/layout-check.d.ts.map +1 -0
  15. package/dist/artifacts/materialize.d.ts +115 -0
  16. package/dist/artifacts/materialize.d.ts.map +1 -0
  17. package/dist/artifacts/publish-tool.d.ts +86 -0
  18. package/dist/artifacts/publish-tool.d.ts.map +1 -0
  19. package/dist/ask-parent-tool.d.ts +36 -0
  20. package/dist/ask-parent-tool.d.ts.map +1 -0
  21. package/dist/attachments.d.ts +109 -0
  22. package/dist/attachments.d.ts.map +1 -0
  23. package/dist/child-files.d.ts +91 -0
  24. package/dist/child-files.d.ts.map +1 -0
  25. package/dist/child-questions.d.ts +24 -0
  26. package/dist/child-questions.d.ts.map +1 -0
  27. package/dist/computer-runner.d.ts +74 -0
  28. package/dist/computer-runner.d.ts.map +1 -0
  29. package/dist/context-budget.d.ts +34 -0
  30. package/dist/context-budget.d.ts.map +1 -0
  31. package/dist/context-compaction.d.ts +148 -0
  32. package/dist/context-compaction.d.ts.map +1 -0
  33. package/dist/context-guard.d.ts +69 -0
  34. package/dist/context-guard.d.ts.map +1 -0
  35. package/dist/conversation-memory.d.ts +21 -0
  36. package/dist/conversation-memory.d.ts.map +1 -0
  37. package/dist/conversation-messages.d.ts +33 -0
  38. package/dist/conversation-messages.d.ts.map +1 -0
  39. package/dist/errors.d.ts +46 -0
  40. package/dist/errors.d.ts.map +1 -0
  41. package/dist/execution-plan.d.ts +38 -0
  42. package/dist/execution-plan.d.ts.map +1 -0
  43. package/dist/failure.d.ts +14 -0
  44. package/dist/failure.d.ts.map +1 -0
  45. package/dist/family-mailbox.d.ts +60 -0
  46. package/dist/family-mailbox.d.ts.map +1 -0
  47. package/dist/file-ref.d.ts +6 -0
  48. package/dist/file-ref.d.ts.map +1 -0
  49. package/dist/image-attachments.d.ts +34 -0
  50. package/dist/image-attachments.d.ts.map +1 -0
  51. package/dist/index.d.ts +35 -0
  52. package/dist/index.d.ts.map +1 -0
  53. package/dist/index.js +14387 -0
  54. package/dist/index.js.map +72 -0
  55. package/dist/inline-images.d.ts +28 -0
  56. package/dist/inline-images.d.ts.map +1 -0
  57. package/dist/message-authors.d.ts +34 -0
  58. package/dist/message-authors.d.ts.map +1 -0
  59. package/dist/message-times.d.ts +9 -0
  60. package/dist/message-times.d.ts.map +1 -0
  61. package/dist/model-adapters.d.ts +59 -0
  62. package/dist/model-adapters.d.ts.map +1 -0
  63. package/dist/model-lines.d.ts +16 -0
  64. package/dist/model-lines.d.ts.map +1 -0
  65. package/dist/prompt-cache.d.ts +28 -0
  66. package/dist/prompt-cache.d.ts.map +1 -0
  67. package/dist/requester.d.ts +15 -0
  68. package/dist/requester.d.ts.map +1 -0
  69. package/dist/run-agent-turn.d.ts +93 -0
  70. package/dist/run-agent-turn.d.ts.map +1 -0
  71. package/dist/run-child.d.ts +77 -0
  72. package/dist/run-child.d.ts.map +1 -0
  73. package/dist/run-conversation-turn.d.ts +42 -0
  74. package/dist/run-conversation-turn.d.ts.map +1 -0
  75. package/dist/run-credential.d.ts +22 -0
  76. package/dist/run-credential.d.ts.map +1 -0
  77. package/dist/run-environment.d.ts +145 -0
  78. package/dist/run-environment.d.ts.map +1 -0
  79. package/dist/run-fate.d.ts +15 -0
  80. package/dist/run-fate.d.ts.map +1 -0
  81. package/dist/run-files-lock.d.ts +16 -0
  82. package/dist/run-files-lock.d.ts.map +1 -0
  83. package/dist/run-sandbox.d.ts +60 -0
  84. package/dist/run-sandbox.d.ts.map +1 -0
  85. package/dist/run-subagent.d.ts +65 -0
  86. package/dist/run-subagent.d.ts.map +1 -0
  87. package/dist/run-workflow-agent-node.d.ts +46 -0
  88. package/dist/run-workflow-agent-node.d.ts.map +1 -0
  89. package/dist/sandbox-api-context.d.ts +34 -0
  90. package/dist/sandbox-api-context.d.ts.map +1 -0
  91. package/dist/sandbox-file-registry.d.ts +9 -0
  92. package/dist/sandbox-file-registry.d.ts.map +1 -0
  93. package/dist/sandbox-files.d.ts +71 -0
  94. package/dist/sandbox-files.d.ts.map +1 -0
  95. package/dist/sandbox-handle.d.ts +15 -0
  96. package/dist/sandbox-handle.d.ts.map +1 -0
  97. package/dist/sandbox-readiness.d.ts +8 -0
  98. package/dist/sandbox-readiness.d.ts.map +1 -0
  99. package/dist/skills/built-in.d.ts +15 -0
  100. package/dist/skills/built-in.d.ts.map +1 -0
  101. package/dist/subagent-context.d.ts +50 -0
  102. package/dist/subagent-context.d.ts.map +1 -0
  103. package/dist/subagent-continuation.d.ts +33 -0
  104. package/dist/subagent-continuation.d.ts.map +1 -0
  105. package/dist/subagent-inbox.d.ts +53 -0
  106. package/dist/subagent-inbox.d.ts.map +1 -0
  107. package/dist/subagent-tools.d.ts +293 -0
  108. package/dist/subagent-tools.d.ts.map +1 -0
  109. package/dist/thread-context.d.ts +17 -0
  110. package/dist/thread-context.d.ts.map +1 -0
  111. package/dist/tools/attachments.d.ts +11 -0
  112. package/dist/tools/attachments.d.ts.map +1 -0
  113. package/dist/tools/bash.d.ts +68 -0
  114. package/dist/tools/bash.d.ts.map +1 -0
  115. package/dist/tools/model-spec.d.ts +9 -0
  116. package/dist/tools/model-spec.d.ts.map +1 -0
  117. package/dist/tools/read.d.ts +43 -0
  118. package/dist/tools/read.d.ts.map +1 -0
  119. package/dist/tools/result-media.d.ts +65 -0
  120. package/dist/tools/result-media.d.ts.map +1 -0
  121. package/dist/tools/result-output.d.ts +18 -0
  122. package/dist/tools/result-output.d.ts.map +1 -0
  123. package/dist/tools/tool-files.d.ts +59 -0
  124. package/dist/tools/tool-files.d.ts.map +1 -0
  125. package/dist/tools/tool-outputs.d.ts +63 -0
  126. package/dist/tools/tool-outputs.d.ts.map +1 -0
  127. package/dist/tools/view-file.d.ts +40 -0
  128. package/dist/tools/view-file.d.ts.map +1 -0
  129. package/dist/tsconfig.json +5 -0
  130. package/dist/turn-runtime.d.ts +19 -0
  131. package/dist/turn-runtime.d.ts.map +1 -0
  132. package/dist/types.d.ts +83 -0
  133. package/dist/types.d.ts.map +1 -0
  134. package/dist/workflow-input-attachments.d.ts +18 -0
  135. package/dist/workflow-input-attachments.d.ts.map +1 -0
  136. package/package.json +59 -4
  137. package/src/abort.ts +40 -0
  138. package/src/agent-prompt.ts +860 -0
  139. package/src/agent-runtime/errors.ts +44 -0
  140. package/src/agent-runtime/preflight.ts +314 -0
  141. package/src/agent-runtime/profile.ts +23 -0
  142. package/src/artifacts/layout-check/check.cjs +478 -0
  143. package/src/artifacts/layout-check/layout-check.ts +460 -0
  144. package/src/artifacts/materialize.ts +380 -0
  145. package/src/artifacts/publish-tool.ts +700 -0
  146. package/src/ask-parent-tool.ts +100 -0
  147. package/src/attachments.ts +1041 -0
  148. package/src/child-files.ts +535 -0
  149. package/src/child-questions.ts +42 -0
  150. package/src/computer-runner.ts +336 -0
  151. package/src/context-budget.ts +177 -0
  152. package/src/context-compaction.ts +1349 -0
  153. package/src/context-guard.ts +826 -0
  154. package/src/conversation-memory.ts +45 -0
  155. package/src/conversation-messages.ts +86 -0
  156. package/src/errors.ts +85 -0
  157. package/src/execution-plan.ts +70 -0
  158. package/src/failure.ts +82 -0
  159. package/src/family-mailbox.ts +189 -0
  160. package/src/file-ref.ts +18 -0
  161. package/src/image-attachments.ts +322 -0
  162. package/src/index.ts +54 -0
  163. package/src/inline-images.ts +69 -0
  164. package/src/message-authors.ts +77 -0
  165. package/src/message-times.ts +24 -0
  166. package/src/model-adapters.ts +273 -0
  167. package/src/model-lines.ts +28 -0
  168. package/src/prompt-cache.ts +40 -0
  169. package/src/requester.ts +21 -0
  170. package/src/run-agent-turn.ts +509 -0
  171. package/src/run-child.ts +344 -0
  172. package/src/run-conversation-turn.ts +272 -0
  173. package/src/run-credential.ts +55 -0
  174. package/src/run-environment.ts +1216 -0
  175. package/src/run-fate.ts +51 -0
  176. package/src/run-files-lock.ts +118 -0
  177. package/src/run-sandbox.ts +63 -0
  178. package/src/run-subagent.ts +433 -0
  179. package/src/run-workflow-agent-node.ts +344 -0
  180. package/src/sandbox-api-context.ts +237 -0
  181. package/src/sandbox-file-registry.ts +26 -0
  182. package/src/sandbox-files.ts +326 -0
  183. package/src/sandbox-handle.ts +19 -0
  184. package/src/sandbox-readiness.ts +22 -0
  185. package/src/skills/built-in.ts +183 -0
  186. package/src/skills/sixb-artifacts/SKILL.md +95 -0
  187. package/src/skills/sixb-artifacts/canvas.md +104 -0
  188. package/src/skills/sixb-artifacts/document.md +63 -0
  189. package/src/skills/sixb-artifacts/examples/canvas/onboarding-flow/boards/first-job.html +42 -0
  190. package/src/skills/sixb-artifacts/examples/canvas/onboarding-flow/boards/region.html +29 -0
  191. package/src/skills/sixb-artifacts/examples/canvas/onboarding-flow/boards/shared.css +35 -0
  192. package/src/skills/sixb-artifacts/examples/canvas/onboarding-flow/boards/welcome.html +31 -0
  193. package/src/skills/sixb-artifacts/examples/canvas/onboarding-flow/canvas.json +107 -0
  194. package/src/skills/sixb-artifacts/examples/canvas/retro/canvas.json +158 -0
  195. package/src/skills/sixb-artifacts/examples/document/incident-report/document.md +35 -0
  196. package/src/skills/sixb-artifacts/examples/document/operations-review/document.md +41 -0
  197. package/src/skills/sixb-artifacts/examples/document/operations-review/figures/restorations.svg +1 -0
  198. package/src/skills/sixb-artifacts/examples/page/collections-desk/index.html +169 -0
  199. package/src/skills/sixb-artifacts/examples/page/collections-desk/queries/overdue.json +13 -0
  200. package/src/skills/sixb-artifacts/examples/page/dispatch-board/data/dispatch.json +234 -0
  201. package/src/skills/sixb-artifacts/examples/page/dispatch-board/index.html +245 -0
  202. package/src/skills/sixb-artifacts/examples/page/fleet-planner/data/plan.json +53 -0
  203. package/src/skills/sixb-artifacts/examples/page/fleet-planner/index.html +462 -0
  204. package/src/skills/sixb-artifacts/examples/page/service-explorer/data/service.json +276 -0
  205. package/src/skills/sixb-artifacts/examples/page/service-explorer/index.html +549 -0
  206. package/src/skills/sixb-artifacts/examples/sheet/overdue-invoices/queries/overdue.json +13 -0
  207. package/src/skills/sixb-artifacts/examples/sheet/overdue-invoices/workbook.json +30 -0
  208. package/src/skills/sixb-artifacts/examples/sheet/parts-inventory/sheets/Inventory.csv +13 -0
  209. package/src/skills/sixb-artifacts/examples/sheet/parts-inventory/sheets/Spend.csv +6 -0
  210. package/src/skills/sixb-artifacts/examples/sheet/parts-inventory/workbook.json +47 -0
  211. package/src/skills/sixb-artifacts/examples/sheet/service-metrics/sheets/Quarters.csv +5 -0
  212. package/src/skills/sixb-artifacts/examples/sheet/service-metrics/sheets/Regions.csv +5 -0
  213. package/src/skills/sixb-artifacts/examples/sheet/service-metrics/workbook.json +78 -0
  214. package/src/skills/sixb-artifacts/examples/slides/launch-plan/index.html +63 -0
  215. package/src/skills/sixb-artifacts/examples/slides/q3-review/index.html +133 -0
  216. package/src/skills/sixb-artifacts/file.md +17 -0
  217. package/src/skills/sixb-artifacts/page.md +215 -0
  218. package/src/skills/sixb-artifacts/queries.md +66 -0
  219. package/src/skills/sixb-artifacts/references.md +68 -0
  220. package/src/skills/sixb-artifacts/sheet.md +223 -0
  221. package/src/skills/sixb-artifacts/slides.md +137 -0
  222. package/src/skills/sixb-memory/SKILL.md +68 -0
  223. package/src/skills/text-assets.d.ts +25 -0
  224. package/src/subagent-context.ts +182 -0
  225. package/src/subagent-continuation.ts +56 -0
  226. package/src/subagent-inbox.ts +101 -0
  227. package/src/subagent-tools.ts +1671 -0
  228. package/src/thread-context.ts +31 -0
  229. package/src/tools/attachments.ts +28 -0
  230. package/src/tools/bash.ts +233 -0
  231. package/src/tools/model-spec.ts +27 -0
  232. package/src/tools/read.ts +262 -0
  233. package/src/tools/result-media.ts +351 -0
  234. package/src/tools/result-output.ts +46 -0
  235. package/src/tools/tool-files.ts +204 -0
  236. package/src/tools/tool-outputs.ts +464 -0
  237. package/src/tools/view-file.ts +155 -0
  238. package/src/turn-runtime.ts +33 -0
  239. package/src/types.ts +91 -0
  240. package/src/workflow-input-attachments.ts +140 -0
@@ -0,0 +1,104 @@
1
+ # Canvases
2
+
3
+ A canvas is an endless board the user pans and zooms: screens side by side with arrows between
4
+ them, sections of sticky notes, a diagram. Publish one when the work reads best laid out in two
5
+ dimensions.
6
+
7
+ | The deliverable | Publish |
8
+ | --- | --- |
9
+ | Several screens or variants of a design, a flow from one to the next | a `canvas` of boards |
10
+ | A brainstorm, an affinity map, a retro | a `canvas` of sections and notes |
11
+ | A process or a decision drawn as boxes and arrows | a `canvas` of shapes and arrows |
12
+ | One web app or dashboard | a `page` |
13
+ | A report, a deck, a table | a `document`, `slides`, a `sheet` |
14
+
15
+ ```text
16
+ work/onboarding-flow/
17
+ ├── canvas.json
18
+ └── boards/
19
+ ├── welcome.html a board: a page shown at its size on the canvas
20
+ ├── region.html
21
+ └── shared.css styles every board links to
22
+ ```
23
+
24
+ ```json
25
+ {
26
+ "items": [
27
+ { "id": "heading", "type": "text", "x": 0, "y": -300, "text": "Field app onboarding", "size": "xl" },
28
+ { "id": "first-run", "type": "section", "x": 0, "y": -120, "w": 1020, "h": 964, "title": "First run" },
29
+ { "id": "welcome", "type": "board", "file": "boards/welcome.html", "x": 0, "y": 0, "w": 390, "h": 844, "title": "Welcome" },
30
+ { "id": "region", "type": "board", "file": "boards/region.html", "x": 630, "y": 0, "w": 390, "h": 844, "title": "Choose a region" },
31
+ { "id": "to-region", "type": "arrow", "from": "welcome", "to": "region", "label": "Get started" },
32
+ { "id": "skip", "type": "note", "x": 630, "y": 1010, "w": 300, "text": "Skip this screen when GPS finds a depot?" }
33
+ ]
34
+ }
35
+ ```
36
+
37
+ ## Items
38
+
39
+ Every item has an `id` (lowercase letters, digits, and hyphens; it is the item's address, so keep it
40
+ across versions) and sits at `x`, `y` in pixels from the canvas's origin, y growing down.
41
+
42
+ | Type | Keys | For |
43
+ | --- | --- | --- |
44
+ | `board` | `file`, `w`, `h`, `title` | A screen, a mockup, a poster: an HTML file shown live at `w` by `h` |
45
+ | `section` | `w`, `h`, `title` | A group's heading: the title draws at the region's top left, and the region is what `#id` frames |
46
+ | `note` | `w`, `h`, `text`, `tone` | A sticky note; it grows to hold its text, `h` its least height |
47
+ | `text` | `text`, `size`, `w` | A heading or a label: `size` `s`, `m`, `l`, or `xl`; `w` wraps it |
48
+ | `shape` | `shape`, `w`, `h`, `text`, `tone` | A `rect`, `ellipse`, or `diamond`, for a diagram's steps and decisions |
49
+ | `arrow` | `from`, `to`, `label`, `dashed` | From an item's id, or a point `{ "x": 0, "y": 0 }`, to another |
50
+ | `embed` | `src`, `w`, `h`, `title` | Another artifact or a part of one: a chart, a range, a slide, a section |
51
+
52
+ `tone` is `positive`, `warning`, `negative`, `neutral`, or `chart-1` to `chart-5`; a note without
53
+ one is amber, as a note pad's, and a `neutral` one is plain paper. Items draw in the order listed.
54
+ A canvas opens fitted to everything, so lay it out to read whole.
55
+
56
+ A canvas holds at most 500 items and 40 boards; sizes run from 40 to 8,000 pixels.
57
+
58
+ ## Lay it out
59
+
60
+ - Boards in a row 80 to 160 pixels apart, 240 when a labeled arrow joins them, so the label reads
61
+ without covering its arrow; rows 160 pixels apart.
62
+ - A section for each flow or group, its left edge on the group's: boards and embeds start 120
63
+ pixels below its top, since their names sit above them, and notes or shapes 80. Sections 160
64
+ pixels apart. A heading (`text`, `xl`) above everything says what the canvas is, and a line
65
+ under it (`m`) what it is for; `s` is small print, read close up.
66
+ - Arrows for the order of a flow, labeled with what moves the user on: the button, the choice.
67
+ Dashed arrows for asides: a note about a board.
68
+ - Notes beside or below a board, never on it: a note over a board covers its page.
69
+ - Sizes boards as their screens are: 390 by 844 for a phone, 1280 by 800 for a laptop, 1440 by 900
70
+ for a wide screen.
71
+
72
+ ## Boards are pages
73
+
74
+ Each board is a page, run in its own frame: Sixb adds the page kit and the runtime, so `page.md`
75
+ applies to it. Its `<title>` is not shown; the board's `title` is. On the canvas a board is a
76
+ picture; the reader opens it to scroll and click.
77
+
78
+ - Design the board for its size: a phone screen fills 390 by 844 and puts its main action at the
79
+ bottom. What runs past the board's height is cut off on the canvas.
80
+ - Link a stylesheet the boards share, `<link rel="stylesheet" href="shared.css">`, beside them, so
81
+ every screen of an app looks like one app.
82
+ - Show what the screen would hold: real labels, names, and numbers, not lorem ipsum or gray boxes.
83
+ A board reads the project's objects live with `sixb.query`, as a page does; for a chart a live
84
+ sheet already draws, embed it.
85
+ - Boards don't link to each other; arrows show the flow.
86
+
87
+ ## Check
88
+
89
+ Publishing refuses a board whose file is not in the canvas, an arrow to an item that does not
90
+ exist, and a key it does not know, naming the item. It warns of boards that overlap and of notes or
91
+ text on a board.
92
+
93
+ Once a canvas publishes, Sixb opens each board at its own size in the sandbox's browser, in light
94
+ and dark mode or the one its `theme.json` pins, and warns as it does for a page, naming the board.
95
+ The result names each board's screenshot, `<id>.png`, under `$SIXB_CONTEXT_DIR/checks/`.
96
+
97
+ 1. Open the screenshots with `view_file` and look at each board as the reader will.
98
+ 2. Fix what the warnings name and what you see, in the boards' files or `canvas.json`.
99
+ 3. Publish the next version with `publish_artifact_version`, and check again.
100
+
101
+ ## Examples
102
+
103
+ `examples/canvas/` holds two finished canvases: `onboarding-flow`, three phone screens of an app
104
+ with arrows and notes under them, and `retro`, three sections of notes with no boards.
@@ -0,0 +1,63 @@
1
+ # Documents
2
+
3
+ A document is Markdown in `document.md`, with its images beside it. The app renders it as a page:
4
+ a title and lede, a measured column, an outline of its sections, and figures, callouts, and tables
5
+ set for reading.
6
+
7
+ ## Structure
8
+
9
+ - Start with one `#` heading: the title. The paragraph after it is the lede. State the conclusion
10
+ there in one or two sentences.
11
+ - Use `##` for sections and `###` for subsections; together they form the outline. Do not skip a
12
+ level, and do not use a heading for emphasis.
13
+ - When a section has one point, its heading states it ("Costs held flat while volume rose 12%")
14
+ rather than naming a topic ("Costs").
15
+ - Keep paragraphs short. Lead with the finding, then the evidence.
16
+
17
+ ## Markdown
18
+
19
+ GitHub-flavored Markdown: tables, task lists, strikethrough, autolinks, footnotes (`[^1]`), and
20
+ fenced code blocks with a language. Raw HTML is not rendered.
21
+
22
+ | Write | It renders as |
23
+ | --- | --- |
24
+ | `> [!NOTE]` as the first line of a quote | A callout. Also `[!TIP]`, `[!IMPORTANT]`, `[!WARNING]`, `[!CAUTION]` |
25
+ | `![Alt text](figures/chart.svg "Figure 1. Caption")` alone in a paragraph | A figure with its caption |
26
+ | A table column of numbers | Right-aligned, with tabular figures |
27
+ | `[the risks](#risks)` | A link to that section |
28
+
29
+ Use one or two callouts in a document, for what the reader must not miss.
30
+
31
+ ## Images
32
+
33
+ An image is a file in the artifact, referenced by its relative path: `figures/revenue.svg`. Remote
34
+ URLs and `data:` URIs are refused. To show a chart or a table that lives in a sheet, show it by its
35
+ address instead of drawing a copy: `![Revenue by quarter](artifact:…#chart=revenue)`. It stays
36
+ current when the sheet changes; `references.md` has the addresses. SVG and PNG work best. Draw charts in fixed colors that read on
37
+ both light and dark pages, and label the axes and units.
38
+
39
+ ## Numbers
40
+
41
+ - Give units and periods: "$2.14M in Q3", "94% of priority visits".
42
+ - Show negatives one way per table, either `-3.2%` or `(3.2%)`.
43
+ - Say where each figure comes from, in the text or a footnote.
44
+
45
+ ## Theme
46
+
47
+ A document takes the app's theme, light and dark. Only when the user asks for a look, add
48
+ `theme.json` at the artifact's root:
49
+
50
+ ```json
51
+ { "mode": "light", "tokens": { "--primary": "#0f766e", "--font-serif": "Georgia, serif" } }
52
+ ```
53
+
54
+ `mode` pins light or dark. `tokens` may set `--background`, `--foreground`, `--card`,
55
+ `--card-foreground`, `--muted`, `--muted-foreground`, `--primary`, `--primary-foreground`,
56
+ `--accent`, `--accent-foreground`, `--border`, `--chart-1` to `--chart-5`, `--font-sans`,
57
+ `--font-serif`, `--font-mono`, and `--radius`. Colors are hex, `rgb()`, `hsl()`, or `oklch()`;
58
+ fonts are family names; `--radius` is a length such as `6px`.
59
+
60
+ ## Examples
61
+
62
+ `examples/document/` holds two finished documents to start from: an operations review with a figure
63
+ and a table, and an incident report with a timeline and follow-ups.
@@ -0,0 +1,42 @@
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <title>Your first job</title>
6
+ <link rel="stylesheet" href="shared.css">
7
+ </head>
8
+ <body>
9
+ <div class="screen">
10
+ <div class="bar">
11
+ <span class="brand"><span class="mark">N</span>Northline Field</span>
12
+ <span class="steps"><span class="done"></span><span class="done"></span><span class="done"></span></span>
13
+ </div>
14
+ <h1>Your first job</h1>
15
+ <div class="map">
16
+ <svg viewBox="0 0 350 168" role="img" aria-label="Map of the route to the job">
17
+ <path d="M0 120 H350 M0 52 H350 M90 0 V168 M250 0 V168" stroke="var(--border)" stroke-width="10"/>
18
+ <path d="M40 140 L90 140 L90 52 L250 52 L250 30" fill="none" stroke="var(--foreground)" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/>
19
+ <circle cx="40" cy="140" r="7" fill="var(--card)" stroke="var(--foreground)" stroke-width="3"/>
20
+ <circle cx="250" cy="30" r="10" fill="var(--foreground)"/>
21
+ </svg>
22
+ </div>
23
+ <div class="job">
24
+ <span class="tag">P2 · Today</span>
25
+ <h2>Replace condenser fan motor</h2>
26
+ <p class="muted" style="margin: 0">418 Ridge Road, North</p>
27
+ <div class="facts">
28
+ <span class="muted">Window<b>10:00 to 12:00</b></span>
29
+ <span class="muted">Drive<b>14 min</b></span>
30
+ </div>
31
+ <ul class="checklist">
32
+ <li>Fan motor FAN-075 is on your van</li>
33
+ <li>Call the customer when you leave</li>
34
+ </ul>
35
+ </div>
36
+ <div class="grow"></div>
37
+ <div class="actions">
38
+ <button type="button">Start the drive</button>
39
+ </div>
40
+ </div>
41
+ </body>
42
+ </html>
@@ -0,0 +1,29 @@
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <title>Choose a region</title>
6
+ <link rel="stylesheet" href="shared.css">
7
+ </head>
8
+ <body>
9
+ <div class="screen">
10
+ <div class="bar">
11
+ <span class="brand"><span class="mark">N</span>Northline Field</span>
12
+ <span class="steps"><span class="done"></span><span class="done"></span><span></span></span>
13
+ </div>
14
+ <h1>Where do you work?</h1>
15
+ <p class="lede">We'll load your depot's jobs and the parts its vans carry.</p>
16
+ <div class="field">
17
+ <input type="search" placeholder="Search regions" aria-label="Search regions">
18
+ </div>
19
+ <div class="choice selected"><span class="radio"></span><span><b>North</b><small class="muted">Depot 4, Ridge Road</small></span><span class="count">31 jobs</span></div>
20
+ <div class="choice"><span class="radio"></span><span><b>Harbor</b><small class="muted">Depot 2, Pier Road</small></span><span class="count">24 jobs</span></div>
21
+ <div class="choice"><span class="radio"></span><span><b>Keystone</b><small class="muted">Depot 7, Mill Street</small></span><span class="count">19 jobs</span></div>
22
+ <div class="choice"><span class="radio"></span><span><b>Elm Valley</b><small class="muted">Depot 5, Orchard Lane</small></span><span class="count">15 jobs</span></div>
23
+ <div class="grow"></div>
24
+ <div class="actions">
25
+ <button type="button">Continue</button>
26
+ </div>
27
+ </div>
28
+ </body>
29
+ </html>
@@ -0,0 +1,35 @@
1
+ /* A phone screen of the field app, shared by every board. */
2
+ html, body { height: 100%; }
3
+ body { background: var(--background); }
4
+
5
+ .screen { display: flex; flex-direction: column; min-height: 100%; padding: 20px 20px 28px; }
6
+ .bar { display: flex; align-items: center; justify-content: space-between; height: 32px; margin-bottom: 28px; font-size: 13px; font-weight: 600; color: var(--muted-foreground); }
7
+ .brand { display: inline-flex; align-items: center; gap: 8px; color: var(--foreground); }
8
+ .mark { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: var(--foreground); color: var(--background); font-size: 13px; font-weight: 700; }
9
+ .steps { display: flex; gap: 6px; }
10
+ .steps span { width: 18px; height: 4px; border-radius: 999px; background: var(--border); }
11
+ .steps span.done { background: var(--foreground); }
12
+
13
+ .screen h1 { font-size: 30px; line-height: 1.12; letter-spacing: -0.025em; margin-bottom: 12px; }
14
+ .screen .lede { font-size: 16px; margin-bottom: 24px; }
15
+ .grow { flex: 1; }
16
+ .actions { display: grid; gap: 10px; margin-top: 24px; }
17
+ .actions .button, .actions button { width: 100%; min-height: 48px; font-size: 15px; border-radius: 12px; }
18
+
19
+ .choice { display: flex; align-items: center; gap: 12px; padding: 14px 16px; margin-bottom: 10px; border: 1px solid var(--border); border-radius: 14px; background: var(--card); }
20
+ .choice.selected { border-color: var(--foreground); box-shadow: 0 0 0 1px var(--foreground); }
21
+ .choice b { display: block; font-size: 15px; }
22
+ .choice small { display: block; }
23
+ .radio { flex: none; width: 20px; height: 20px; border: 1.5px solid var(--border); border-radius: 50%; }
24
+ .choice.selected .radio { border: 6px solid var(--foreground); }
25
+ .count { margin-left: auto; font-size: 13px; color: var(--muted-foreground); font-variant-numeric: tabular-nums; }
26
+
27
+ .map { height: 168px; margin: 0 0 16px; border-radius: 16px; overflow: hidden; background: var(--muted); }
28
+ .map svg { display: block; width: 100%; height: 100%; }
29
+ .job { padding: 18px; border: 1px solid var(--border); border-radius: 16px; background: var(--card); }
30
+ .job h2 { margin: 6px 0 4px; font-size: 19px; }
31
+ .facts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); font-size: 13px; }
32
+ .facts b { display: block; font-size: 15px; color: var(--foreground); }
33
+ .checklist { margin: 16px 0 0; padding: 0; list-style: none; font-size: 14px; }
34
+ .checklist li { display: flex; align-items: center; gap: 10px; padding: 8px 0; }
35
+ .checklist li::before { content: ""; flex: none; width: 18px; height: 18px; border: 1.5px solid var(--border); border-radius: 6px; }
@@ -0,0 +1,31 @@
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <title>Welcome</title>
6
+ <link rel="stylesheet" href="shared.css">
7
+ </head>
8
+ <body>
9
+ <div class="screen">
10
+ <div class="bar">
11
+ <span class="brand"><span class="mark">N</span>Northline Field</span>
12
+ <span class="steps"><span class="done"></span><span></span><span></span></span>
13
+ </div>
14
+ <svg viewBox="0 0 350 210" role="img" aria-label="A van on its route between three jobs" style="width: 100%; height: auto; margin-bottom: 28px">
15
+ <rect width="350" height="210" rx="20" fill="var(--muted)"/>
16
+ <path d="M40 160 C 110 160, 120 70, 190 80 S 280 140, 310 60" fill="none" stroke="var(--foreground)" stroke-width="3" stroke-dasharray="2 9" stroke-linecap="round"/>
17
+ <circle cx="40" cy="160" r="11" fill="var(--card)" stroke="var(--foreground)" stroke-width="3"/>
18
+ <circle cx="190" cy="80" r="11" fill="var(--card)" stroke="var(--foreground)" stroke-width="3"/>
19
+ <circle cx="310" cy="60" r="14" fill="var(--foreground)"/>
20
+ <path d="M304 60 l5 5 l9 -10" fill="none" stroke="var(--background)" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/>
21
+ </svg>
22
+ <h1>Every job, one tap away.</h1>
23
+ <p class="lede">See today's route, the parts on your van, and what each customer needs before you knock.</p>
24
+ <div class="grow"></div>
25
+ <div class="actions">
26
+ <a class="button" href="#">Get started</a>
27
+ <a class="button ghost" href="#">I already have an account</a>
28
+ </div>
29
+ </div>
30
+ </body>
31
+ </html>
@@ -0,0 +1,107 @@
1
+ {
2
+ "items": [
3
+ {
4
+ "id": "heading",
5
+ "type": "text",
6
+ "x": 0,
7
+ "y": -300,
8
+ "text": "Field app onboarding",
9
+ "size": "xl"
10
+ },
11
+ {
12
+ "id": "subtitle",
13
+ "type": "text",
14
+ "x": 0,
15
+ "y": -220,
16
+ "w": 1200,
17
+ "text": "Three screens from install to a technician's first job, for the October pilot in North.",
18
+ "size": "m"
19
+ },
20
+ {
21
+ "id": "first-run",
22
+ "type": "section",
23
+ "x": 0,
24
+ "y": -120,
25
+ "w": 1650,
26
+ "h": 964,
27
+ "title": "First run"
28
+ },
29
+ {
30
+ "id": "welcome",
31
+ "type": "board",
32
+ "file": "boards/welcome.html",
33
+ "x": 0,
34
+ "y": 0,
35
+ "w": 390,
36
+ "h": 844,
37
+ "title": "Welcome"
38
+ },
39
+ {
40
+ "id": "region",
41
+ "type": "board",
42
+ "file": "boards/region.html",
43
+ "x": 630,
44
+ "y": 0,
45
+ "w": 390,
46
+ "h": 844,
47
+ "title": "Choose a region"
48
+ },
49
+ {
50
+ "id": "first-job",
51
+ "type": "board",
52
+ "file": "boards/first-job.html",
53
+ "x": 1260,
54
+ "y": 0,
55
+ "w": 390,
56
+ "h": 844,
57
+ "title": "First job"
58
+ },
59
+ {
60
+ "id": "to-region",
61
+ "type": "arrow",
62
+ "from": "welcome",
63
+ "to": "region",
64
+ "label": "Get started"
65
+ },
66
+ {
67
+ "id": "to-first-job",
68
+ "type": "arrow",
69
+ "from": "region",
70
+ "to": "first-job",
71
+ "label": "Continue"
72
+ },
73
+ {
74
+ "id": "skip-region",
75
+ "type": "note",
76
+ "x": 630,
77
+ "y": 1010,
78
+ "w": 300,
79
+ "text": "Skip this screen when the phone's location finds a depot?"
80
+ },
81
+ {
82
+ "id": "about-region",
83
+ "type": "arrow",
84
+ "from": "skip-region",
85
+ "to": "region",
86
+ "dashed": true
87
+ },
88
+ {
89
+ "id": "pilot-ask",
90
+ "type": "note",
91
+ "x": 1260,
92
+ "y": 1010,
93
+ "w": 300,
94
+ "text": "Pilot crews asked to open the route in their own maps app.",
95
+ "tone": "neutral"
96
+ },
97
+ {
98
+ "id": "ship-first",
99
+ "type": "note",
100
+ "x": 0,
101
+ "y": 1010,
102
+ "w": 300,
103
+ "text": "Ship first: welcome and first job. Regions can follow.",
104
+ "tone": "positive"
105
+ }
106
+ ]
107
+ }
@@ -0,0 +1,158 @@
1
+ {
2
+ "items": [
3
+ {
4
+ "id": "heading",
5
+ "type": "text",
6
+ "x": 40,
7
+ "y": -170,
8
+ "text": "Week 42 retro, Harbor crews",
9
+ "size": "xl"
10
+ },
11
+ {
12
+ "id": "went-well",
13
+ "type": "section",
14
+ "x": 40,
15
+ "y": 0,
16
+ "w": 500,
17
+ "h": 600,
18
+ "title": "Went well"
19
+ },
20
+ {
21
+ "id": "went-well-1",
22
+ "type": "note",
23
+ "x": 40,
24
+ "y": 80,
25
+ "w": 240,
26
+ "h": 240,
27
+ "text": "Parts were on the van for 9 of 10 jobs",
28
+ "tone": "positive"
29
+ },
30
+ {
31
+ "id": "went-well-2",
32
+ "type": "note",
33
+ "x": 300,
34
+ "y": 80,
35
+ "w": 240,
36
+ "h": 240,
37
+ "text": "New dispatch board cut morning calls in half",
38
+ "tone": "positive"
39
+ },
40
+ {
41
+ "id": "went-well-3",
42
+ "type": "note",
43
+ "x": 40,
44
+ "y": 340,
45
+ "w": 240,
46
+ "h": 240,
47
+ "text": "Harbor crew finished the storm backlog by Thursday",
48
+ "tone": "positive"
49
+ },
50
+ {
51
+ "id": "went-well-4",
52
+ "type": "note",
53
+ "x": 300,
54
+ "y": 340,
55
+ "w": 240,
56
+ "h": 240,
57
+ "text": "Customers liked the arrival text",
58
+ "tone": "positive"
59
+ },
60
+ {
61
+ "id": "to-improve",
62
+ "type": "section",
63
+ "x": 700,
64
+ "y": 0,
65
+ "w": 500,
66
+ "h": 600,
67
+ "title": "To improve"
68
+ },
69
+ {
70
+ "id": "to-improve-1",
71
+ "type": "note",
72
+ "x": 700,
73
+ "y": 80,
74
+ "w": 240,
75
+ "h": 240,
76
+ "text": "Two crews drove to the same address on Tuesday",
77
+ "tone": "warning"
78
+ },
79
+ {
80
+ "id": "to-improve-2",
81
+ "type": "note",
82
+ "x": 960,
83
+ "y": 80,
84
+ "w": 240,
85
+ "h": 240,
86
+ "text": "Lead times on compressors still surprise us",
87
+ "tone": "warning"
88
+ },
89
+ {
90
+ "id": "to-improve-3",
91
+ "type": "note",
92
+ "x": 700,
93
+ "y": 340,
94
+ "w": 240,
95
+ "h": 240,
96
+ "text": "Photos from the field app upload slowly on 4G",
97
+ "tone": "warning"
98
+ },
99
+ {
100
+ "id": "to-improve-4",
101
+ "type": "note",
102
+ "x": 960,
103
+ "y": 340,
104
+ "w": 240,
105
+ "h": 240,
106
+ "text": "The weekly report lands after Monday standup",
107
+ "tone": "warning"
108
+ },
109
+ {
110
+ "id": "try-next",
111
+ "type": "section",
112
+ "x": 1360,
113
+ "y": 0,
114
+ "w": 500,
115
+ "h": 600,
116
+ "title": "Try next"
117
+ },
118
+ {
119
+ "id": "try-next-1",
120
+ "type": "note",
121
+ "x": 1360,
122
+ "y": 80,
123
+ "w": 240,
124
+ "h": 240,
125
+ "text": "Auto-assign the waiting queue at 7:00",
126
+ "tone": "neutral"
127
+ },
128
+ {
129
+ "id": "try-next-2",
130
+ "type": "note",
131
+ "x": 1620,
132
+ "y": 80,
133
+ "w": 240,
134
+ "h": 240,
135
+ "text": "Order compressors when stock falls under 4",
136
+ "tone": "neutral"
137
+ },
138
+ {
139
+ "id": "try-next-3",
140
+ "type": "note",
141
+ "x": 1360,
142
+ "y": 340,
143
+ "w": 240,
144
+ "h": 240,
145
+ "text": "Upload photos on Wi-Fi at the depot",
146
+ "tone": "neutral"
147
+ },
148
+ {
149
+ "id": "vote",
150
+ "type": "text",
151
+ "x": 40,
152
+ "y": 640,
153
+ "w": 1400,
154
+ "text": "Pick one to try next week; Mina owns the follow-up.",
155
+ "size": "m"
156
+ }
157
+ ]
158
+ }
@@ -0,0 +1,35 @@
1
+ # Harbor Point outage, October 3
2
+
3
+ The west wing lost cooling for four days because a rooftop unit locked out on high pressure and its
4
+ replacement compressor was special-order. No equipment was damaged; tenants were moved to the east
5
+ wing for two days.
6
+
7
+ > [!IMPORTANT]
8
+ > Approve the replacement of both rooftop units by October 31 to avoid a repeat this winter.
9
+
10
+ ## What happened
11
+
12
+ | Time | Event |
13
+ | --- | --- |
14
+ | Oct 3, 13:51 | RTU-2 raised a high-pressure alarm and locked out |
15
+ | Oct 3, 15:20 | Technician on site: condenser coil 40% blocked, fan motor over its rated current |
16
+ | Oct 3, 17:05 | Coil cleaned and contactor replaced; the unit locked out again within an hour |
17
+ | Oct 4, 09:00 | Compressor failure confirmed; replacement ordered with a four-day lead time |
18
+ | Oct 7, 14:30 | Compressor installed; cooling restored |
19
+
20
+ ## Why it took four days
21
+
22
+ The unit is past fifteen years in service, and parts for its model are no longer stocked by the
23
+ distributor[^parts]. Earlier failures this quarter were repaired with salvaged parts that are now
24
+ used up.
25
+
26
+ > [!NOTE]
27
+ > RTU-1, the unit's twin on the east wing, has failed twice this quarter with the same symptoms.
28
+
29
+ ## Follow-ups
30
+
31
+ - [x] Restore cooling to the west wing
32
+ - [ ] Send the replacement quote for both units to the customer
33
+ - [ ] Add Harbor Point's units to the weekly coil inspection route
34
+
35
+ [^parts]: Distributor stock check on October 4.
@@ -0,0 +1,41 @@
1
+ # Q3 operations review
2
+
3
+ Priority equipment was restored within its service window 94% of the time this quarter, up from 88%,
4
+ while parts costs held flat against a 12% rise in calls.
5
+
6
+ ## Restorations within SLA rose in three of four regions
7
+
8
+ ![Restorations within SLA](figures/restorations.svg "Figure 1. Priority restorations within SLA by region, Q2 and Q3")
9
+
10
+ | Region | Visits | Within SLA | Change | Parts cost |
11
+ | --- | --- | --- | --- | --- |
12
+ | North | 1,284 | 96.1% | +4.2% | $182,400 |
13
+ | Central | 962 | 93.4% | +6.8% | $141,950 |
14
+ | South | 1,107 | 91.8% | (1.3%) | $166,020 |
15
+ | Coastal | 448 | 95.0% | +2.1% | $58,310 |
16
+ | **Total** | **3,801** | **94.0%** | **+3.9%** | **$548,680** |
17
+
18
+ South slipped while two senior technicians were on leave in August and the region absorbed the
19
+ Harbor Point failures.
20
+
21
+ ## Parts cost per visit fell from $151 to $144
22
+
23
+ More repairs used depot stock instead of rush orders. Service revenue grew 9.6% to $2.14M[^revenue].
24
+
25
+ ## Compressor lead times are the main risk
26
+
27
+ > [!WARNING]
28
+ > Compressor lead times have stretched to nine weeks. Three open cases are waiting on parts.
29
+
30
+ | Site | Issue | Owner | Due |
31
+ | --- | --- | --- | --- |
32
+ | Harbor Point | Rooftop units RTU-1 and RTU-2 | Dana Ortiz | Oct 31 |
33
+ | Central depot | Compressor stock | Sam Patel | Nov 15 |
34
+
35
+ ## Next quarter
36
+
37
+ - [x] Roll out the dispatch board to every region
38
+ - [ ] Stock compressors at the Central depot
39
+ - [ ] Certify four more technicians on building controls
40
+
41
+ [^revenue]: Invoiced service revenue from the business system, excluding parts resold at cost.
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 720 340" width="720" height="340" font-family="system-ui, sans-serif" font-size="13" fill="#64748b"><line x1="64" x2="696" y1="296" y2="296" stroke="#94a3b8" stroke-opacity="0.35"/><text x="54" y="300" text-anchor="end">80%</text><line x1="64" x2="696" y1="236" y2="236" stroke="#94a3b8" stroke-opacity="0.35"/><text x="54" y="240" text-anchor="end">85%</text><line x1="64" x2="696" y1="176" y2="176" stroke="#94a3b8" stroke-opacity="0.35"/><text x="54" y="180" text-anchor="end">90%</text><line x1="64" x2="696" y1="116" y2="116" stroke="#94a3b8" stroke-opacity="0.35"/><text x="54" y="120" text-anchor="end">95%</text><line x1="64" x2="696" y1="56" y2="56" stroke="#94a3b8" stroke-opacity="0.35"/><text x="54" y="60" text-anchor="end">100%</text><rect x="96" y="153.19999999999993" width="44" height="142.80000000000007" rx="3" fill="#94a3b8"/><rect x="146" y="102.80000000000007" width="44" height="193.19999999999993" rx="3" fill="#0d9488"/><text x="168" y="95.80000000000007" text-anchor="middle" font-weight="600" fill="#0d9488">96.1%</text><text x="143" y="320" text-anchor="middle">North</text><rect x="254" y="216.80000000000007" width="44" height="79.19999999999993" rx="3" fill="#94a3b8"/><rect x="304" y="135.19999999999993" width="44" height="160.80000000000007" rx="3" fill="#0d9488"/><text x="326" y="128.19999999999993" text-anchor="middle" font-weight="600" fill="#0d9488">93.4%</text><text x="301" y="320" text-anchor="middle">Central</text><rect x="412" y="138.80000000000007" width="44" height="157.19999999999993" rx="3" fill="#94a3b8"/><rect x="462" y="154.40000000000003" width="44" height="141.59999999999997" rx="3" fill="#0d9488"/><text x="484" y="147.40000000000003" text-anchor="middle" font-weight="600" fill="#0d9488">91.8%</text><text x="459" y="320" text-anchor="middle">South</text><rect x="570" y="141.19999999999993" width="44" height="154.80000000000007" rx="3" fill="#94a3b8"/><rect x="620" y="116" width="44" height="180" rx="3" fill="#0d9488"/><text x="642" y="109" text-anchor="middle" font-weight="600" fill="#0d9488">95%</text><text x="617" y="320" text-anchor="middle">Coastal</text><rect x="64" y="18" width="12" height="12" rx="2" fill="#94a3b8"/><text x="82" y="28">Q2</text><rect x="184" y="18" width="12" height="12" rx="2" fill="#0d9488"/><text x="202" y="28">Q3</text></svg>