Commit 8072283
feat(gtm): Spec 4 — cockpit activation recipes (try-this-prompt suggestions) (#388)
* docs(gtm): spec for cockpit-activation-recipes (Spec 4)
Pre-baked "Try this prompt" suggestions on the four capability examples
that map to activation signals (streaming, persistence, interrupts,
generative-ui), plus a ChatComponent enhancement so firstMessageSent
flips on the first stream-start regardless of submit path (input,
suggestion-click, programmatic). A developer landing in the cockpit
gets a 1-click path to firing each activation signal.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
* docs(gtm): implementation plan for cockpit-activation-recipes (Spec 4)
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
* feat(chat): flip firstMessageSent on agent stream-start (any submit path)
ChatComponent now subscribes to agent.lifecycle.streamStartedAt and
flips CHAT_LIFECYCLE.firstMessageSent on its first transition to a
non-null value. This makes the lifecycle robust to programmatic
agent.submit() calls, including the <chat-welcome-suggestion> click
handler pattern in cockpit examples.
messageCount and inputSubmittedAt remain input-bound by design — they
measure typing engagement, not stream initiation.
Two new lifecycle tests cover the agent-driven flip + stickiness across
multiple stream-starts. The chat mock-agent gained a minimal lifecycle
stub (streamStartedAt only, with a writable _internal handle) so the
tests can drive the signal directly without a full adapter.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
* feat(cockpit-streaming): pre-baked welcome suggestions
Two <chat-welcome-suggestion> rows in the empty-state — "Stream a long
answer" and "Walk me through agent tool calls". Clicking either calls
agent.submit({ message: ... }) which fires AGENT_LIFECYCLE.streamStartedAt
on first chunk arrival → cockpit:transport_connected. ChatComponent's
new effect (Phase 0) then flips firstMessageSent → cockpit:chat_first_message.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
* feat(cockpit-persistence): pre-baked welcome suggestion
One <chat-welcome-suggestion> row — "Save this thread for later" —
that prompts a project-brief conversation. After the user reloads the
page, AGENT_LIFECYCLE.threadPersistedAt fires → cockpit:thread_persisted
activation signal.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
* feat(cockpit-interrupts): pre-baked welcome suggestion
One <chat-welcome-suggestion> row — "Approve a tool call" — that
prompts a flight-booking conversation. The graph pauses at an interrupt;
when the user approves via the ChatInterruptPanelComponent,
AGENT_LIFECYCLE.interruptResolvedAt fires → cockpit:interrupt_handled
activation signal.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
* feat(cockpit-generative-ui): pre-baked welcome suggestions
Two <chat-welcome-suggestion> rows — "Render a dashboard" and
"Render a form". Clicking either prompts the agent to emit a
generative-UI payload that RenderSpecComponent mounts, firing
RENDER_LIFECYCLE.firstMountAt → cockpit:generative_component_rendered
activation signal.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>1 parent 4ed6453 commit 8072283
9 files changed
Lines changed: 1092 additions & 13 deletions
File tree
- cockpit
- chat/generative-ui/angular/src/app
- langgraph
- interrupts/angular/src/app
- persistence/angular/src/app
- streaming/angular/src/app
- docs/superpowers
- plans/gtm
- specs/gtm
- libs/chat/src/lib
- compositions/chat
- testing
Lines changed: 23 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
24 | 29 | | |
25 | 30 | | |
26 | 31 | | |
27 | | - | |
| 32 | + | |
28 | 33 | | |
29 | 34 | | |
30 | | - | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
31 | 46 | | |
32 | 47 | | |
33 | 48 | | |
| |||
37 | 52 | | |
38 | 53 | | |
39 | 54 | | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
40 | 60 | | |
Lines changed: 22 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
10 | 14 | | |
11 | 15 | | |
12 | 16 | | |
| |||
22 | 26 | | |
23 | 27 | | |
24 | 28 | | |
25 | | - | |
| 29 | + | |
26 | 30 | | |
27 | 31 | | |
28 | 32 | | |
29 | | - | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
30 | 44 | | |
31 | 45 | | |
32 | 46 | | |
| |||
39 | 53 | | |
40 | 54 | | |
41 | 55 | | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
42 | 61 | | |
43 | 62 | | |
44 | 63 | | |
| |||
Lines changed: 23 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
1 | 2 | | |
2 | | - | |
| 3 | + | |
3 | 4 | | |
4 | 5 | | |
5 | 6 | | |
6 | 7 | | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
7 | 12 | | |
8 | 13 | | |
9 | 14 | | |
| |||
23 | 28 | | |
24 | 29 | | |
25 | 30 | | |
26 | | - | |
| 31 | + | |
27 | 32 | | |
28 | 33 | | |
29 | | - | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
30 | 45 | | |
31 | 46 | | |
32 | 47 | | |
| |||
72 | 87 | | |
73 | 88 | | |
74 | 89 | | |
| 90 | + | |
75 | 91 | | |
76 | 92 | | |
77 | 93 | | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
78 | 98 | | |
79 | 99 | | |
80 | 100 | | |
| |||
Lines changed: 23 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
8 | 13 | | |
9 | 14 | | |
10 | 15 | | |
| |||
15 | 20 | | |
16 | 21 | | |
17 | 22 | | |
18 | | - | |
| 23 | + | |
19 | 24 | | |
20 | 25 | | |
21 | | - | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
22 | 37 | | |
23 | 38 | | |
24 | 39 | | |
| |||
27 | 42 | | |
28 | 43 | | |
29 | 44 | | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
30 | 50 | | |
0 commit comments