@telemetryos/cli 1.8.3 → 1.10.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 +4 -4
- package/dist/commands/init.js +90 -42
- package/dist/commands/publish.d.ts +2 -0
- package/dist/commands/publish.js +208 -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 +6 -0
- package/dist/services/cli-config.js +23 -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 +6 -5
- package/templates/vite-react-typescript/_claude/settings.local.json +2 -1
- package/templates/vite-react-typescript/_claude/skills/tos-render-design/SKILL.md +304 -12
- package/templates/vite-react-typescript/_claude/skills/tos-requirements/SKILL.md +367 -130
- package/templates/vite-react-typescript/_claude/skills/tos-weather-api/SKILL.md +443 -269
|
@@ -1,77 +1,250 @@
|
|
|
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-App Indicators**:
|
|
49
|
+
- "one app shows X and another shows Y"
|
|
50
|
+
- "main display and control panel"
|
|
51
|
+
- "shared information between apps"
|
|
35
52
|
|
|
36
|
-
|
|
37
|
-
- "Quick layout check: fullscreen content, or split/grid layout?"
|
|
53
|
+
### Confirm Interaction Model
|
|
38
54
|
|
|
39
|
-
|
|
55
|
+
Before proceeding to Phase 2, explicitly state your understanding:
|
|
40
56
|
|
|
41
|
-
|
|
57
|
+
**For Digital Signage:**
|
|
58
|
+
> "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
59
|
|
|
43
|
-
|
|
60
|
+
**For Interactive Kiosk:**
|
|
61
|
+
> "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
62
|
|
|
45
|
-
-
|
|
46
|
-
-
|
|
47
|
-
- Edge cases that matter for their use case
|
|
63
|
+
**For Multi-App System:**
|
|
64
|
+
> "Got it - you're describing TWO separate apps: [App A description] and [App B description]. They'll communicate via shared store namespaces. We'll need to gather requirements for each app. Does that match what you have in mind?"
|
|
48
65
|
|
|
49
|
-
|
|
50
|
-
- Categories that don't apply to their app
|
|
51
|
-
- Settings with obvious defaults
|
|
52
|
-
- Technical details you can infer
|
|
66
|
+
Wait for confirmation before proceeding.
|
|
53
67
|
|
|
54
|
-
|
|
68
|
+
---
|
|
55
69
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
70
|
+
## Phase 2: Render View First (What Users See)
|
|
71
|
+
|
|
72
|
+
**Goal:** Understand the visual experience and interactions BEFORE diving into data sources.
|
|
73
|
+
|
|
74
|
+
### Visual Experience Questions
|
|
75
|
+
|
|
76
|
+
Ask conversationally, one at a time, based on what you already know:
|
|
77
|
+
|
|
78
|
+
#### For ALL Apps:
|
|
79
|
+
|
|
80
|
+
**Screen Layout:**
|
|
81
|
+
- "What does the screen look like? Walk me through what someone sees."
|
|
82
|
+
- Listen for: single panel, split layout, grid, fullscreen media
|
|
83
|
+
|
|
84
|
+
**Content Elements:**
|
|
85
|
+
- "What specific content appears on screen?"
|
|
86
|
+
- Listen for: text, images, video, data displays, lists, charts
|
|
87
|
+
|
|
88
|
+
**Visual Priority:**
|
|
89
|
+
- "What's the most important thing viewers should see?"
|
|
90
|
+
- Helps determine layout hierarchy
|
|
91
|
+
|
|
92
|
+
#### For Interactive Apps ONLY:
|
|
93
|
+
|
|
94
|
+
**Interaction Flow:**
|
|
95
|
+
- "When someone touches the screen, what happens? Walk me through the interaction."
|
|
96
|
+
- Listen for: button clicks, navigation flow, form inputs, search
|
|
97
|
+
|
|
98
|
+
**User Journey:**
|
|
99
|
+
- "What's a typical user flow? For example: User arrives → touches X → sees Y → does Z"
|
|
100
|
+
|
|
101
|
+
**Idle State:**
|
|
102
|
+
- "What happens when no one is interacting? Does it return to a home screen?"
|
|
103
|
+
|
|
104
|
+
#### For Display-Only Apps ONLY:
|
|
105
|
+
|
|
106
|
+
**Content Updates:**
|
|
107
|
+
- "How often should the content update?"
|
|
108
|
+
- Listen for: real-time, every X seconds/minutes, on schedule
|
|
109
|
+
|
|
110
|
+
**Rotation/Playlist:**
|
|
111
|
+
- "Does content rotate between different views, or stay on one view?"
|
|
112
|
+
|
|
113
|
+
### Capture User Stories
|
|
114
|
+
|
|
115
|
+
Based on their answers, document user stories:
|
|
116
|
+
|
|
117
|
+
**For Display-Only Apps:**
|
|
118
|
+
```
|
|
119
|
+
User Story: Render View
|
|
120
|
+
- As a viewer, I see [describe layout]
|
|
121
|
+
- The screen displays [list content elements]
|
|
122
|
+
- Content updates [frequency/trigger]
|
|
123
|
+
- [Most important element] is prominently displayed
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
**For Interactive Apps:**
|
|
127
|
+
```
|
|
128
|
+
User Story: Render View
|
|
129
|
+
- As a user approaching the kiosk, I see [idle/home screen]
|
|
130
|
+
- When I touch [element], [what happens]
|
|
131
|
+
- I can [describe interactions: navigate, search, input]
|
|
132
|
+
- After [time], the screen returns to [idle state]
|
|
133
|
+
- onClick handlers needed for: [list interactive elements]
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
### DO NOT Ask About Data Sources Yet
|
|
61
137
|
|
|
62
|
-
|
|
138
|
+
At this phase:
|
|
139
|
+
- ✅ DO focus on what's visible and interactions
|
|
140
|
+
- ✅ DO ask about layout, content elements, visual hierarchy
|
|
141
|
+
- ✅ DO understand user flows for interactive apps
|
|
142
|
+
- ❌ DON'T ask "where does data come from?"
|
|
143
|
+
- ❌ DON'T dive into APIs or data sources
|
|
144
|
+
- ❌ DON'T ask about settings yet
|
|
145
|
+
|
|
146
|
+
---
|
|
147
|
+
|
|
148
|
+
## Phase 3: Data Source Discovery
|
|
149
|
+
|
|
150
|
+
**Now** that you understand what users SEE, map content elements to data sources.
|
|
151
|
+
|
|
152
|
+
### Data Mapping Questions
|
|
153
|
+
|
|
154
|
+
For each content element identified in Phase 2:
|
|
155
|
+
|
|
156
|
+
**Source Identification:**
|
|
157
|
+
- "For [content element], where should that data come from?"
|
|
158
|
+
- Listen for: TOS APIs, external APIs, user uploads, static content
|
|
159
|
+
|
|
160
|
+
**External APIs** (if mentioned):
|
|
161
|
+
- "Do you have a specific API in mind for [data source], or should I suggest one?"
|
|
162
|
+
- "Will we need an API key for that?"
|
|
163
|
+
|
|
164
|
+
**Media Content** (if images/video mentioned):
|
|
165
|
+
- "Will media come from the TelemetryOS media library, or external URLs?"
|
|
166
|
+
|
|
167
|
+
**Real-time vs Static:**
|
|
168
|
+
- For dynamic content: "How often should [data] refresh?"
|
|
169
|
+
- For static content: "Will admins update this in Settings, or is it hardcoded?"
|
|
170
|
+
|
|
171
|
+
### Inference with Transparency
|
|
172
|
+
|
|
173
|
+
**Show your thinking** when making important assumptions:
|
|
174
|
+
|
|
175
|
+
✅ **Good examples:**
|
|
176
|
+
- "I'm assuming the weather data comes from the TOS weather API since you mentioned current conditions and forecast - is that right?"
|
|
177
|
+
- "Since you mentioned 'logo', I'm assuming that's uploaded to the TOS media library - correct?"
|
|
178
|
+
- "You mentioned refreshing every 30 seconds - I'll use a timer-based refresh pattern for that."
|
|
179
|
+
|
|
180
|
+
❌ **Don't assume without asking:**
|
|
181
|
+
- Which external API to use
|
|
182
|
+
- Authentication methods
|
|
183
|
+
- Data formats or structures
|
|
184
|
+
|
|
185
|
+
### Reference: Data Sources
|
|
186
|
+
|
|
187
|
+
**TelemetryOS Platform APIs:**
|
|
188
|
+
- `media()` - User-uploaded images/videos from media library
|
|
189
|
+
- `weather()` - Weather data (current, hourly, daily forecasts)
|
|
190
|
+
- `applications()` - Embedding other TOS apps
|
|
191
|
+
- `store()` - Persistent configuration and state
|
|
192
|
+
|
|
193
|
+
**External APIs:**
|
|
194
|
+
- Use `proxy().fetch()` for external APIs (handles CORS)
|
|
195
|
+
- Note: authentication method (API key, OAuth, none)
|
|
196
|
+
- Note: rate limits if known
|
|
197
|
+
|
|
198
|
+
**Refresh patterns:**
|
|
199
|
+
- Timer-based (every N seconds/minutes)
|
|
200
|
+
- Event-based (on user action, for interactive apps)
|
|
201
|
+
- Most apps use 30-60 second refresh for live data
|
|
202
|
+
|
|
203
|
+
---
|
|
63
204
|
|
|
64
|
-
|
|
205
|
+
## Phase 4: Settings & Configuration
|
|
65
206
|
|
|
66
|
-
|
|
207
|
+
**Goal:** Identify what admins should be able to configure.
|
|
208
|
+
|
|
209
|
+
### Configuration Questions
|
|
210
|
+
|
|
211
|
+
**Admin Controls:**
|
|
212
|
+
- "What should admins be able to configure in the Settings panel?"
|
|
213
|
+
- Prompt with relevant categories if needed (see Reference below)
|
|
214
|
+
|
|
215
|
+
**Sensible Defaults:**
|
|
216
|
+
- "What are good default values? The app should work with minimal config."
|
|
217
|
+
|
|
218
|
+
**Required vs Optional:**
|
|
219
|
+
- "Which settings are required for the app to function?"
|
|
220
|
+
|
|
221
|
+
**Validation:**
|
|
222
|
+
- "Are there any constraints? For example, minimum/maximum values, specific formats?"
|
|
223
|
+
|
|
224
|
+
### UI Scale Setting
|
|
225
|
+
|
|
226
|
+
**For Digital Signage (Display-Only) Apps:**
|
|
227
|
+
- **ALWAYS include UI Scale setting** (instance scope)
|
|
228
|
+
- Default: 1, Range: 1-3 (step 0.01)
|
|
229
|
+
- UI Component: Slider
|
|
230
|
+
- Allows admins to adjust content size for different viewing distances and screen sizes
|
|
231
|
+
|
|
232
|
+
**For Interactive Kiosk Apps:**
|
|
233
|
+
- **DO NOT include UI Scale setting**
|
|
234
|
+
- Kiosks have fixed interaction distance (user is right in front of screen)
|
|
235
|
+
- Content sizing is optimized for touch interaction, not adjustable
|
|
236
|
+
|
|
237
|
+
### Reference: Settings Categories
|
|
238
|
+
|
|
239
|
+
Consult as needed - don't ask about every category:
|
|
67
240
|
|
|
68
241
|
**Display Settings** - Visual appearance and layout
|
|
242
|
+
- **UI Scale** (digital signage only - ALWAYS include)
|
|
69
243
|
- Colors, fonts, background styles
|
|
70
244
|
- Layout options (columns, alignment, spacing)
|
|
71
245
|
- Show/hide toggles for UI elements
|
|
72
|
-
- Animation preferences
|
|
73
246
|
|
|
74
|
-
> Digital signage typically uses dark backgrounds (better contrast on TVs
|
|
247
|
+
> Digital signage typically uses dark backgrounds (better contrast on TVs). Don't ask about light/dark "mode" unless the developer brings it up.
|
|
75
248
|
|
|
76
249
|
**Data Configuration** - How the app fetches and processes data
|
|
77
250
|
- API keys and credentials
|
|
@@ -91,15 +264,14 @@ Settings allow admins to configure the app. Use these categories to identify wha
|
|
|
91
264
|
- Date/time formats
|
|
92
265
|
- Language/locale
|
|
93
266
|
|
|
94
|
-
|
|
267
|
+
### Store Scope Rules
|
|
95
268
|
|
|
96
|
-
**Default to `instance`** - most settings are instance-scoped.
|
|
269
|
+
**Default to `instance`** - most settings are instance-scoped.
|
|
97
270
|
|
|
98
|
-
**Use `application` scope for:**
|
|
271
|
+
**Use `application` scope ONLY for:**
|
|
99
272
|
- API keys and credentials (shared cost, single billing)
|
|
100
273
|
- Account-wide branding (company logo URL, brand colors)
|
|
101
274
|
- License keys or subscription identifiers
|
|
102
|
-
- Shared service endpoints configured once per account
|
|
103
275
|
|
|
104
276
|
**Use `instance` scope for everything else:**
|
|
105
277
|
- Content selection (what to display)
|
|
@@ -107,15 +279,19 @@ Settings allow admins to configure the app. Use these categories to identify wha
|
|
|
107
279
|
- Refresh intervals and timing
|
|
108
280
|
- Localization (timezone, units, language)
|
|
109
281
|
- Visual preferences (colors, fonts, backgrounds)
|
|
110
|
-
- Filters, sort order, display limits
|
|
111
282
|
|
|
112
|
-
**
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
283
|
+
**Use `device` scope (Render only) for:**
|
|
284
|
+
- Device-specific calibration settings
|
|
285
|
+
- Local cache data
|
|
286
|
+
- Interaction state that should persist on device
|
|
287
|
+
|
|
288
|
+
**Use `shared(namespace)` scope for:**
|
|
289
|
+
- Inter-app communication
|
|
290
|
+
- Broadcasting data between apps
|
|
291
|
+
|
|
292
|
+
Scope is typically inferred - don't ask unless unclear.
|
|
117
293
|
|
|
118
|
-
|
|
294
|
+
### Capture Store Keys
|
|
119
295
|
|
|
120
296
|
For each setting identified, record:
|
|
121
297
|
|
|
@@ -126,120 +302,180 @@ For each setting identified, record:
|
|
|
126
302
|
| units | Localization | instance | 'imperial' \| 'metric' | 'imperial' | enum | Yes |
|
|
127
303
|
| refreshInterval | Data Config | instance | number | 30 | 10-300 | No |
|
|
128
304
|
|
|
129
|
-
|
|
305
|
+
---
|
|
130
306
|
|
|
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?**
|
|
307
|
+
## Phase 5: Multi-App Communication (If Applicable)
|
|
136
308
|
|
|
137
|
-
|
|
309
|
+
**Only if Phase 1 identified multiple apps.**
|
|
138
310
|
|
|
139
|
-
###
|
|
311
|
+
### Communication Pattern Questions
|
|
140
312
|
|
|
141
|
-
|
|
313
|
+
**Data Sharing:**
|
|
314
|
+
- "How should [App A] and [App B] share data?"
|
|
315
|
+
- Suggest: "Typically, apps share data via store namespaces. App A writes to a shared namespace, App B reads from it."
|
|
142
316
|
|
|
143
|
-
**
|
|
144
|
-
-
|
|
145
|
-
-
|
|
146
|
-
- `applications()` - Embedding other TOS apps
|
|
317
|
+
**Namespace Design:**
|
|
318
|
+
- "What data needs to be shared?"
|
|
319
|
+
- Design namespace structure: `store().shared('namespace-name')`
|
|
147
320
|
|
|
148
|
-
**
|
|
149
|
-
-
|
|
150
|
-
- Note: authentication method (API key, OAuth, none)
|
|
151
|
-
- Note: rate limits if known
|
|
321
|
+
**Update Pattern:**
|
|
322
|
+
- "When should App B see updates from App A - immediately (subscribe) or on-demand?"
|
|
152
323
|
|
|
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
|
|
324
|
+
### Shared Store Pattern
|
|
157
325
|
|
|
158
|
-
|
|
326
|
+
**Pattern: Shared Store Namespace**
|
|
327
|
+
```typescript
|
|
328
|
+
// App A writes:
|
|
329
|
+
await store().shared('weather-data').set('current', data)
|
|
159
330
|
|
|
160
|
-
|
|
331
|
+
// App B subscribes:
|
|
332
|
+
store().shared('weather-data').subscribe('current', callback)
|
|
333
|
+
```
|
|
161
334
|
|
|
162
|
-
|
|
335
|
+
Best for: Simple data sharing, pub/sub patterns between apps
|
|
163
336
|
|
|
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()
|
|
337
|
+
---
|
|
168
338
|
|
|
169
|
-
|
|
170
|
-
export const use[Key]State = createUseApplicationStoreState<Type>('key', default)
|
|
171
|
-
// Usage: const [loading, value, setValue] = use[Key]State()
|
|
339
|
+
## Phase 6: Summary & Validation
|
|
172
340
|
|
|
173
|
-
|
|
174
|
-
export const use[Key]State = createUseDeviceStoreState<Type>('key', default)
|
|
175
|
-
// Usage: const [loading, value, setValue] = use[Key]State()
|
|
176
|
-
```
|
|
341
|
+
After gathering all requirements, provide a structured summary:
|
|
177
342
|
|
|
178
|
-
|
|
343
|
+
```markdown
|
|
344
|
+
# [App Name] Requirements
|
|
179
345
|
|
|
180
|
-
|
|
181
|
-
-
|
|
182
|
-
-
|
|
183
|
-
-
|
|
184
|
-
- [
|
|
346
|
+
## Interaction Model
|
|
347
|
+
**[Display-Only | Interactive | Multi-App System]**
|
|
348
|
+
- SDK: `@telemetryos/sdk`
|
|
349
|
+
- Mount Points: `render` (display), `settings` (config UI)
|
|
350
|
+
- Interaction: [Display-only with subscriptions | Interactive with onClick handlers]
|
|
185
351
|
|
|
186
|
-
|
|
352
|
+
## Vision
|
|
353
|
+
[One sentence description]
|
|
187
354
|
|
|
188
|
-
|
|
189
|
-
```
|
|
190
|
-
Render
|
|
191
|
-
├── Header (title, logo)
|
|
192
|
-
├── MainContent
|
|
193
|
-
│ └── DataDisplay
|
|
194
|
-
└── Footer (timestamp, refresh indicator)
|
|
195
|
-
```
|
|
355
|
+
## Render View User Stories
|
|
196
356
|
|
|
197
|
-
|
|
357
|
+
### Display-Only Apps:
|
|
358
|
+
**As a viewer, I see:**
|
|
359
|
+
- [Layout description]
|
|
360
|
+
- [Content elements list]
|
|
361
|
+
- [Visual hierarchy]
|
|
198
362
|
|
|
199
|
-
|
|
200
|
-
- [
|
|
201
|
-
- [ ] weather() - Weather data
|
|
202
|
-
- [ ] media() - Media library
|
|
363
|
+
**Content updates:**
|
|
364
|
+
- [Frequency/trigger]
|
|
203
365
|
|
|
204
|
-
|
|
366
|
+
### Interactive Apps:
|
|
367
|
+
**As a user approaching the kiosk:**
|
|
368
|
+
- I see [idle state]
|
|
369
|
+
- When I touch [element], [interaction flow]
|
|
370
|
+
- I can [list interactions]
|
|
371
|
+
- After [timeout], screen returns to [idle state]
|
|
205
372
|
|
|
206
|
-
|
|
373
|
+
**onClick handlers needed:**
|
|
374
|
+
- [List interactive elements]
|
|
207
375
|
|
|
208
|
-
|
|
209
|
-
# [App Name] Requirements
|
|
376
|
+
## Content → Data Source Mapping
|
|
210
377
|
|
|
211
|
-
|
|
212
|
-
|
|
378
|
+
| Content Element | Data Source | API/Method | Refresh |
|
|
379
|
+
|-----------------|-------------|------------|---------|
|
|
380
|
+
| Current weather | TOS Weather API | weather().getConditions() | 60s |
|
|
381
|
+
| Company logo | Media Library | media().getById() | Static |
|
|
382
|
+
| Stock prices | External API | proxy().fetch('...') | 30s |
|
|
213
383
|
|
|
214
|
-
##
|
|
215
|
-
- Layout: [single/split/grid/fullscreen]
|
|
216
|
-
- Content: [description]
|
|
217
|
-
- Refresh: [interval or trigger]
|
|
384
|
+
## Store Keys (Settings Configuration)
|
|
218
385
|
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
|
386
|
+
| Key | Category | Scope | Type | Default | UI Component | Required? |
|
|
387
|
+
|-----|----------|-------|------|---------|--------------|-----------|
|
|
388
|
+
| uiScale | Display Settings | instance | number | 1 | Slider (1-3) | No (digital signage only) |
|
|
389
|
+
| city | Localization | instance | string | '' | Text input | Yes |
|
|
390
|
+
| apiKey | Data Config | application | string | '' | Password input | Yes |
|
|
391
|
+
| units | Localization | instance | 'imperial' \| 'metric' | 'imperial' | Dropdown | Yes |
|
|
392
|
+
| refreshInterval | Data Config | instance | number | 30 | Slider (10-300) | No |
|
|
223
393
|
|
|
224
|
-
|
|
225
|
-
- Internal: [list]
|
|
226
|
-
- External: [list with endpoints]
|
|
394
|
+
**Note:** UI Scale setting is ALWAYS included for digital signage apps, but NOT for interactive kiosk apps.
|
|
227
395
|
|
|
228
396
|
## Implementation Plan
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
397
|
+
|
|
398
|
+
1. **Store Hooks** (hooks/store.ts)
|
|
399
|
+
- Create instance-scoped hooks for [list keys]
|
|
400
|
+
- Create application-scoped hooks for [list keys]
|
|
401
|
+
- [If multi-app] Create shared namespace hooks
|
|
402
|
+
|
|
403
|
+
2. **Settings UI** (views/Settings.tsx)
|
|
404
|
+
- [For Digital Signage] UI Scale slider (instance scope, 1-3 range, 0.01 step)
|
|
405
|
+
- [List each setting with component type]
|
|
406
|
+
- Validation for required fields
|
|
407
|
+
|
|
408
|
+
3. **Render View** (views/Render.tsx)
|
|
409
|
+
- [For Digital Signage] Use UI scale hooks (useUiScaleToSetRem with uiScale from store)
|
|
410
|
+
- [For Interactive Kiosk] Use UI scale hooks (useUiScaleToSetRem with fixed scale, typically 1)
|
|
411
|
+
- Layout structure: [describe layout]
|
|
412
|
+
- [For Interactive] Add onClick handlers for [list elements]
|
|
413
|
+
- [For Interactive] Add idle timeout logic
|
|
414
|
+
|
|
415
|
+
4. **Data Fetching**
|
|
416
|
+
- [List each data source with method]
|
|
417
|
+
- Error handling
|
|
418
|
+
- Refresh logic
|
|
419
|
+
|
|
420
|
+
5. **Polish**
|
|
421
|
+
- Responsive scaling (rem units)
|
|
422
|
+
- Loading states
|
|
423
|
+
- [For Interactive] Touch feedback animations
|
|
234
424
|
```
|
|
235
425
|
|
|
426
|
+
### Validation Question
|
|
427
|
+
|
|
428
|
+
After presenting the summary, ask:
|
|
429
|
+
|
|
430
|
+
> "Does this capture everything correctly? Anything I missed or got wrong?"
|
|
431
|
+
|
|
432
|
+
Wait for confirmation before proceeding to implementation.
|
|
433
|
+
|
|
434
|
+
---
|
|
435
|
+
|
|
436
|
+
## Reference: Layout Types
|
|
437
|
+
|
|
438
|
+
If you need to clarify layout:
|
|
439
|
+
- **Single panel** - fullscreen content
|
|
440
|
+
- **Split layout** - sidebar + main area
|
|
441
|
+
- **Grid** - multiple items in rows/columns
|
|
442
|
+
- **Fullscreen media** - image/video player
|
|
443
|
+
|
|
444
|
+
---
|
|
445
|
+
|
|
236
446
|
## Tips for Success
|
|
237
447
|
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
448
|
+
### For the Agent
|
|
449
|
+
|
|
450
|
+
1. **One phase at a time** - Don't jump ahead to data sources before understanding render view
|
|
451
|
+
2. **Show your thinking** - When inferring, explain your reasoning transparently
|
|
452
|
+
3. **Validate assumptions** - Confirm important decisions before moving on
|
|
453
|
+
4. **Be conversational** - This is a dialogue, not a form to fill out
|
|
454
|
+
5. **Skip irrelevant questions** - If they already told you something, don't ask again
|
|
455
|
+
6. **Recognize multi-app patterns** - Watch for indicators of multiple communicating apps
|
|
456
|
+
|
|
457
|
+
### Common Patterns to Recognize
|
|
458
|
+
|
|
459
|
+
- **Weather Display** → Display-only, TOS weather API, location settings
|
|
460
|
+
- **Menu Board** → Display-only, media library, scheduled updates
|
|
461
|
+
- **Wayfinding Kiosk** → Interactive, touch navigation, search functionality
|
|
462
|
+
- **Data Dashboard** → Display-only, external API, refresh interval
|
|
463
|
+
|
|
464
|
+
### What to Infer vs What to Ask
|
|
465
|
+
|
|
466
|
+
**Infer (with transparency):**
|
|
467
|
+
- TOS weather API for weather data
|
|
468
|
+
- Media library for logos/images
|
|
469
|
+
- Timer-based refresh for live data
|
|
470
|
+
- Instance scope for most settings
|
|
471
|
+
|
|
472
|
+
**Ask (don't assume):**
|
|
473
|
+
- Which external API to use
|
|
474
|
+
- API authentication methods
|
|
475
|
+
- Specific refresh intervals
|
|
476
|
+
- Edge cases or constraints
|
|
477
|
+
|
|
478
|
+
---
|
|
243
479
|
|
|
244
480
|
## Next Steps
|
|
245
481
|
|
|
@@ -247,6 +483,7 @@ After gathering requirements, use these skills to implement:
|
|
|
247
483
|
|
|
248
484
|
- **`tos-store-sync`** - Create store hooks from the Store Keys table
|
|
249
485
|
- **`tos-settings-ui`** - Build the Settings UI components
|
|
250
|
-
- **`tos-
|
|
486
|
+
- **`tos-render-design`** - Design the Render view layout
|
|
487
|
+
- **`tos-proxy-fetch`** - Implement external API calls (if needed)
|
|
251
488
|
- **`tos-weather-api`** - Integrate weather data (if needed)
|
|
252
489
|
- **`tos-media-api`** - Access media library (if needed)
|