showpane 0.4.13 → 0.4.15
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/README.md +2 -1
- package/bundle/meta/scaffold-manifest.json +10 -10
- package/bundle/scaffold/VERSION +1 -1
- package/bundle/scaffold/prisma/seed.ts +40 -35
- package/bundle/scaffold/src/__tests__/portal-contracts.test.ts +7 -0
- package/bundle/scaffold/src/app/(portal)/client/example/example-client.tsx +1 -2
- package/bundle/scaffold/src/app/(portal)/client/page.tsx +5 -4
- package/bundle/scaffold/src/app/page.tsx +43 -6
- package/bundle/scaffold/src/components/portal-shell.tsx +23 -0
- package/bundle/scaffold/src/lib/portal-contracts.ts +33 -0
- package/bundle/toolchain/CLI_VERSION +1 -0
- package/bundle/toolchain/TELEMETRY_CONFIG.json +4 -0
- package/bundle/toolchain/VERSION +1 -1
- package/bundle/toolchain/bin/ensure-cloud-project-link.ts +34 -1
- package/bundle/toolchain/bin/showpane-config +108 -29
- package/bundle/toolchain/bin/showpane-telemetry-log +84 -0
- package/bundle/toolchain/bin/showpane-telemetry-sync +212 -0
- package/bundle/toolchain/bin/showpane-update-check +130 -0
- package/bundle/toolchain/skills/SKILL.md.tmpl +13 -0
- package/bundle/toolchain/skills/VERSION +1 -1
- package/bundle/toolchain/skills/portal-analytics/SKILL.md +60 -38
- package/bundle/toolchain/skills/portal-analytics/SKILL.md.tmpl +192 -0
- package/bundle/toolchain/skills/portal-create/SKILL.md +65 -67
- package/bundle/toolchain/skills/portal-create/SKILL.md.tmpl +264 -0
- package/bundle/toolchain/skills/portal-credentials/SKILL.md +66 -49
- package/bundle/toolchain/skills/portal-credentials/SKILL.md.tmpl +198 -0
- package/bundle/toolchain/skills/portal-delete/SKILL.md +63 -41
- package/bundle/toolchain/skills/portal-delete/SKILL.md.tmpl +194 -0
- package/bundle/toolchain/skills/portal-deploy/SKILL.md +57 -47
- package/bundle/toolchain/skills/portal-deploy/SKILL.md.tmpl +452 -0
- package/bundle/toolchain/skills/portal-dev/SKILL.md +65 -47
- package/bundle/toolchain/skills/portal-dev/SKILL.md.tmpl +228 -0
- package/bundle/toolchain/skills/portal-list/SKILL.md +64 -43
- package/bundle/toolchain/skills/portal-list/SKILL.md.tmpl +181 -0
- package/bundle/toolchain/skills/portal-onboard/SKILL.md +331 -162
- package/bundle/toolchain/skills/portal-onboard/SKILL.md.tmpl +340 -0
- package/bundle/toolchain/skills/portal-preview/SKILL.md +65 -44
- package/bundle/toolchain/skills/portal-preview/SKILL.md.tmpl +171 -0
- package/bundle/toolchain/skills/portal-setup/SKILL.md +79 -60
- package/bundle/toolchain/skills/portal-setup/SKILL.md.tmpl +227 -0
- package/bundle/toolchain/skills/portal-share/SKILL.md +69 -47
- package/bundle/toolchain/skills/portal-share/SKILL.md.tmpl +162 -0
- package/bundle/toolchain/skills/portal-status/SKILL.md +58 -37
- package/bundle/toolchain/skills/portal-status/SKILL.md.tmpl +196 -0
- package/bundle/toolchain/skills/portal-update/SKILL.md +60 -46
- package/bundle/toolchain/skills/portal-update/SKILL.md.tmpl +269 -0
- package/bundle/toolchain/skills/portal-upgrade/SKILL.md +55 -33
- package/bundle/toolchain/skills/portal-upgrade/SKILL.md.tmpl +164 -0
- package/bundle/toolchain/skills/portal-verify/SKILL.md +69 -14
- package/bundle/toolchain/skills/portal-verify/SKILL.md.tmpl +224 -0
- package/bundle/toolchain/skills/shared/preamble.md +30 -126
- package/bundle/toolchain/skills/shared/runtime-principles.md +25 -0
- package/bundle/toolchain/templates/sales-followup/sales-followup-client.tsx +1 -1
- package/dist/index.js +79 -14
- package/package.json +5 -2
|
@@ -1,46 +1,50 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: portal-onboard
|
|
3
3
|
description: |
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
Canonical first-run wizard for Showpane. Use this for the first portal, for
|
|
5
|
+
guided onboarding, or any "walk me through it" request. It owns the end-to-end
|
|
6
|
+
first-run story: local setup, draft creation, preview, access setup, and the
|
|
7
|
+
hosted publish handoff. (showpane)
|
|
7
8
|
allowed-tools: [Bash, Read, Write, Edit, Glob, Grep]
|
|
8
9
|
---
|
|
9
10
|
|
|
10
11
|
## Preamble (run first)
|
|
11
12
|
|
|
12
|
-
Before doing anything else, execute this block in a Bash tool call
|
|
13
|
+
Before doing anything else, execute this block in a Bash tool call.
|
|
14
|
+
|
|
15
|
+
This preamble is intentionally tolerant of first-run state. It must not fail just because `~/.showpane/config.json` does not exist yet.
|
|
13
16
|
|
|
14
17
|
```bash
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
18
|
+
SHOWPANE_HOME="$HOME/.showpane"
|
|
19
|
+
SHOWPANE_BIN="$SHOWPANE_HOME/bin"
|
|
20
|
+
CONFIG="$SHOWPANE_HOME/config.json"
|
|
21
|
+
APP_PATH=""
|
|
22
|
+
DEPLOY_MODE="local"
|
|
23
|
+
ORG_SLUG=""
|
|
24
|
+
CONFIG_PRESENT=false
|
|
25
|
+
|
|
26
|
+
if [ -f "$CONFIG" ]; then
|
|
27
|
+
CONFIG_PRESENT=true
|
|
28
|
+
APP_PATH=$(python3 -c "import json; d=json.load(open('$CONFIG')); print(d.get('app_path',''))" 2>/dev/null || true)
|
|
29
|
+
DEPLOY_MODE=$(python3 -c "import json; d=json.load(open('$CONFIG')); print(d.get('deploy_mode','local'))" 2>/dev/null || echo "local")
|
|
30
|
+
ORG_SLUG=$(python3 -c "import json; d=json.load(open('$CONFIG')); print(d.get('orgSlug','') or d.get('org_slug',''))" 2>/dev/null || true)
|
|
19
31
|
fi
|
|
20
|
-
|
|
21
|
-
DEPLOY_MODE=$(cat "$CONFIG" | python3 -c "import sys,json; print(json.loads(sys.stdin.read()).get('deploy_mode','local'))" 2>/dev/null)
|
|
22
|
-
ORG_SLUG=$(cat "$CONFIG" | python3 -c "import sys,json; d=json.loads(sys.stdin.read()); print(d.get('orgSlug','') or d.get('org_slug',''))" 2>/dev/null)
|
|
32
|
+
|
|
23
33
|
APP_PATH="${SHOWPANE_APP_PATH:-$APP_PATH}"
|
|
24
|
-
|
|
25
|
-
DATABASE_URL="${DATABASE_URL:-}"
|
|
26
|
-
if [ ! -d "$APP_PATH/node_modules/.prisma" ]; then
|
|
27
|
-
echo "App dependencies not installed. Run: cd $APP_PATH && npm install"
|
|
28
|
-
exit 1
|
|
29
|
-
fi
|
|
30
|
-
SKILL_DIR="${SHOWPANE_TOOLCHAIN_DIR:-$HOME/.showpane/current}"
|
|
34
|
+
SKILL_DIR="${SHOWPANE_TOOLCHAIN_DIR:-$SHOWPANE_HOME/current}"
|
|
31
35
|
SKILL_VERSION=$(cat "$SKILL_DIR/VERSION" 2>/dev/null || echo "unknown")
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
[ -
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
LEARN_FILE="$
|
|
36
|
+
CHECKPOINT="$SHOWPANE_HOME/checkpoints/portal-onboard.json"
|
|
37
|
+
_UPD=$("$SHOWPANE_BIN/showpane-update-check" 2>/dev/null || true)
|
|
38
|
+
[ -n "$_UPD" ] && echo "$_UPD" || true
|
|
39
|
+
mkdir -p "$SHOWPANE_HOME/sessions" "$SHOWPANE_HOME/analytics" "$SHOWPANE_HOME/checkpoints"
|
|
40
|
+
touch "$SHOWPANE_HOME/sessions/$PPID"
|
|
41
|
+
find "$SHOWPANE_HOME/sessions" -mmin +120 -type f -delete 2>/dev/null || true
|
|
42
|
+
TEL=$("$SHOWPANE_BIN/showpane-config" get telemetry 2>/dev/null || echo "anonymous")
|
|
43
|
+
TEL_PROMPTED=$([ -f "$SHOWPANE_HOME/.telemetry-prompted" ] && echo "yes" || echo "no")
|
|
44
|
+
_TEL_START=$(date +%s)
|
|
45
|
+
_SESSION_ID="${PPID:-0}-$(date +%s)"
|
|
46
|
+
|
|
47
|
+
LEARN_FILE="$SHOWPANE_HOME/learnings.jsonl"
|
|
44
48
|
if [ -f "$LEARN_FILE" ]; then
|
|
45
49
|
_LEARN_COUNT=$(wc -l < "$LEARN_FILE" 2>/dev/null | tr -d ' ')
|
|
46
50
|
echo "LEARNINGS: $_LEARN_COUNT entries"
|
|
@@ -49,229 +53,394 @@ if [ -f "$LEARN_FILE" ]; then
|
|
|
49
53
|
tail -5 "$LEARN_FILE" 2>/dev/null
|
|
50
54
|
fi
|
|
51
55
|
fi
|
|
56
|
+
if [ -f "$SHOWPANE_HOME/timeline.jsonl" ]; then
|
|
57
|
+
_RECENT=$(grep '"event":"completed"' "$SHOWPANE_HOME/timeline.jsonl" 2>/dev/null | tail -3 | grep -o '"skill":"[^"]*"' | sed 's/"skill":"//;s/"//' | tr '
|
|
58
|
+
' ',' | sed 's/,$//' || true)
|
|
59
|
+
[ -n "$_RECENT" ] && echo "RECENT_SKILLS: $_RECENT"
|
|
60
|
+
fi
|
|
61
|
+
|
|
62
|
+
if [ -n "$APP_PATH" ] && [ -f "$APP_PATH/.env" ]; then
|
|
63
|
+
set -a && source "$APP_PATH/.env" && set +a
|
|
64
|
+
fi
|
|
52
65
|
|
|
53
|
-
|
|
54
|
-
SHOWPANE_TIMELINE="$HOME/.showpane/timeline.jsonl"
|
|
66
|
+
SHOWPANE_TIMELINE="$SHOWPANE_HOME/timeline.jsonl"
|
|
55
67
|
mkdir -p "$(dirname "$SHOWPANE_TIMELINE")"
|
|
56
68
|
echo '{"skill":"portal-onboard","event":"started","ts":"'$(date -u +%Y-%m-%dT%H:%M:%SZ)'"}' >> "$SHOWPANE_TIMELINE" 2>/dev/null
|
|
69
|
+
echo "SHOWPANE: v$SKILL_VERSION | MODE: $DEPLOY_MODE"
|
|
70
|
+
echo "CONFIG_PRESENT: $CONFIG_PRESENT"
|
|
71
|
+
echo "APP_PATH: ${APP_PATH:-missing}"
|
|
72
|
+
echo "ORG_SLUG: ${ORG_SLUG:-missing}"
|
|
73
|
+
echo "TELEMETRY: $TEL"
|
|
74
|
+
echo "TEL_PROMPTED: $TEL_PROMPTED"
|
|
75
|
+
if [ -f "$CHECKPOINT" ]; then
|
|
76
|
+
echo "CHECKPOINT_PRESENT: true"
|
|
77
|
+
echo "CHECKPOINT_DATA:"
|
|
78
|
+
cat "$CHECKPOINT"
|
|
79
|
+
else
|
|
80
|
+
echo "CHECKPOINT_PRESENT: false"
|
|
81
|
+
fi
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
If output shows `JUST_UPGRADED <from> <to>`, tell the user Showpane was just upgraded and continue.
|
|
85
|
+
|
|
86
|
+
If output shows `UPGRADE_AVAILABLE <old> <new>`, tell the user a newer Showpane toolchain is available and recommend `/portal-upgrade`.
|
|
87
|
+
|
|
88
|
+
If `TEL_PROMPTED` is `no`, default telemetry to `anonymous` without interrupting the flow. Do not mention telemetry unless the user asks.
|
|
89
|
+
|
|
90
|
+
Run:
|
|
91
|
+
```bash
|
|
92
|
+
"$SHOWPANE_BIN/showpane-config" set telemetry anonymous
|
|
93
|
+
touch "$SHOWPANE_HOME/.telemetry-prompted"
|
|
57
94
|
```
|
|
58
95
|
|
|
59
|
-
If RECENT_SKILLS is shown, suggest the likely next skill:
|
|
96
|
+
If `RECENT_SKILLS` is shown, suggest the likely next skill:
|
|
60
97
|
- After portal-create → suggest /portal-preview
|
|
61
|
-
- After portal-preview → suggest /portal-deploy
|
|
98
|
+
- After portal-preview → suggest /portal-deploy
|
|
62
99
|
- After portal-deploy → suggest /portal-status or /portal-verify
|
|
63
|
-
- After portal-setup → suggest /portal-create
|
|
64
|
-
- After portal-credentials → suggest /portal-
|
|
65
|
-
- After portal-update → suggest /portal-deploy
|
|
100
|
+
- After portal-setup → suggest /portal-onboard for a first run, or /portal-create for the fast path
|
|
101
|
+
- After portal-credentials → suggest /portal-deploy before external sharing
|
|
102
|
+
- After portal-update → suggest /portal-preview or /portal-deploy
|
|
103
|
+
|
|
104
|
+
If `RECENT_LEARNINGS` is shown, review them before proceeding. Apply them where relevant but do not mention them unless they materially affect the current task.
|
|
66
105
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
106
|
+
Read `skills/shared/runtime-principles.md` once near the start of the skill and apply the relevant product defaults.
|
|
107
|
+
|
|
108
|
+
If `skills/shared/platform-constraints.md` exists, read it once near the start of the skill and apply only the relevant limits.
|
|
70
109
|
|
|
71
110
|
## Overview
|
|
72
111
|
|
|
73
|
-
|
|
112
|
+
`/portal-onboard` is the canonical first-run workflow. It should feel like one
|
|
113
|
+
coherent wizard, not like the user is manually hopping between separate skills.
|
|
114
|
+
|
|
115
|
+
The recommended shape is:
|
|
74
116
|
|
|
75
|
-
|
|
117
|
+
1. orient the user
|
|
118
|
+
2. verify local setup
|
|
119
|
+
3. choose the best source for the first draft
|
|
120
|
+
4. create the portal draft
|
|
121
|
+
5. make one or two practical refinements
|
|
122
|
+
6. preview locally
|
|
123
|
+
7. choose how the client will access it
|
|
124
|
+
8. publish to Showpane Cloud
|
|
125
|
+
9. show a compact final summary
|
|
76
126
|
|
|
77
|
-
|
|
127
|
+
Keep the tone direct and calm. Use short phase transitions. Re-ground the user at
|
|
128
|
+
each phase so they always know what is happening next.
|
|
78
129
|
|
|
79
|
-
##
|
|
130
|
+
## Interaction Style
|
|
80
131
|
|
|
81
|
-
|
|
132
|
+
For decisions that materially change the flow, use recommendation-first language.
|
|
133
|
+
The pattern should look like this:
|
|
82
134
|
|
|
83
|
-
|
|
135
|
+
1. one sentence re-grounding the current phase
|
|
136
|
+
2. one sentence on the recommended choice and why
|
|
137
|
+
3. a short list of concrete options
|
|
138
|
+
|
|
139
|
+
Example:
|
|
140
|
+
|
|
141
|
+
`We have local setup ready. Next we need the best source for your first draft.`
|
|
142
|
+
|
|
143
|
+
`Recommended: use a real transcript if you have one — it gives the strongest first portal on the first pass.`
|
|
144
|
+
|
|
145
|
+
`Options: recent Granola meeting, pasted transcript, short description, or start from template.`
|
|
146
|
+
|
|
147
|
+
Do not ask more than one meaningful question at a time unless the answers are tightly coupled.
|
|
148
|
+
|
|
149
|
+
## Wizard Phases
|
|
150
|
+
|
|
151
|
+
### Phase 0: Resume or restart
|
|
152
|
+
|
|
153
|
+
If a checkpoint exists:
|
|
154
|
+
|
|
155
|
+
- show the saved phase and portal slug if present
|
|
156
|
+
- recommend resume
|
|
157
|
+
- if the user restarts, delete the checkpoint and begin from Phase 1
|
|
158
|
+
|
|
159
|
+
### Phase 1: Orientation
|
|
160
|
+
|
|
161
|
+
Start with a compact welcome:
|
|
84
162
|
|
|
85
163
|
```
|
|
86
164
|
╔══════════════════════════════════════════╗
|
|
87
|
-
║ SHOWPANE —
|
|
165
|
+
║ SHOWPANE — First Portal Wizard ║
|
|
88
166
|
╚══════════════════════════════════════════╝
|
|
89
167
|
```
|
|
90
168
|
|
|
91
|
-
Then
|
|
169
|
+
Then use one short, friendly paragraph. Keep it concise and informal.
|
|
170
|
+
|
|
171
|
+
Suggested shape:
|
|
172
|
+
|
|
173
|
+
- "Let's get your first portal started."
|
|
174
|
+
- "Who's it for, and what's the context? If you've got a call transcript, paste it in and I'll use that too."
|
|
175
|
+
|
|
176
|
+
Keep the opening focused on the user's first portal. This skill is the first-run default, so the top of the flow should feel fast, calm, and immediately useful.
|
|
177
|
+
|
|
178
|
+
Immediately save checkpoint:
|
|
179
|
+
|
|
180
|
+
```bash
|
|
181
|
+
mkdir -p "$HOME/.showpane/checkpoints"
|
|
182
|
+
printf '%s\n' '{"phase":"orientation","startedAt":"'$(date -u +%Y-%m-%dT%H:%M:%SZ)'"}' > "$HOME/.showpane/checkpoints/portal-onboard.json"
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
### Phase 2: Local readiness
|
|
186
|
+
|
|
187
|
+
If `CONFIG_PRESENT: false`, run the `portal-setup` flow inline.
|
|
92
188
|
|
|
93
|
-
|
|
189
|
+
If config exists, verify only the minimum first-run requirements before continuing:
|
|
94
190
|
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
191
|
+
- app path exists
|
|
192
|
+
- dependencies exist or can be installed
|
|
193
|
+
- local SQLite schema is ready
|
|
194
|
+
- org exists or can be created
|
|
99
195
|
|
|
100
|
-
|
|
196
|
+
Keep this phase minimal.
|
|
101
197
|
|
|
102
|
-
|
|
198
|
+
If the local checks pass, move straight into the user's portal work without extra system narration.
|
|
103
199
|
|
|
104
|
-
|
|
200
|
+
If there is already exactly one local organization and it clearly matches the
|
|
201
|
+
workspace the user just created, treat the org basics as already captured.
|
|
202
|
+
Do not create a separate "company context" phase just to re-ask the same setup
|
|
203
|
+
details.
|
|
105
204
|
|
|
106
|
-
|
|
205
|
+
Only ask for a missing field, and ask exactly one thing at a time.
|
|
107
206
|
|
|
108
|
-
|
|
109
|
-
- Detect the app path (or ask the user)
|
|
110
|
-
- Verify the database connection
|
|
111
|
-
- Create or select an organization
|
|
112
|
-
- Write the config to `~/.showpane/config.json`
|
|
113
|
-
- Set file permissions
|
|
207
|
+
Recommended order for missing fields:
|
|
114
208
|
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
- If the user doesn't have a website, skip — the initial-based fallback works fine
|
|
209
|
+
1. organization name, if it is not already obvious from the workspace setup
|
|
210
|
+
2. contact email
|
|
211
|
+
3. website/domain
|
|
119
212
|
|
|
120
|
-
|
|
213
|
+
Do not batch these into a numbered questionnaire unless the user explicitly asks
|
|
214
|
+
for the full checklist.
|
|
121
215
|
|
|
122
|
-
|
|
216
|
+
Optional extras like brand color, phone number, or contact title belong in
|
|
217
|
+
`/portal-setup` later if needed.
|
|
123
218
|
|
|
124
|
-
If setup fails
|
|
219
|
+
If setup fails, stop with a concrete recovery step and keep the checkpoint.
|
|
125
220
|
|
|
126
|
-
|
|
221
|
+
Save checkpoint with phase `local-ready`.
|
|
127
222
|
|
|
128
|
-
|
|
223
|
+
### Phase 3: Choose the first-portal source
|
|
129
224
|
|
|
130
|
-
|
|
225
|
+
Start with one short source question, not a menu.
|
|
131
226
|
|
|
132
|
-
|
|
227
|
+
Recommended opening:
|
|
133
228
|
|
|
134
|
-
If
|
|
135
|
-
- Show: "I found your Granola meetings. Want to use a recent call as the source for your first portal?"
|
|
136
|
-
- List recent meetings with date + title
|
|
137
|
-
- If selected, use the transcript to pre-populate portal content
|
|
229
|
+
- "Who's it for, and what's the context? If you've got a call transcript, paste it in and I'll use that too."
|
|
138
230
|
|
|
139
|
-
|
|
140
|
-
- Skip silently. Do not mention Granola or show an error.
|
|
231
|
+
Only branch after the user answers:
|
|
141
232
|
|
|
142
|
-
|
|
233
|
+
- if they have a real transcript, ask whether to use Granola or paste it
|
|
234
|
+
- if they do not, ask whether they want to start from notes or a template
|
|
143
235
|
|
|
144
|
-
|
|
236
|
+
Only show the full menu if the user is unsure:
|
|
145
237
|
|
|
146
|
-
|
|
238
|
+
1. recent Granola meeting
|
|
239
|
+
2. pasted transcript
|
|
240
|
+
3. short description of the client + meeting outcome
|
|
241
|
+
4. template-only start
|
|
147
242
|
|
|
148
|
-
|
|
149
|
-
- If the user has Granola MCP connected, offer to pull a recent meeting as the source material. If not, prompt for a brief description of the client and what the portal should contain.
|
|
150
|
-
- Use the sales-followup template as the default suggestion for first-time users: "We'll use the sales follow-up template as a starting point. You can customize everything after."
|
|
243
|
+
If Granola MCP is unavailable, skip it silently and move on.
|
|
151
244
|
|
|
152
|
-
|
|
245
|
+
If the user only has a rough brief, recommend `sales-followup` as the default
|
|
246
|
+
template for the first portal unless the engagement is clearly onboarding or consulting.
|
|
153
247
|
|
|
154
|
-
|
|
248
|
+
Save checkpoint with:
|
|
155
249
|
|
|
156
|
-
|
|
250
|
+
- `phase: "source-selected"`
|
|
251
|
+
- `sourceType`
|
|
252
|
+
- `template`
|
|
157
253
|
|
|
158
|
-
###
|
|
254
|
+
### Phase 4: Create the first draft
|
|
159
255
|
|
|
160
|
-
|
|
256
|
+
Run the `portal-create` flow inline, but frame it as part of the wizard, not as
|
|
257
|
+
a separate command.
|
|
161
258
|
|
|
162
|
-
During
|
|
259
|
+
During this phase:
|
|
163
260
|
|
|
164
|
-
|
|
261
|
+
- suggest a slug if needed
|
|
262
|
+
- prefer a real company/client name in the portal
|
|
263
|
+
- prefer useful structure over completeness
|
|
264
|
+
- aim for a credible first draft, not a perfect final artifact
|
|
165
265
|
|
|
166
|
-
|
|
266
|
+
If the slug is taken, treat that as a soft retry, not a failure.
|
|
167
267
|
|
|
168
|
-
|
|
169
|
-
Password: <password>
|
|
268
|
+
Save checkpoint with:
|
|
170
269
|
|
|
171
|
-
|
|
270
|
+
- `phase: "draft-created"`
|
|
271
|
+
- `portalSlug`
|
|
272
|
+
- `companyName`
|
|
172
273
|
|
|
173
|
-
|
|
274
|
+
### Phase 5: Practical refinements
|
|
174
275
|
|
|
175
|
-
|
|
276
|
+
Do not ask the user to invent a whole redesign. Ask for one or two high-signal refinements only.
|
|
176
277
|
|
|
177
|
-
|
|
278
|
+
Recommended refinement prompts:
|
|
178
279
|
|
|
179
|
-
|
|
280
|
+
- `Do you want the portal to feel more concise, more sales-focused, or more delivery-focused?`
|
|
281
|
+
- `Should we add anything practical before preview — timeline, documents, or sharper next steps?`
|
|
180
282
|
|
|
181
|
-
|
|
283
|
+
Apply the requested refinement inline, using the same patterns as `/portal-update`
|
|
284
|
+
without forcing the user to switch skills.
|
|
182
285
|
|
|
183
|
-
|
|
286
|
+
If the user is happy with the first draft, move on immediately.
|
|
184
287
|
|
|
185
|
-
|
|
288
|
+
Save checkpoint with phase `draft-refined`.
|
|
186
289
|
|
|
187
|
-
|
|
290
|
+
### Phase 6: Local preview
|
|
188
291
|
|
|
189
|
-
|
|
292
|
+
Run the `portal-preview` flow inline.
|
|
190
293
|
|
|
191
|
-
|
|
294
|
+
If no dev server is running, start it using the `portal-dev` instructions first.
|
|
295
|
+
|
|
296
|
+
Tell the user exactly what to inspect:
|
|
297
|
+
|
|
298
|
+
- does the overall story feel right?
|
|
299
|
+
- are next steps clear?
|
|
300
|
+
- are obvious documents or dates missing?
|
|
301
|
+
|
|
302
|
+
If the user requests a small content fix after preview, make it and preview again.
|
|
303
|
+
Keep this loop tight. Do not let it become an open-ended editing session.
|
|
304
|
+
|
|
305
|
+
Save checkpoint with phase `previewed`.
|
|
306
|
+
|
|
307
|
+
### Phase 7: Access setup
|
|
308
|
+
|
|
309
|
+
Ask how the client should access the hosted portal after publish.
|
|
310
|
+
|
|
311
|
+
Recommended first-run choice:
|
|
312
|
+
|
|
313
|
+
- publish first, then choose the hosted access method
|
|
314
|
+
- keep credentials available as the default fallback
|
|
315
|
+
|
|
316
|
+
Important rule: share links still require portal credentials to exist, because
|
|
317
|
+
share links are tied to credential versioning.
|
|
318
|
+
|
|
319
|
+
So the flow is:
|
|
320
|
+
|
|
321
|
+
1. run `portal-credentials` inline
|
|
322
|
+
2. show the credentials once
|
|
323
|
+
3. explain that external sharing starts with `portal-deploy`
|
|
324
|
+
4. if the user wants a direct hosted access link after publish, plan to run `portal-share`
|
|
325
|
+
|
|
326
|
+
Never write the password into the checkpoint or learnings.
|
|
327
|
+
|
|
328
|
+
Save checkpoint with phase `access-ready` and `accessMode`.
|
|
329
|
+
|
|
330
|
+
### Phase 8: Publish to Showpane Cloud
|
|
331
|
+
|
|
332
|
+
Run the `portal-deploy` flow inline.
|
|
333
|
+
|
|
334
|
+
This phase is part of onboarding by default. Do not treat publish as an optional
|
|
335
|
+
afterthought unless the user explicitly says they want to stop at local preview.
|
|
336
|
+
|
|
337
|
+
If cloud auth is missing:
|
|
338
|
+
|
|
339
|
+
- tell the user to run `showpane login`
|
|
340
|
+
- after login completes, resume from the checkpoint
|
|
341
|
+
|
|
342
|
+
If deploy returns `organization_required`:
|
|
343
|
+
|
|
344
|
+
- explain that the user needs to start billing/workspace creation in Showpane Cloud
|
|
345
|
+
- send them to checkout
|
|
346
|
+
- resume after checkout
|
|
347
|
+
|
|
348
|
+
If deploy returns `organization_not_ready`:
|
|
349
|
+
|
|
350
|
+
- surface the readiness detail directly
|
|
351
|
+
- distinguish between:
|
|
352
|
+
- billing inactive
|
|
353
|
+
- provisioning still running
|
|
354
|
+
- provisioning unhealthy/failed
|
|
355
|
+
- workspace incomplete
|
|
356
|
+
- send the user to the relevant settings or checkout action
|
|
357
|
+
- keep the checkpoint so they can resume publish instead of restarting the wizard
|
|
358
|
+
|
|
359
|
+
If publish succeeds and the user wants a hosted direct-access link, run `portal-share` inline next.
|
|
360
|
+
|
|
361
|
+
Save checkpoint with phase `published` once the hosted URL is live or clearly accepted for publish.
|
|
362
|
+
|
|
363
|
+
### Phase 9: Final summary
|
|
364
|
+
|
|
365
|
+
Show a compact final reference card:
|
|
192
366
|
|
|
193
367
|
```
|
|
194
368
|
════════════════════════════════════════
|
|
195
|
-
|
|
196
|
-
|
|
369
|
+
First portal complete
|
|
370
|
+
|
|
197
371
|
Portal: <slug> (<company>)
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
372
|
+
Local: http://localhost:3000/client/<slug>
|
|
373
|
+
Cloud: <hosted-url-or-publishing-status>
|
|
374
|
+
Access: <hosted login / hosted share link / both>
|
|
375
|
+
|
|
376
|
+
Next: /portal-update <slug>
|
|
377
|
+
Help: /portal-list, /portal-status
|
|
203
378
|
════════════════════════════════════════
|
|
204
379
|
```
|
|
205
380
|
|
|
206
|
-
|
|
381
|
+
Rules:
|
|
207
382
|
|
|
208
|
-
|
|
383
|
+
- never include the password in the final summary
|
|
384
|
+
- include the hosted share URL only if it exists and the user explicitly asked for it after publish
|
|
385
|
+
- if publish is still finalizing, say so plainly instead of pretending it is live
|
|
209
386
|
|
|
210
|
-
|
|
387
|
+
After the final summary, delete the checkpoint:
|
|
211
388
|
|
|
212
|
-
|
|
213
|
-
-
|
|
214
|
-
|
|
215
|
-
- `/portal analytics <slug>` -- track client engagement
|
|
216
|
-
- `/portal status` -- see a dashboard of all your portals"
|
|
389
|
+
```bash
|
|
390
|
+
rm -f "$HOME/.showpane/checkpoints/portal-onboard.json"
|
|
391
|
+
```
|
|
217
392
|
|
|
218
393
|
## Flow Control
|
|
219
394
|
|
|
220
|
-
This
|
|
221
|
-
|
|
222
|
-
```
|
|
223
|
-
setup -> create -> credentials -> preview -> summary
|
|
224
|
-
```
|
|
395
|
+
This wizard is sequential, but it is state-aware.
|
|
225
396
|
|
|
226
397
|
Rules:
|
|
227
|
-
- **Never skip a step.** Even if the user says "I already have credentials", verify by checking the database. If credentials exist, acknowledge and move on. But do not skip the check.
|
|
228
|
-
- **Stop on hard failures.** If setup cannot connect to the database, or create fails due to a missing dependency, stop and explain. Do not try to continue with a broken foundation.
|
|
229
|
-
- **Retry on soft failures.** If the user picks a slug that is taken, help them pick another. If the dev server takes a moment to start, wait. These are not reasons to abort.
|
|
230
|
-
- **Respect existing state.** If the user already has a configured Showpane, an existing portal, and credentials, acknowledge each one and skip to the next incomplete step. The onboard flow should work for both brand-new and partially-set-up installations.
|
|
231
398
|
|
|
232
|
-
|
|
399
|
+
- verify existing state before redoing work
|
|
400
|
+
- allow resume from any saved phase
|
|
401
|
+
- retry soft failures like slug conflicts or slow dev-server startup
|
|
402
|
+
- stop on hard failures like missing app path, broken schema setup, or cloud deploy errors that require user action
|
|
403
|
+
- keep the user in one coherent workflow instead of telling them to manually switch commands unless recovery requires it
|
|
233
404
|
|
|
234
|
-
|
|
405
|
+
## Existing State Checks
|
|
235
406
|
|
|
236
|
-
|
|
237
|
-
2. **Create**: Check if the org has at least one portal (via `list-portals.ts`). If yes, ask: "You already have portals. Want to create another, or skip to credentials?"
|
|
238
|
-
3. **Credentials**: Check if the selected portal has credentials (from list response `hasCredentials` field). If yes, skip credentials.
|
|
239
|
-
4. **Preview**: Always run. Opening the browser is always useful.
|
|
240
|
-
|
|
241
|
-
## Conventions
|
|
407
|
+
Check these before deciding to skip or rerun a phase:
|
|
242
408
|
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
409
|
+
1. setup/config present
|
|
410
|
+
2. local org exists
|
|
411
|
+
3. portal already exists for the selected slug
|
|
412
|
+
4. credentials already exist
|
|
413
|
+
5. local dev server is running
|
|
414
|
+
6. cloud access token exists
|
|
248
415
|
|
|
249
|
-
|
|
416
|
+
If a portal already exists and clearly looks like the same first-run draft, ask whether
|
|
417
|
+
to continue refining it or create a new portal. Recommend continuing unless the user says otherwise.
|
|
250
418
|
|
|
251
|
-
|
|
252
|
-
- If any bin/ script returns a non-zero exit, read the error from stderr, display it, and suggest a fix.
|
|
253
|
-
- If the user wants to bail out mid-flow, respect it: "No problem. You can pick up where you left off by running the individual skills: /portal setup, /portal create, /portal credentials, /portal preview."
|
|
419
|
+
## Conventions
|
|
254
420
|
|
|
255
|
-
|
|
421
|
+
- The wizard owns the first-run story. Do not redirect first-time users to freeform prompting unless they explicitly want it.
|
|
422
|
+
- Keep transitions to one sentence whenever possible.
|
|
423
|
+
- Prefer `recommended` over `optional` language when there is a clear best path.
|
|
424
|
+
- Use the cloud dashboard as a supporting surface for billing/provisioning, not as the main first-portal creation surface.
|
|
425
|
+
- If you mention manual prompting at all, position it as the faster repeat-user path.
|
|
256
426
|
|
|
257
|
-
|
|
427
|
+
## Error Handling
|
|
258
428
|
|
|
259
|
-
|
|
429
|
+
- Missing config is not a preamble failure here. It simply means setup starts from scratch.
|
|
430
|
+
- If a step fails after useful progress, keep the checkpoint and tell the user exactly how to resume.
|
|
431
|
+
- If the user wants to stop early, summarize the current state and point them to the next concrete skill:
|
|
432
|
+
- `/portal-preview`
|
|
433
|
+
- `/portal-credentials`
|
|
434
|
+
- `/portal-share`
|
|
435
|
+
- `/portal-deploy`
|
|
260
436
|
|
|
261
437
|
## Completion
|
|
262
438
|
|
|
263
|
-
As a final step, log skill completion:
|
|
439
|
+
As a final step, log skill completion and telemetry:
|
|
264
440
|
|
|
265
441
|
```bash
|
|
266
442
|
echo '{"skill":"portal-onboard","event":"completed","ts":"'$(date -u +%Y-%m-%dT%H:%M:%SZ)'"}' >> "$HOME/.showpane/timeline.jsonl" 2>/dev/null
|
|
443
|
+
_TEL_END=$(date +%s)
|
|
444
|
+
_TEL_DUR=$(( _TEL_END - ${_TEL_START:-_TEL_END} ))
|
|
445
|
+
"$HOME/.showpane/bin/showpane-telemetry-log" --skill "portal-onboard" --duration "$_TEL_DUR" --outcome success --session-id "${_SESSION_ID:-}" 2>/dev/null || true
|
|
267
446
|
```
|
|
268
|
-
|
|
269
|
-
## Related Skills
|
|
270
|
-
|
|
271
|
-
This skill chains the following skills inline (read their SKILL.md files for detailed instructions):
|
|
272
|
-
- `/portal setup` -- Step 2
|
|
273
|
-
- `/portal create` -- Step 3
|
|
274
|
-
- `/portal credentials` -- Step 4
|
|
275
|
-
- `/portal preview` -- Step 5
|
|
276
|
-
- `/portal dev` -- called within Step 5 if needed
|
|
277
|
-
- `/portal deploy` -- suggested as next step in the summary
|