@productbrain/cli 0.1.0-beta.35 → 0.1.0-beta.37
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/dist/__tests__/capture.test.js +22 -0
- package/dist/__tests__/capture.test.js.map +1 -1
- package/dist/__tests__/experiment.test.d.ts +6 -0
- package/dist/__tests__/experiment.test.d.ts.map +1 -0
- package/dist/__tests__/experiment.test.js +69 -0
- package/dist/__tests__/experiment.test.js.map +1 -0
- package/dist/__tests__/onboarding-path-b.test.d.ts +2 -0
- package/dist/__tests__/onboarding-path-b.test.d.ts.map +1 -0
- package/dist/__tests__/onboarding-path-b.test.js +46 -0
- package/dist/__tests__/onboarding-path-b.test.js.map +1 -0
- package/dist/__tests__/onboarding.test.d.ts +1 -1
- package/dist/__tests__/onboarding.test.js +304 -156
- package/dist/__tests__/onboarding.test.js.map +1 -1
- package/dist/__tests__/setup.test.js +22 -74
- package/dist/__tests__/setup.test.js.map +1 -1
- package/dist/commands/connect-integration.test.d.ts +7 -0
- package/dist/commands/connect-integration.test.d.ts.map +1 -0
- package/dist/commands/connect-integration.test.js +148 -0
- package/dist/commands/connect-integration.test.js.map +1 -0
- package/dist/commands/connect.d.ts +17 -0
- package/dist/commands/connect.d.ts.map +1 -0
- package/dist/commands/connect.js +280 -0
- package/dist/commands/connect.js.map +1 -0
- package/dist/commands/connect.test.d.ts +6 -0
- package/dist/commands/connect.test.d.ts.map +1 -0
- package/dist/commands/connect.test.js +230 -0
- package/dist/commands/connect.test.js.map +1 -0
- package/dist/commands/handshake.d.ts +2 -0
- package/dist/commands/handshake.d.ts.map +1 -1
- package/dist/commands/handshake.js +20 -5
- package/dist/commands/handshake.js.map +1 -1
- package/dist/commands/setup.d.ts.map +1 -1
- package/dist/commands/setup.js +57 -81
- package/dist/commands/setup.js.map +1 -1
- package/dist/generators/context-md.d.ts +1 -1
- package/dist/generators/context-md.d.ts.map +1 -1
- package/dist/generators/context-md.js +12 -1
- package/dist/generators/context-md.js.map +1 -1
- package/dist/index.js +13 -1
- package/dist/index.js.map +1 -1
- package/dist/lib/config.d.ts +1 -0
- package/dist/lib/config.d.ts.map +1 -1
- package/dist/lib/config.js +25 -1
- package/dist/lib/config.js.map +1 -1
- package/dist/lib/conversation-engine.d.ts +45 -0
- package/dist/lib/conversation-engine.d.ts.map +1 -0
- package/dist/lib/conversation-engine.js +112 -0
- package/dist/lib/conversation-engine.js.map +1 -0
- package/dist/lib/conversation-phases.d.ts +59 -0
- package/dist/lib/conversation-phases.d.ts.map +1 -0
- package/dist/lib/conversation-phases.js +11 -0
- package/dist/lib/conversation-phases.js.map +1 -0
- package/dist/lib/conversation-signals.d.ts +30 -0
- package/dist/lib/conversation-signals.d.ts.map +1 -0
- package/dist/lib/conversation-signals.js +64 -0
- package/dist/lib/conversation-signals.js.map +1 -0
- package/dist/lib/experiment.d.ts +18 -0
- package/dist/lib/experiment.d.ts.map +1 -0
- package/dist/lib/experiment.js +28 -0
- package/dist/lib/experiment.js.map +1 -0
- package/dist/lib/onboarding-path-b.d.ts +10 -0
- package/dist/lib/onboarding-path-b.d.ts.map +1 -0
- package/dist/lib/onboarding-path-b.js +214 -0
- package/dist/lib/onboarding-path-b.js.map +1 -0
- package/dist/lib/onboarding-phases.d.ts +9 -0
- package/dist/lib/onboarding-phases.d.ts.map +1 -0
- package/dist/lib/onboarding-phases.js +120 -0
- package/dist/lib/onboarding-phases.js.map +1 -0
- package/dist/lib/onboarding-shared.d.ts +81 -0
- package/dist/lib/onboarding-shared.d.ts.map +1 -0
- package/dist/lib/onboarding-shared.js +190 -0
- package/dist/lib/onboarding-shared.js.map +1 -0
- package/dist/lib/onboarding-topics.d.ts +27 -0
- package/dist/lib/onboarding-topics.d.ts.map +1 -0
- package/dist/lib/onboarding-topics.js +57 -0
- package/dist/lib/onboarding-topics.js.map +1 -0
- package/dist/lib/onboarding.d.ts +3 -5
- package/dist/lib/onboarding.d.ts.map +1 -1
- package/dist/lib/onboarding.js +224 -247
- package/dist/lib/onboarding.js.map +1 -1
- package/dist/lib/profiles.d.ts +5 -0
- package/dist/lib/profiles.d.ts.map +1 -1
- package/dist/lib/profiles.js +7 -0
- package/dist/lib/profiles.js.map +1 -1
- package/dist/lib/telemetry.d.ts +5 -5
- package/dist/lib/telemetry.d.ts.map +1 -1
- package/dist/lib/telemetry.js +34 -16
- package/dist/lib/telemetry.js.map +1 -1
- package/dist/lib/wizard-surfaces.d.ts +47 -0
- package/dist/lib/wizard-surfaces.d.ts.map +1 -0
- package/dist/lib/wizard-surfaces.js +176 -0
- package/dist/lib/wizard-surfaces.js.map +1 -0
- package/dist/lib/wizard-surfaces.test.d.ts +2 -0
- package/dist/lib/wizard-surfaces.test.d.ts.map +1 -0
- package/dist/lib/wizard-surfaces.test.js +127 -0
- package/dist/lib/wizard-surfaces.test.js.map +1 -0
- package/dist/lib/wizard-trust.d.ts +31 -0
- package/dist/lib/wizard-trust.d.ts.map +1 -0
- package/dist/lib/wizard-trust.js +66 -0
- package/dist/lib/wizard-trust.js.map +1 -0
- package/dist/lib/wizard-trust.test.d.ts +2 -0
- package/dist/lib/wizard-trust.test.d.ts.map +1 -0
- package/dist/lib/wizard-trust.test.js +32 -0
- package/dist/lib/wizard-trust.test.js.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Onboarding conversation topics — coach pattern for first-time setup.
|
|
3
|
+
* WP-304: Each topic has goal/behaviour/criteria. LLM judges completion,
|
|
4
|
+
* heuristic signals are backup. Topics auto-skip when content is already covered.
|
|
5
|
+
*/
|
|
6
|
+
import type { ConversationSignals } from './conversation-phases.js';
|
|
7
|
+
/** A conversation topic with coaching directives and completion criteria. */
|
|
8
|
+
export interface OnboardingTopic {
|
|
9
|
+
/** Unique topic identifier. */
|
|
10
|
+
id: string;
|
|
11
|
+
/** What we're trying to learn from this topic. */
|
|
12
|
+
goal: string;
|
|
13
|
+
/** How the LLM should behave during this topic. */
|
|
14
|
+
behaviour: string;
|
|
15
|
+
/** When this topic is complete — the LLM judges this. */
|
|
16
|
+
criteria: string;
|
|
17
|
+
/** Max exchanges before forced advancement. Safety valve. */
|
|
18
|
+
maxExchanges: number;
|
|
19
|
+
/** If this signal is already true, skip this topic entirely. Null = always run. */
|
|
20
|
+
skipIfSignal: keyof ConversationSignals | null;
|
|
21
|
+
/** Heuristic backup: if this signal is true, topic is complete even if LLM disagrees. */
|
|
22
|
+
heuristicSignal: keyof ConversationSignals | null;
|
|
23
|
+
}
|
|
24
|
+
export declare const ONBOARDING_TOPICS: OnboardingTopic[];
|
|
25
|
+
/** Check if user wants to skip the conversation. */
|
|
26
|
+
export declare function userWantsToSkip(text: string): boolean;
|
|
27
|
+
//# sourceMappingURL=onboarding-topics.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"onboarding-topics.d.ts","sourceRoot":"","sources":["../../src/lib/onboarding-topics.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAEpE,6EAA6E;AAC7E,MAAM,WAAW,eAAe;IAC9B,+BAA+B;IAC/B,EAAE,EAAE,MAAM,CAAC;IAEX,kDAAkD;IAClD,IAAI,EAAE,MAAM,CAAC;IAEb,mDAAmD;IACnD,SAAS,EAAE,MAAM,CAAC;IAElB,yDAAyD;IACzD,QAAQ,EAAE,MAAM,CAAC;IAEjB,6DAA6D;IAC7D,YAAY,EAAE,MAAM,CAAC;IAErB,mFAAmF;IACnF,YAAY,EAAE,MAAM,mBAAmB,GAAG,IAAI,CAAC;IAE/C,yFAAyF;IACzF,eAAe,EAAE,MAAM,mBAAmB,GAAG,IAAI,CAAC;CACnD;AAED,eAAO,MAAM,iBAAiB,EAAE,eAAe,EA4C9C,CAAC;AAKF,oDAAoD;AACpD,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAErD"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Onboarding conversation topics — coach pattern for first-time setup.
|
|
3
|
+
* WP-304: Each topic has goal/behaviour/criteria. LLM judges completion,
|
|
4
|
+
* heuristic signals are backup. Topics auto-skip when content is already covered.
|
|
5
|
+
*/
|
|
6
|
+
export const ONBOARDING_TOPICS = [
|
|
7
|
+
{
|
|
8
|
+
id: 'why_here',
|
|
9
|
+
goal: 'Understand what brought this person to Product Brain. Follow wherever they go — product, problem, context, or all three.',
|
|
10
|
+
behaviour: `Open with: "Hey, what brings you to Product Brain?"
|
|
11
|
+
Then follow what's interesting. If they describe a product, get curious about it.
|
|
12
|
+
If they describe a problem, lean in. If they're vague, ask the one thing you'd most want to know.
|
|
13
|
+
Never ask more than one question. Never explain what Product Brain does — they know enough to be here.`,
|
|
14
|
+
criteria: `The user has said something genuine — anything beyond "I don't know" or "just checking it out."
|
|
15
|
+
A complete sentence about their work, their problem, or their situation meets criteria.
|
|
16
|
+
Criteria is NOT met if the user gave only a non-answer (one word, "not sure", "just exploring").`,
|
|
17
|
+
maxExchanges: 3,
|
|
18
|
+
skipIfSignal: null,
|
|
19
|
+
heuristicSignal: 'hasSubstantiveAnswer',
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
id: 'what_they_build',
|
|
23
|
+
goal: 'Understand concretely what this person is building — specific enough to explain to someone else in one sentence.',
|
|
24
|
+
behaviour: `Pick one concrete noun or verb from their last answer and go one level deeper.
|
|
25
|
+
Ask about who uses it, what it replaces, or how it works today — whichever fits what they said.
|
|
26
|
+
Never name the category back at them ("so an AI tool?").
|
|
27
|
+
Never ask them to "elaborate" or "tell me more."
|
|
28
|
+
One direct question only.`,
|
|
29
|
+
criteria: `The user has described what they're building with enough specificity that you could explain it in one sentence to someone who wasn't in this conversation.
|
|
30
|
+
Vague answers ("a tool", "an app", "something with AI") do NOT meet criteria.
|
|
31
|
+
A described function, a named user group, or a concrete workflow DOES.`,
|
|
32
|
+
maxExchanges: 2,
|
|
33
|
+
skipIfSignal: 'mentionedProduct',
|
|
34
|
+
heuristicSignal: 'mentionedProduct',
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
id: 'what_is_hard',
|
|
38
|
+
goal: "Understand what's actually hard or broken right now — the friction that brought them here.",
|
|
39
|
+
behaviour: `Pick one specific thing they mentioned building and ask what breaks, what slows them down, or what they're not happy with.
|
|
40
|
+
Be concrete and direct: "What breaks when X?" or "Where does the rework happen?"
|
|
41
|
+
Not: "What challenges do you face?" or "What's the hardest part?" (too generic).
|
|
42
|
+
One question only.`,
|
|
43
|
+
criteria: `The user has described a specific friction, pain, or failure mode in their own words.
|
|
44
|
+
"It's hard" or "there are problems" does NOT meet criteria.
|
|
45
|
+
A named workflow that breaks, a named cost, or a described workaround DOES.`,
|
|
46
|
+
maxExchanges: 2,
|
|
47
|
+
skipIfSignal: 'mentionedChallenge',
|
|
48
|
+
heuristicSignal: 'mentionedChallenge',
|
|
49
|
+
},
|
|
50
|
+
];
|
|
51
|
+
/** User wants to skip — detected by regex on user input. */
|
|
52
|
+
const SKIP_PATTERNS = [/\b(?:skip|done|that'?s it|wrap up|let'?s go|finish|end)\b/i];
|
|
53
|
+
/** Check if user wants to skip the conversation. */
|
|
54
|
+
export function userWantsToSkip(text) {
|
|
55
|
+
return SKIP_PATTERNS.some((p) => p.test(text));
|
|
56
|
+
}
|
|
57
|
+
//# sourceMappingURL=onboarding-topics.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"onboarding-topics.js","sourceRoot":"","sources":["../../src/lib/onboarding-topics.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AA4BH,MAAM,CAAC,MAAM,iBAAiB,GAAsB;IAClD;QACE,EAAE,EAAE,UAAU;QACd,IAAI,EAAE,0HAA0H;QAChI,SAAS,EAAE;;;uGAGwF;QACnG,QAAQ,EAAE;;iGAEmF;QAC7F,YAAY,EAAE,CAAC;QACf,YAAY,EAAE,IAAI;QAClB,eAAe,EAAE,sBAAsB;KACxC;IACD;QACE,EAAE,EAAE,iBAAiB;QACrB,IAAI,EAAE,kHAAkH;QACxH,SAAS,EAAE;;;;0BAIW;QACtB,QAAQ,EAAE;;uEAEyD;QACnE,YAAY,EAAE,CAAC;QACf,YAAY,EAAE,kBAAkB;QAChC,eAAe,EAAE,kBAAkB;KACpC;IACD;QACE,EAAE,EAAE,cAAc;QAClB,IAAI,EAAE,4FAA4F;QAClG,SAAS,EAAE;;;mBAGI;QACf,QAAQ,EAAE;;4EAE8D;QACxE,YAAY,EAAE,CAAC;QACf,YAAY,EAAE,oBAAoB;QAClC,eAAe,EAAE,oBAAoB;KACtC;CACF,CAAC;AAEF,4DAA4D;AAC5D,MAAM,aAAa,GAAG,CAAC,4DAA4D,CAAC,CAAC;AAErF,oDAAoD;AACpD,MAAM,UAAU,eAAe,CAAC,IAAY;IAC1C,OAAO,aAAa,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;AACjD,CAAC"}
|
package/dist/lib/onboarding.d.ts
CHANGED
|
@@ -1,19 +1,17 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Onboarding conversation —
|
|
3
|
-
* WP-304
|
|
4
|
-
* WP-304 Slice 1: Multi-turn conversation + extraction + auto-capture.
|
|
2
|
+
* Onboarding conversation — coach-pattern LLM conversation for new workspaces.
|
|
3
|
+
* WP-304: Topics with goal/behaviour/criteria. LLM judges completion, heuristic backup.
|
|
5
4
|
*
|
|
6
5
|
* Uses @clack/prompts (WP-303 S1) and the MCP gateway to call the
|
|
7
6
|
* Convex onboardingChat action for conversation and extraction,
|
|
8
7
|
* then chain.createEntry for batch-capture.
|
|
9
8
|
*/
|
|
10
9
|
/**
|
|
11
|
-
* Run the onboarding conversation:
|
|
10
|
+
* Run the onboarding conversation: topic-by-topic coach pattern, extraction, and auto-capture.
|
|
12
11
|
*/
|
|
13
12
|
export declare function runOnboardingConversation(workspaceName: string): Promise<void>;
|
|
14
13
|
/**
|
|
15
14
|
* Deterministic fallback when LLM is unavailable.
|
|
16
|
-
* Asks 3 hardcoded questions and maps answers to the same capture pipeline.
|
|
17
15
|
*/
|
|
18
16
|
export declare function runFallbackOnboarding(workspaceName: string): Promise<void>;
|
|
19
17
|
//# sourceMappingURL=onboarding.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"onboarding.d.ts","sourceRoot":"","sources":["../../src/lib/onboarding.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"onboarding.d.ts","sourceRoot":"","sources":["../../src/lib/onboarding.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAyBH;;GAEG;AACH,wBAAsB,yBAAyB,CAAC,aAAa,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAsTpF;AAUD;;GAEG;AACH,wBAAsB,qBAAqB,CAAC,aAAa,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAsEhF"}
|