@telemetryos/cli 1.9.0 → 1.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +25 -0
- package/dist/commands/auth.js +8 -15
- package/dist/commands/init.js +131 -68
- package/dist/commands/publish.d.ts +22 -0
- package/dist/commands/publish.js +238 -0
- package/dist/index.js +2 -0
- package/dist/plugins/math-tools.d.ts +2 -0
- package/dist/plugins/math-tools.js +18 -0
- package/dist/services/api-client.d.ts +18 -0
- package/dist/services/api-client.js +70 -0
- package/dist/services/archiver.d.ts +4 -0
- package/dist/services/archiver.js +65 -0
- package/dist/services/build-poller.d.ts +10 -0
- package/dist/services/build-poller.js +63 -0
- package/dist/services/cli-config.d.ts +10 -0
- package/dist/services/cli-config.js +45 -0
- package/dist/services/generate-application.d.ts +2 -1
- package/dist/services/generate-application.js +31 -32
- package/dist/services/project-config.d.ts +24 -0
- package/dist/services/project-config.js +51 -0
- package/dist/services/run-server.js +29 -73
- package/dist/types/api.d.ts +44 -0
- package/dist/types/api.js +1 -0
- package/dist/types/applications.d.ts +44 -0
- package/dist/types/applications.js +1 -0
- package/dist/utils/ansi.d.ts +10 -0
- package/dist/utils/ansi.js +10 -0
- package/dist/utils/path-utils.d.ts +55 -0
- package/dist/utils/path-utils.js +99 -0
- package/package.json +4 -2
- package/templates/vite-react-typescript/CLAUDE.md +14 -6
- package/templates/vite-react-typescript/_claude/skills/tos-architecture/SKILL.md +4 -28
- package/templates/vite-react-typescript/_claude/skills/tos-multi-mode/SKILL.md +359 -0
- package/templates/vite-react-typescript/_claude/skills/tos-render-design/SKILL.md +304 -12
- package/templates/vite-react-typescript/_claude/skills/tos-render-kiosk-design/SKILL.md +384 -0
- package/templates/vite-react-typescript/_claude/skills/tos-render-signage-design/SKILL.md +515 -0
- package/templates/vite-react-typescript/_claude/skills/tos-render-ui-design/SKILL.md +325 -0
- package/templates/vite-react-typescript/_claude/skills/tos-requirements/SKILL.md +405 -125
- package/templates/vite-react-typescript/_claude/skills/tos-store-sync/SKILL.md +96 -5
- package/templates/vite-react-typescript/_claude/skills/tos-weather-api/SKILL.md +443 -269
- package/templates/vite-react-typescript/index.html +1 -1
|
@@ -1,77 +1,251 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: tos-requirements
|
|
3
|
-
description: Gather requirements for a new TelemetryOS app. Use at the START of any new app project to understand
|
|
3
|
+
description: Gather requirements for a new TelemetryOS app. Use at the START of any new app project to understand interaction model (display-only vs interactive), render layout, data sources, and implementation plan before writing code.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# TelemetryOS App Requirements Gathering
|
|
7
7
|
|
|
8
|
-
Use this skill at the START of any new TelemetryOS application project. Gather complete requirements before writing any code to ensure a successful
|
|
8
|
+
Use this skill at the START of any new TelemetryOS application project. Gather complete requirements before writing any code to ensure a successful implementation.
|
|
9
9
|
|
|
10
10
|
## Requirements Interview
|
|
11
11
|
|
|
12
12
|
**IMPORTANT: This is a conversation, not a survey.** Ask questions one phase at a time. Wait for answers before proceeding. Use earlier answers to skip irrelevant questions.
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
**All TelemetryOS apps use `@telemetryos/sdk`** with `render` and `settings` mount points. The key distinction is whether the render view is display-only or includes interactive elements.
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## Phase 1: Start with Vision & Interaction Model
|
|
19
|
+
|
|
20
|
+
### Starting Question
|
|
15
21
|
|
|
16
22
|
Ask ONE question to start:
|
|
17
23
|
|
|
18
|
-
> "What app do you want to build? Give me a quick description."
|
|
24
|
+
> "What app do you want to build? Give me a quick description of what it should do and what users will see."
|
|
19
25
|
|
|
20
|
-
|
|
21
|
-
-
|
|
26
|
+
Wait for their answer. Their response will tell you:
|
|
27
|
+
- Is this display-only or interactive?
|
|
22
28
|
- What the layout probably looks like
|
|
29
|
+
- What data sources they need
|
|
23
30
|
- What settings make sense
|
|
24
31
|
|
|
25
|
-
###
|
|
32
|
+
### Listen For: Interaction Model
|
|
26
33
|
|
|
27
|
-
|
|
34
|
+
**Digital Signage Indicators** (display-only):
|
|
35
|
+
- "display", "show", "dashboard", "information board"
|
|
36
|
+
- "menu board", "announcements", "slideshow"
|
|
37
|
+
- Content that updates automatically
|
|
38
|
+
- No mention of user interaction
|
|
39
|
+
- **Implementation:** Render view with NO onClick handlers
|
|
28
40
|
|
|
29
|
-
**
|
|
30
|
-
- "
|
|
31
|
-
- "
|
|
41
|
+
**Interactive Kiosk Indicators** (touch-enabled):
|
|
42
|
+
- "touch screen", "interactive", "kiosk"
|
|
43
|
+
- "users can click", "navigation", "buttons", "search"
|
|
44
|
+
- "check-in", "directory", "wayfinding"
|
|
45
|
+
- ANY mention of user input/interaction
|
|
46
|
+
- **Implementation:** Render view WITH onClick handlers
|
|
32
47
|
|
|
33
|
-
**
|
|
34
|
-
- "
|
|
48
|
+
**Multi-Mode Indicators** (same app, different views per device):
|
|
49
|
+
- "one screen shows X while another shows Y"
|
|
50
|
+
- "kiosk and display" or "control panel and viewer"
|
|
51
|
+
- "different devices need different views of the same data"
|
|
52
|
+
- data organized by location, department, topic, or similar grouping
|
|
35
53
|
|
|
36
|
-
|
|
37
|
-
- "Quick layout check: fullscreen content, or split/grid layout?"
|
|
54
|
+
### Confirm Interaction Model
|
|
38
55
|
|
|
39
|
-
|
|
56
|
+
Before proceeding to Phase 2, explicitly state your understanding:
|
|
40
57
|
|
|
41
|
-
|
|
58
|
+
**For Digital Signage:**
|
|
59
|
+
> "Got it - we're building a digital signage display. Content is display-only - viewers watch it without interacting. We'll use @telemetryos/sdk with automatic updates driven by store subscriptions. Does that match what you have in mind?"
|
|
42
60
|
|
|
43
|
-
|
|
61
|
+
**For Interactive Kiosk:**
|
|
62
|
+
> "Got it - we're building an interactive kiosk. Users will be able to touch/click elements on the screen. We'll use @telemetryos/sdk with onClick handlers in the render view. Does that match what you have in mind?"
|
|
44
63
|
|
|
45
|
-
-
|
|
46
|
-
-
|
|
47
|
-
- Edge cases that matter for their use case
|
|
64
|
+
**For Multi-Mode App:**
|
|
65
|
+
> "Got it — this is a multi-mode app. Different devices will show different views: [Mode A description] and [Mode B description]. They'll share data scoped to a [entity]. Let me gather requirements for each mode."
|
|
48
66
|
|
|
49
|
-
|
|
50
|
-
- Categories that don't apply to their app
|
|
51
|
-
- Settings with obvious defaults
|
|
52
|
-
- Technical details you can infer
|
|
67
|
+
Wait for confirmation before proceeding.
|
|
53
68
|
|
|
54
|
-
|
|
69
|
+
---
|
|
55
70
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
71
|
+
## Phase 2: Render View First (What Users See)
|
|
72
|
+
|
|
73
|
+
**Goal:** Understand the visual experience and interactions BEFORE diving into data sources.
|
|
74
|
+
|
|
75
|
+
### Visual Experience Questions
|
|
76
|
+
|
|
77
|
+
Ask conversationally, one at a time, based on what you already know:
|
|
78
|
+
|
|
79
|
+
#### For ALL Apps:
|
|
80
|
+
|
|
81
|
+
**Screen Layout:**
|
|
82
|
+
- "What does the screen look like? Walk me through what someone sees."
|
|
83
|
+
- Listen for: single panel, split layout, grid, fullscreen media
|
|
84
|
+
|
|
85
|
+
**Content Elements:**
|
|
86
|
+
- "What specific content appears on screen?"
|
|
87
|
+
- Listen for: text, images, video, data displays, lists, charts
|
|
88
|
+
|
|
89
|
+
**Visual Priority:**
|
|
90
|
+
- "What's the most important thing viewers should see?"
|
|
91
|
+
- Helps determine layout hierarchy
|
|
92
|
+
|
|
93
|
+
#### For Interactive Apps ONLY:
|
|
94
|
+
|
|
95
|
+
**Interaction Flow:**
|
|
96
|
+
- "When someone touches the screen, what happens? Walk me through the interaction."
|
|
97
|
+
- Listen for: button clicks, navigation flow, form inputs, search
|
|
98
|
+
|
|
99
|
+
**User Journey:**
|
|
100
|
+
- "What's a typical user flow? For example: User arrives → touches X → sees Y → does Z"
|
|
101
|
+
|
|
102
|
+
**Idle State:**
|
|
103
|
+
- "What happens when no one is interacting? Does it return to a home screen?"
|
|
104
|
+
|
|
105
|
+
#### For Display-Only Apps ONLY:
|
|
106
|
+
|
|
107
|
+
**Content Updates:**
|
|
108
|
+
- "How often should the content update?"
|
|
109
|
+
- Listen for: real-time, every X seconds/minutes, on schedule
|
|
110
|
+
|
|
111
|
+
**Rotation/Playlist:**
|
|
112
|
+
- "Does content rotate between different views, or stay on one view?"
|
|
113
|
+
|
|
114
|
+
### Capture User Stories
|
|
115
|
+
|
|
116
|
+
Based on their answers, document user stories:
|
|
117
|
+
|
|
118
|
+
**For Display-Only Apps:**
|
|
119
|
+
```
|
|
120
|
+
User Story: Render View
|
|
121
|
+
- As a viewer, I see [describe layout]
|
|
122
|
+
- The screen displays [list content elements]
|
|
123
|
+
- Content updates [frequency/trigger]
|
|
124
|
+
- [Most important element] is prominently displayed
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
**For Interactive Apps:**
|
|
128
|
+
```
|
|
129
|
+
User Story: Render View
|
|
130
|
+
- As a user approaching the kiosk, I see [idle/home screen]
|
|
131
|
+
- When I touch [element], [what happens]
|
|
132
|
+
- I can [describe interactions: navigate, search, input]
|
|
133
|
+
- After [time], the screen returns to [idle state]
|
|
134
|
+
- onClick handlers needed for: [list interactive elements]
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
### DO NOT Ask About Data Sources Yet
|
|
138
|
+
|
|
139
|
+
At this phase:
|
|
140
|
+
- ✅ DO focus on what's visible and interactions
|
|
141
|
+
- ✅ DO ask about layout, content elements, visual hierarchy
|
|
142
|
+
- ✅ DO understand user flows for interactive apps
|
|
143
|
+
- ❌ DON'T ask "where does data come from?"
|
|
144
|
+
- ❌ DON'T dive into APIs or data sources
|
|
145
|
+
- ❌ DON'T ask about settings yet
|
|
146
|
+
|
|
147
|
+
---
|
|
148
|
+
|
|
149
|
+
## Phase 3: Data Source Discovery
|
|
150
|
+
|
|
151
|
+
**Now** that you understand what users SEE, map content elements to data sources.
|
|
152
|
+
|
|
153
|
+
### Data Mapping Questions
|
|
154
|
+
|
|
155
|
+
For each content element identified in Phase 2:
|
|
156
|
+
|
|
157
|
+
**Source Identification:**
|
|
158
|
+
- "For [content element], where should that data come from?"
|
|
159
|
+
- Listen for: TOS APIs, external APIs, user uploads, static content
|
|
160
|
+
|
|
161
|
+
**External APIs** (if mentioned):
|
|
162
|
+
- "Do you have a specific API in mind for [data source], or should I suggest one?"
|
|
163
|
+
- "Will we need an API key for that?"
|
|
164
|
+
|
|
165
|
+
**Media Content** (if images/video mentioned):
|
|
166
|
+
- "Will media come from the TelemetryOS media library, or external URLs?"
|
|
167
|
+
|
|
168
|
+
**Real-time vs Static:**
|
|
169
|
+
- For dynamic content: "How often should [data] refresh?"
|
|
170
|
+
- For static content: "Will admins update this in Settings, or is it hardcoded?"
|
|
171
|
+
|
|
172
|
+
### Inference with Transparency
|
|
173
|
+
|
|
174
|
+
**Show your thinking** when making important assumptions:
|
|
175
|
+
|
|
176
|
+
✅ **Good examples:**
|
|
177
|
+
- "I'm assuming the weather data comes from the TOS weather API since you mentioned current conditions and forecast - is that right?"
|
|
178
|
+
- "Since you mentioned 'logo', I'm assuming that's uploaded to the TOS media library - correct?"
|
|
179
|
+
- "You mentioned refreshing every 30 seconds - I'll use a timer-based refresh pattern for that."
|
|
180
|
+
|
|
181
|
+
❌ **Don't assume without asking:**
|
|
182
|
+
- Which external API to use
|
|
183
|
+
- Authentication methods
|
|
184
|
+
- Data formats or structures
|
|
185
|
+
|
|
186
|
+
### Reference: Data Sources
|
|
187
|
+
|
|
188
|
+
**TelemetryOS Platform APIs:**
|
|
189
|
+
- `media()` - User-uploaded images/videos from media library
|
|
190
|
+
- `weather()` - Weather data (current, hourly, daily forecasts)
|
|
191
|
+
- `applications()` - Embedding other TOS apps
|
|
192
|
+
- `store()` - Persistent configuration and state
|
|
193
|
+
|
|
194
|
+
**External APIs:**
|
|
195
|
+
- Use `proxy().fetch()` for external APIs (handles CORS)
|
|
196
|
+
- Note: authentication method (API key, OAuth, none)
|
|
197
|
+
- Note: rate limits if known
|
|
198
|
+
|
|
199
|
+
**Refresh patterns:**
|
|
200
|
+
- Timer-based (every N seconds/minutes)
|
|
201
|
+
- Event-based (on user action, for interactive apps)
|
|
202
|
+
- Most apps use 30-60 second refresh for live data
|
|
203
|
+
|
|
204
|
+
---
|
|
61
205
|
|
|
62
|
-
|
|
206
|
+
## Phase 4: Settings & Configuration
|
|
63
207
|
|
|
64
|
-
|
|
208
|
+
**Goal:** Identify what admins should be able to configure.
|
|
65
209
|
|
|
66
|
-
|
|
210
|
+
### Configuration Questions
|
|
211
|
+
|
|
212
|
+
**Admin Controls:**
|
|
213
|
+
- "What should admins be able to configure in the Settings panel?"
|
|
214
|
+
- Prompt with relevant categories if needed (see Reference below)
|
|
215
|
+
|
|
216
|
+
**Sensible Defaults:**
|
|
217
|
+
- "What are good default values? The app should work with minimal config."
|
|
218
|
+
|
|
219
|
+
**Required vs Optional:**
|
|
220
|
+
- "Which settings are required for the app to function?"
|
|
221
|
+
|
|
222
|
+
**Validation:**
|
|
223
|
+
- "Are there any constraints? For example, minimum/maximum values, specific formats?"
|
|
224
|
+
|
|
225
|
+
### UI Scale Setting
|
|
226
|
+
|
|
227
|
+
**For Digital Signage (Display-Only) Apps:**
|
|
228
|
+
- **ALWAYS include UI Scale setting** (instance scope)
|
|
229
|
+
- Default: 1, Range: 1-3 (step 0.01)
|
|
230
|
+
- UI Component: Slider
|
|
231
|
+
- Allows admins to adjust content size for different viewing distances and screen sizes
|
|
232
|
+
|
|
233
|
+
**For Interactive Kiosk Apps:**
|
|
234
|
+
- **DO NOT include UI Scale setting**
|
|
235
|
+
- Kiosks have fixed interaction distance (user is right in front of screen)
|
|
236
|
+
- Content sizing is optimized for touch interaction, not adjustable
|
|
237
|
+
|
|
238
|
+
### Reference: Settings Categories
|
|
239
|
+
|
|
240
|
+
Consult as needed - don't ask about every category:
|
|
67
241
|
|
|
68
242
|
**Display Settings** - Visual appearance and layout
|
|
243
|
+
- **UI Scale** (digital signage only - ALWAYS include)
|
|
69
244
|
- Colors, fonts, background styles
|
|
70
245
|
- Layout options (columns, alignment, spacing)
|
|
71
246
|
- Show/hide toggles for UI elements
|
|
72
|
-
- Animation preferences
|
|
73
247
|
|
|
74
|
-
> Digital signage typically uses dark backgrounds (better contrast on TVs
|
|
248
|
+
> Digital signage typically uses dark backgrounds (better contrast on TVs). Don't ask about light/dark "mode" unless the developer brings it up.
|
|
75
249
|
|
|
76
250
|
**Data Configuration** - How the app fetches and processes data
|
|
77
251
|
- API keys and credentials
|
|
@@ -91,15 +265,14 @@ Settings allow admins to configure the app. Use these categories to identify wha
|
|
|
91
265
|
- Date/time formats
|
|
92
266
|
- Language/locale
|
|
93
267
|
|
|
94
|
-
|
|
268
|
+
### Store Scope Rules
|
|
95
269
|
|
|
96
|
-
**Default to `instance`** - most settings are instance-scoped.
|
|
270
|
+
**Default to `instance`** - most settings are instance-scoped.
|
|
97
271
|
|
|
98
|
-
**Use `application` scope for:**
|
|
272
|
+
**Use `application` scope ONLY for:**
|
|
99
273
|
- API keys and credentials (shared cost, single billing)
|
|
100
274
|
- Account-wide branding (company logo URL, brand colors)
|
|
101
275
|
- License keys or subscription identifiers
|
|
102
|
-
- Shared service endpoints configured once per account
|
|
103
276
|
|
|
104
277
|
**Use `instance` scope for everything else:**
|
|
105
278
|
- Content selection (what to display)
|
|
@@ -107,15 +280,19 @@ Settings allow admins to configure the app. Use these categories to identify wha
|
|
|
107
280
|
- Refresh intervals and timing
|
|
108
281
|
- Localization (timezone, units, language)
|
|
109
282
|
- Visual preferences (colors, fonts, backgrounds)
|
|
110
|
-
- Filters, sort order, display limits
|
|
111
283
|
|
|
112
|
-
**
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
| `application` | Yes | All instances in account | API keys, credentials |
|
|
284
|
+
**Use `device` scope (Render only) for:**
|
|
285
|
+
- Device-specific calibration settings
|
|
286
|
+
- Local cache data
|
|
287
|
+
- Interaction state that should persist on device
|
|
117
288
|
|
|
118
|
-
|
|
289
|
+
**Use `shared(namespace)` scope for:**
|
|
290
|
+
- Inter-app communication
|
|
291
|
+
- Broadcasting data between apps
|
|
292
|
+
|
|
293
|
+
Scope is typically inferred - don't ask unless unclear.
|
|
294
|
+
|
|
295
|
+
### Capture Store Keys
|
|
119
296
|
|
|
120
297
|
For each setting identified, record:
|
|
121
298
|
|
|
@@ -126,127 +303,230 @@ For each setting identified, record:
|
|
|
126
303
|
| units | Localization | instance | 'imperial' \| 'metric' | 'imperial' | enum | Yes |
|
|
127
304
|
| refreshInterval | Data Config | instance | number | 30 | 10-300 | No |
|
|
128
305
|
|
|
129
|
-
|
|
306
|
+
---
|
|
130
307
|
|
|
131
|
-
|
|
132
|
-
- **What should admins be able to configure?** (prompt with relevant categories)
|
|
133
|
-
- **What are sensible defaults?** (app should work with minimal config)
|
|
134
|
-
- **Are there validation rules or constraints?** (min/max, patterns, enums)
|
|
135
|
-
- **Which settings are required vs optional?**
|
|
308
|
+
## Phase 5: Multi-Mode Design (If Applicable)
|
|
136
309
|
|
|
137
|
-
|
|
310
|
+
**Only if Phase 1 identified a multi-mode app.**
|
|
138
311
|
|
|
139
|
-
###
|
|
312
|
+
### Step 1: Identify the Modes
|
|
140
313
|
|
|
141
|
-
|
|
314
|
+
Confirm the distinct Render views:
|
|
142
315
|
|
|
143
|
-
|
|
144
|
-
-
|
|
145
|
-
-
|
|
146
|
-
- `applications()` - Embedding other TOS apps
|
|
316
|
+
- "Let's name the modes. You mentioned [X] and [Y] — should we call them '[mode-a]' and '[mode-b]'?"
|
|
317
|
+
- Each mode becomes a value in the mode union type (e.g., `'kiosk' | 'display'`)
|
|
318
|
+
- Ask what each mode shows and whether it reads or writes shared data
|
|
147
319
|
|
|
148
|
-
|
|
149
|
-
- Use `proxy().fetch()` for external APIs (handles CORS)
|
|
150
|
-
- Note: authentication method (API key, OAuth, none)
|
|
151
|
-
- Note: rate limits if known
|
|
320
|
+
### Step 2: Discover the Top-Level Entity
|
|
152
321
|
|
|
153
|
-
**
|
|
154
|
-
- Timer-based (every N seconds/minutes)
|
|
155
|
-
- Event-based (on user action)
|
|
156
|
-
- Most apps use 30-60 second refresh for live data
|
|
322
|
+
**The developer will almost never volunteer this on their own.** You MUST actively discover or propose the organizing entity that scopes all shared data.
|
|
157
323
|
|
|
158
|
-
|
|
324
|
+
Ask: "What organizes the data these modes share? For example, is this per-location, per-department, per-topic, per-event?"
|
|
159
325
|
|
|
160
|
-
|
|
326
|
+
If the developer doesn't have a clear answer, **propose one** based on the app domain:
|
|
161
327
|
|
|
162
|
-
|
|
328
|
+
| App Domain | Likely Entity |
|
|
329
|
+
|------------|---------------|
|
|
330
|
+
| Queue / service | location, branch |
|
|
331
|
+
| Content / editorial | topic, channel |
|
|
332
|
+
| Event / scheduling | event, venue |
|
|
333
|
+
| Organizational | department, team |
|
|
334
|
+
| Retail / menu | store, menu |
|
|
163
335
|
|
|
164
|
-
|
|
165
|
-
// Instance-scoped keys (most common - per-widget config)
|
|
166
|
-
export const use[Key]State = createUseInstanceStoreState<Type>('key', default)
|
|
167
|
-
// Usage: const [loading, value, setValue] = use[Key]State()
|
|
336
|
+
Explain WHY: "This lets you run the same app at multiple [locations] — each with its own independent data — without creating separate app instances. An admin just selects which [location] each device belongs to."
|
|
168
337
|
|
|
169
|
-
|
|
170
|
-
export const use[Key]State = createUseApplicationStoreState<Type>('key', default)
|
|
171
|
-
// Usage: const [loading, value, setValue] = use[Key]State()
|
|
338
|
+
Confirm the entity name before proceeding.
|
|
172
339
|
|
|
173
|
-
|
|
174
|
-
export const use[Key]State = createUseDeviceStoreState<Type>('key', default)
|
|
175
|
-
// Usage: const [loading, value, setValue] = use[Key]State()
|
|
176
|
-
```
|
|
340
|
+
### Step 3: Map Shared Data
|
|
177
341
|
|
|
178
|
-
|
|
342
|
+
For each content element from Phase 2, determine if it's:
|
|
343
|
+
- **Per-device** (instance scope) — mode selection, entity selection, UI scale
|
|
344
|
+
- **Account-wide** (application scope) — entity list, API keys
|
|
345
|
+
- **Per-entity** (dynamic namespace scope) — the actual shared data between modes
|
|
179
346
|
|
|
180
|
-
|
|
181
|
-
- [ ] Text input for X
|
|
182
|
-
- [ ] Dropdown for Y
|
|
183
|
-
- [ ] Slider for Z
|
|
184
|
-
- [ ] Toggle for W
|
|
347
|
+
### Step 4: Mode-Specific Settings
|
|
185
348
|
|
|
186
|
-
|
|
349
|
+
Ask: "Are there any settings that only apply to one mode? For example, audio chime only on the display, or touch feedback only on the kiosk?"
|
|
187
350
|
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
351
|
+
### Reference: Multi-Mode Store Pattern
|
|
352
|
+
|
|
353
|
+
```typescript
|
|
354
|
+
// Instance scope — per device
|
|
355
|
+
const useModeStoreState = createUseInstanceStoreState<'kiosk' | 'display'>('mode', 'kiosk')
|
|
356
|
+
const useSelectedLocationStoreState = createUseInstanceStoreState<string>('selected-location', 'Location A')
|
|
357
|
+
|
|
358
|
+
// Application scope — entity management
|
|
359
|
+
const useLocationsStoreState = createUseApplicationStoreState<string[]>('locations', ['Location A'])
|
|
360
|
+
|
|
361
|
+
// Dynamic namespace scope — shared between modes, scoped to entity
|
|
362
|
+
const useQueuesStoreState = createUseDynamicNamespaceStoreState<Queue[]>('queues', [])
|
|
195
363
|
```
|
|
196
364
|
|
|
197
|
-
|
|
365
|
+
See `tos-multi-mode` skill for the complete implementation pattern.
|
|
198
366
|
|
|
199
|
-
|
|
200
|
-
- [ ] proxy().fetch() - External API calls
|
|
201
|
-
- [ ] weather() - Weather data
|
|
202
|
-
- [ ] media() - Media library
|
|
367
|
+
---
|
|
203
368
|
|
|
204
|
-
##
|
|
369
|
+
## Phase 6: Summary & Validation
|
|
205
370
|
|
|
206
|
-
After gathering requirements, provide a structured summary:
|
|
371
|
+
After gathering all requirements, provide a structured summary:
|
|
207
372
|
|
|
208
373
|
```markdown
|
|
209
374
|
# [App Name] Requirements
|
|
210
375
|
|
|
376
|
+
## Interaction Model
|
|
377
|
+
**[Display-Only | Interactive | Multi-Mode]**
|
|
378
|
+
- SDK: `@telemetryos/sdk`
|
|
379
|
+
- Mount Points: `render` (display), `settings` (config UI)
|
|
380
|
+
- Interaction: [Display-only with subscriptions | Interactive with onClick handlers | Multi-mode with entity-scoped data]
|
|
381
|
+
|
|
211
382
|
## Vision
|
|
212
383
|
[One sentence description]
|
|
213
384
|
|
|
214
|
-
## Render View
|
|
215
|
-
- Layout: [single/split/grid/fullscreen]
|
|
216
|
-
- Content: [description]
|
|
217
|
-
- Refresh: [interval or trigger]
|
|
385
|
+
## Render View User Stories
|
|
218
386
|
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
387
|
+
### Display-Only Apps:
|
|
388
|
+
**As a viewer, I see:**
|
|
389
|
+
- [Layout description]
|
|
390
|
+
- [Content elements list]
|
|
391
|
+
- [Visual hierarchy]
|
|
223
392
|
|
|
224
|
-
|
|
225
|
-
-
|
|
226
|
-
|
|
393
|
+
**Content updates:**
|
|
394
|
+
- [Frequency/trigger]
|
|
395
|
+
|
|
396
|
+
### Interactive Apps:
|
|
397
|
+
**As a user approaching the kiosk:**
|
|
398
|
+
- I see [idle state]
|
|
399
|
+
- When I touch [element], [interaction flow]
|
|
400
|
+
- I can [list interactions]
|
|
401
|
+
- After [timeout], screen returns to [idle state]
|
|
402
|
+
|
|
403
|
+
**onClick handlers needed:**
|
|
404
|
+
- [List interactive elements]
|
|
405
|
+
|
|
406
|
+
## Content → Data Source Mapping
|
|
407
|
+
|
|
408
|
+
| Content Element | Data Source | API/Method | Refresh |
|
|
409
|
+
|-----------------|-------------|------------|---------|
|
|
410
|
+
| Current weather | TOS Weather API | weather().getConditions() | 60s |
|
|
411
|
+
| Company logo | Media Library | media().getById() | Static |
|
|
412
|
+
| Stock prices | External API | proxy().fetch('...') | 30s |
|
|
413
|
+
|
|
414
|
+
## Multi-Mode Design (if applicable)
|
|
415
|
+
|
|
416
|
+
**Modes:** [mode-a] (description), [mode-b] (description)
|
|
417
|
+
**Top-Level Entity:** [entity name] (e.g., location, topic)
|
|
418
|
+
**Entity-Scoped Data:** [list shared data keys that use dynamic namespace]
|
|
419
|
+
**Mode-Specific Settings:** [list any settings that only apply to one mode]
|
|
420
|
+
|
|
421
|
+
## Store Keys (Settings Configuration)
|
|
422
|
+
|
|
423
|
+
| Key | Category | Scope | Type | Default | UI Component | Required? |
|
|
424
|
+
|-----|----------|-------|------|---------|--------------|-----------|
|
|
425
|
+
| uiScale | Display Settings | instance | number | 1 | Slider (1-3) | No (digital signage only) |
|
|
426
|
+
| city | Localization | instance | string | '' | Text input | Yes |
|
|
427
|
+
| apiKey | Data Config | application | string | '' | Password input | Yes |
|
|
428
|
+
| units | Localization | instance | 'imperial' \| 'metric' | 'imperial' | Dropdown | Yes |
|
|
429
|
+
| refreshInterval | Data Config | instance | number | 30 | Slider (10-300) | No |
|
|
430
|
+
|
|
431
|
+
**Note:** UI Scale setting is ALWAYS included for digital signage apps, but NOT for interactive kiosk apps.
|
|
227
432
|
|
|
228
433
|
## Implementation Plan
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
434
|
+
|
|
435
|
+
1. **Store Hooks** (hooks/store.ts)
|
|
436
|
+
- Create instance-scoped hooks for [list keys]
|
|
437
|
+
- Create application-scoped hooks for [list keys]
|
|
438
|
+
- [If multi-mode] Create dynamic namespace hooks for entity-scoped data
|
|
439
|
+
- [If multi-mode] Create namespace helper function
|
|
440
|
+
|
|
441
|
+
2. **Settings UI** (views/Settings.tsx)
|
|
442
|
+
- [For Digital Signage] UI Scale slider (instance scope, 1-3 range, 0.01 step)
|
|
443
|
+
- [List each setting with component type]
|
|
444
|
+
- Validation for required fields
|
|
445
|
+
|
|
446
|
+
3. **Render View** (views/Render.tsx)
|
|
447
|
+
- [For Digital Signage] Use UI scale hooks (useUiScaleToSetRem with uiScale from store)
|
|
448
|
+
- [For Interactive Kiosk] Use UI scale hooks (useUiScaleToSetRem with fixed scale, typically 1)
|
|
449
|
+
- Layout structure: [describe layout]
|
|
450
|
+
- [For Interactive] Add onClick handlers for [list elements]
|
|
451
|
+
- [For Interactive] Add idle timeout logic
|
|
452
|
+
|
|
453
|
+
4. **Data Fetching**
|
|
454
|
+
- [List each data source with method]
|
|
455
|
+
- Error handling
|
|
456
|
+
- Refresh logic
|
|
457
|
+
|
|
458
|
+
5. **Polish**
|
|
459
|
+
- Responsive scaling (rem units)
|
|
460
|
+
- Loading states
|
|
461
|
+
- [For Interactive] Touch feedback animations
|
|
234
462
|
```
|
|
235
463
|
|
|
464
|
+
### Validation Question
|
|
465
|
+
|
|
466
|
+
After presenting the summary, ask:
|
|
467
|
+
|
|
468
|
+
> "Does this capture everything correctly? Anything I missed or got wrong?"
|
|
469
|
+
|
|
470
|
+
Wait for confirmation before proceeding to implementation.
|
|
471
|
+
|
|
472
|
+
---
|
|
473
|
+
|
|
474
|
+
## Reference: Layout Types
|
|
475
|
+
|
|
476
|
+
If you need to clarify layout:
|
|
477
|
+
- **Single panel** - fullscreen content
|
|
478
|
+
- **Split layout** - sidebar + main area
|
|
479
|
+
- **Grid** - multiple items in rows/columns
|
|
480
|
+
- **Fullscreen media** - image/video player
|
|
481
|
+
|
|
482
|
+
---
|
|
483
|
+
|
|
236
484
|
## Tips for Success
|
|
237
485
|
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
486
|
+
### For the Agent
|
|
487
|
+
|
|
488
|
+
1. **One phase at a time** - Don't jump ahead to data sources before understanding render view
|
|
489
|
+
2. **Show your thinking** - When inferring, explain your reasoning transparently
|
|
490
|
+
3. **Validate assumptions** - Confirm important decisions before moving on
|
|
491
|
+
4. **Be conversational** - This is a dialogue, not a form to fill out
|
|
492
|
+
5. **Skip irrelevant questions** - If they already told you something, don't ask again
|
|
493
|
+
6. **Recognize multi-mode patterns** — Watch for indicators of different views per device
|
|
494
|
+
7. **Discover the top-level entity** — For multi-mode apps, the developer won't volunteer this. You must ask or propose one
|
|
495
|
+
|
|
496
|
+
### Common Patterns to Recognize
|
|
497
|
+
|
|
498
|
+
- **Weather Display** → Display-only, TOS weather API, location settings
|
|
499
|
+
- **Menu Board** → Display-only, media library, scheduled updates
|
|
500
|
+
- **Wayfinding Kiosk** → Interactive, touch navigation, search functionality
|
|
501
|
+
- **Data Dashboard** → Display-only, external API, refresh interval
|
|
502
|
+
- **Queue Manager** → Multi-mode (kiosk + display), entity: location, shared queue data
|
|
503
|
+
|
|
504
|
+
### What to Infer vs What to Ask
|
|
505
|
+
|
|
506
|
+
**Infer (with transparency):**
|
|
507
|
+
- TOS weather API for weather data
|
|
508
|
+
- Media library for logos/images
|
|
509
|
+
- Timer-based refresh for live data
|
|
510
|
+
- Instance scope for most settings
|
|
511
|
+
|
|
512
|
+
**Ask (don't assume):**
|
|
513
|
+
- Which external API to use
|
|
514
|
+
- API authentication methods
|
|
515
|
+
- Specific refresh intervals
|
|
516
|
+
- Edge cases or constraints
|
|
517
|
+
|
|
518
|
+
---
|
|
243
519
|
|
|
244
520
|
## Next Steps
|
|
245
521
|
|
|
246
522
|
After gathering requirements, use these skills to implement:
|
|
247
523
|
|
|
524
|
+
- **`tos-multi-mode`** - Multi-mode architecture patterns (if building multi-mode app — read first)
|
|
248
525
|
- **`tos-store-sync`** - Create store hooks from the Store Keys table
|
|
249
526
|
- **`tos-settings-ui`** - Build the Settings UI components
|
|
250
|
-
- **`tos-
|
|
527
|
+
- **`tos-render-ui-design`** - Design the Render view layout (foundation - always read first)
|
|
528
|
+
- **`tos-render-signage-design`** - Display-only render patterns (if building digital signage)
|
|
529
|
+
- **`tos-render-kiosk-design`** - Interactive render patterns (if building kiosk)
|
|
530
|
+
- **`tos-proxy-fetch`** - Implement external API calls (if needed)
|
|
251
531
|
- **`tos-weather-api`** - Integrate weather data (if needed)
|
|
252
532
|
- **`tos-media-api`** - Access media library (if needed)
|