@productbrain/cli 0.1.0-beta.10332 → 0.1.0-beta.10343
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__/route-latency-budget.test.js +3 -4
- package/dist/__tests__/route-latency-budget.test.js.map +1 -1
- package/dist/generated/routeLatencyBudget.generated.d.ts +0 -1
- package/dist/generated/routeLatencyBudget.generated.d.ts.map +1 -1
- package/dist/generated/routeLatencyBudget.generated.js +0 -5
- package/dist/generated/routeLatencyBudget.generated.js.map +1 -1
- package/dist/lib/client.d.ts.map +1 -1
- package/dist/lib/client.js +0 -1
- package/dist/lib/client.js.map +1 -1
- package/package.json +1 -1
- package/dist/__tests__/onboarding-path-b.test.d.ts +0 -2
- package/dist/__tests__/onboarding-path-b.test.d.ts.map +0 -1
- package/dist/__tests__/onboarding-path-b.test.js +0 -46
- package/dist/__tests__/onboarding-path-b.test.js.map +0 -1
- package/dist/__tests__/onboarding.test.d.ts +0 -6
- package/dist/__tests__/onboarding.test.d.ts.map +0 -1
- package/dist/__tests__/onboarding.test.js +0 -371
- package/dist/__tests__/onboarding.test.js.map +0 -1
- package/dist/__tests__/onboardingFallback.test.d.ts +0 -2
- package/dist/__tests__/onboardingFallback.test.d.ts.map +0 -1
- package/dist/__tests__/onboardingFallback.test.js +0 -74
- package/dist/__tests__/onboardingFallback.test.js.map +0 -1
- package/dist/lib/conversation-engine.d.ts +0 -45
- package/dist/lib/conversation-engine.d.ts.map +0 -1
- package/dist/lib/conversation-engine.js +0 -112
- package/dist/lib/conversation-engine.js.map +0 -1
- package/dist/lib/conversation-phases.d.ts +0 -59
- package/dist/lib/conversation-phases.d.ts.map +0 -1
- package/dist/lib/conversation-phases.js +0 -11
- package/dist/lib/conversation-phases.js.map +0 -1
- package/dist/lib/conversation-signals.d.ts +0 -30
- package/dist/lib/conversation-signals.d.ts.map +0 -1
- package/dist/lib/conversation-signals.js +0 -64
- package/dist/lib/conversation-signals.js.map +0 -1
- package/dist/lib/onboarding-path-b.d.ts +0 -10
- package/dist/lib/onboarding-path-b.d.ts.map +0 -1
- package/dist/lib/onboarding-path-b.js +0 -238
- package/dist/lib/onboarding-path-b.js.map +0 -1
- package/dist/lib/onboarding-shared.d.ts +0 -103
- package/dist/lib/onboarding-shared.d.ts.map +0 -1
- package/dist/lib/onboarding-shared.js +0 -208
- package/dist/lib/onboarding-shared.js.map +0 -1
- package/dist/lib/onboarding-shared.test.d.ts +0 -2
- package/dist/lib/onboarding-shared.test.d.ts.map +0 -1
- package/dist/lib/onboarding-shared.test.js +0 -131
- package/dist/lib/onboarding-shared.test.js.map +0 -1
- package/dist/lib/onboarding-topics.d.ts +0 -27
- package/dist/lib/onboarding-topics.d.ts.map +0 -1
- package/dist/lib/onboarding-topics.js +0 -57
- package/dist/lib/onboarding-topics.js.map +0 -1
- package/dist/lib/onboarding.d.ts +0 -21
- package/dist/lib/onboarding.d.ts.map +0 -1
- package/dist/lib/onboarding.js +0 -387
- package/dist/lib/onboarding.js.map +0 -1
|
@@ -1,238 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Path B — Facilitator-pattern onboarding (2 exchanges max).
|
|
3
|
-
* WP-304: Shorter flow, silent extraction, auto-capture, governance proof.
|
|
4
|
-
*/
|
|
5
|
-
import { kernelCall } from './client.js';
|
|
6
|
-
import { ask } from './prompts.js';
|
|
7
|
-
import { bold, dim, green, icons } from './style.js';
|
|
8
|
-
import { trackEvent } from './telemetry.js';
|
|
9
|
-
import { extractionToEntries, batchCaptureEntries, countWords, } from './onboarding-shared.js';
|
|
10
|
-
/**
|
|
11
|
-
* `onboarding.chat`'s server handler (convex/intelligence/onboardingChat.ts) deliberately
|
|
12
|
-
* types `extraction` as `Record<string, unknown>` — a dynamically-built "backward-compat"
|
|
13
|
-
* bridge object (its own comment: "Path B reads .extraction.vision, .extraction.tensions,
|
|
14
|
-
* etc."), not a mistake. `vision` is unconditionally seeded (`{ vision: '' }`, line ~350)
|
|
15
|
-
* before any conditional field is added, so it's always present as a string — matching
|
|
16
|
-
* `OnboardingExtraction.vision: string` (required). Cast at the boundary rather than loosen
|
|
17
|
-
* the shared client-side type (PR #398, Lane C S3c annotation pass).
|
|
18
|
-
*/
|
|
19
|
-
function asOnboardingExtraction(extraction) {
|
|
20
|
-
return extraction;
|
|
21
|
-
}
|
|
22
|
-
export async function runOnboardingPathB(workspaceName) {
|
|
23
|
-
trackEvent('setup_started', { mode: 'llm', path: 'B' });
|
|
24
|
-
const messages = [];
|
|
25
|
-
let totalUserWords = 0;
|
|
26
|
-
let lastExtraction = null;
|
|
27
|
-
// Exchange 1: Opening question
|
|
28
|
-
let greeting;
|
|
29
|
-
try {
|
|
30
|
-
const result = await kernelCall('onboarding.chat', {
|
|
31
|
-
messages: [],
|
|
32
|
-
workspaceName,
|
|
33
|
-
style: 'facilitator',
|
|
34
|
-
turnNumber: 1,
|
|
35
|
-
totalUserWords: 0,
|
|
36
|
-
});
|
|
37
|
-
if (!result?.content) {
|
|
38
|
-
await runPathBFallback(workspaceName);
|
|
39
|
-
return;
|
|
40
|
-
}
|
|
41
|
-
greeting = result.content;
|
|
42
|
-
}
|
|
43
|
-
catch {
|
|
44
|
-
await runPathBFallback(workspaceName);
|
|
45
|
-
return;
|
|
46
|
-
}
|
|
47
|
-
process.stdout.write(`\n ${greeting}\n\n`);
|
|
48
|
-
messages.push({ role: 'assistant', content: greeting });
|
|
49
|
-
// Get user's first answer
|
|
50
|
-
let userInput;
|
|
51
|
-
try {
|
|
52
|
-
userInput = await ask({
|
|
53
|
-
message: 'You',
|
|
54
|
-
placeholder: 'Tell me about your product...',
|
|
55
|
-
});
|
|
56
|
-
}
|
|
57
|
-
catch {
|
|
58
|
-
process.stdout.write(`\n ${dim('No worries! Run')} ${bold('pb capture')} ${dim('anytime to add knowledge.')}\n\n`);
|
|
59
|
-
return;
|
|
60
|
-
}
|
|
61
|
-
if (!userInput.trim()) {
|
|
62
|
-
process.stdout.write(`\n ${dim('No problem — explore with')} ${bold('pb orient -b')} ${dim('or capture with')} ${bold('pb capture')}\n\n`);
|
|
63
|
-
return;
|
|
64
|
-
}
|
|
65
|
-
messages.push({ role: 'user', content: userInput });
|
|
66
|
-
totalUserWords += countWords(userInput);
|
|
67
|
-
// Silent extraction after first answer (parallel with follow-up)
|
|
68
|
-
const [followUpResult, extractResult] = await Promise.allSettled([
|
|
69
|
-
kernelCall('onboarding.chat', {
|
|
70
|
-
messages,
|
|
71
|
-
workspaceName,
|
|
72
|
-
style: 'facilitator',
|
|
73
|
-
turnNumber: 2,
|
|
74
|
-
totalUserWords,
|
|
75
|
-
}),
|
|
76
|
-
kernelCall('onboarding.chat', {
|
|
77
|
-
messages,
|
|
78
|
-
workspaceName,
|
|
79
|
-
mode: 'extract',
|
|
80
|
-
}),
|
|
81
|
-
]);
|
|
82
|
-
// Store first extraction if available
|
|
83
|
-
if (extractResult.status === 'fulfilled' && extractResult.value?.extraction) {
|
|
84
|
-
lastExtraction = asOnboardingExtraction(extractResult.value.extraction) ?? null;
|
|
85
|
-
}
|
|
86
|
-
// Show follow-up question
|
|
87
|
-
if (followUpResult.status === 'fulfilled' && followUpResult.value?.content) {
|
|
88
|
-
const followUp = followUpResult.value.content;
|
|
89
|
-
process.stdout.write(`\n ${followUp}\n\n`);
|
|
90
|
-
messages.push({ role: 'assistant', content: followUp });
|
|
91
|
-
// Get second answer
|
|
92
|
-
try {
|
|
93
|
-
const secondInput = await ask({ message: 'You', placeholder: '' });
|
|
94
|
-
if (secondInput.trim()) {
|
|
95
|
-
messages.push({ role: 'user', content: secondInput });
|
|
96
|
-
totalUserWords += countWords(secondInput);
|
|
97
|
-
// Second extraction — merge with first
|
|
98
|
-
try {
|
|
99
|
-
const result2 = await kernelCall('onboarding.chat', {
|
|
100
|
-
messages,
|
|
101
|
-
workspaceName,
|
|
102
|
-
mode: 'extract',
|
|
103
|
-
});
|
|
104
|
-
if (result2?.extraction) {
|
|
105
|
-
lastExtraction = mergeExtractions(lastExtraction, asOnboardingExtraction(result2.extraction) ?? { vision: '' });
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
catch {
|
|
109
|
-
// Use first extraction if second fails
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
catch {
|
|
114
|
-
// User cancelled — use what we have
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
// Content floor — need at least something to extract
|
|
118
|
-
if (totalUserWords < 5 || !lastExtraction?.vision) {
|
|
119
|
-
// Try one final extraction if we don't have one
|
|
120
|
-
if (!lastExtraction?.vision && messages.filter((m) => m.role === 'user').length > 0) {
|
|
121
|
-
try {
|
|
122
|
-
const finalExtract = await kernelCall('onboarding.chat', {
|
|
123
|
-
messages,
|
|
124
|
-
workspaceName,
|
|
125
|
-
mode: 'extract',
|
|
126
|
-
});
|
|
127
|
-
if (finalExtract?.extraction) {
|
|
128
|
-
lastExtraction = asOnboardingExtraction(finalExtract.extraction) ?? null;
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
catch {
|
|
132
|
-
// Nothing to do
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
if (!lastExtraction?.vision) {
|
|
136
|
-
process.stdout.write(`\n ${dim('No problem — add knowledge anytime with')} ${bold('pb capture')}\n\n`);
|
|
137
|
-
trackEvent('setup_completed', { path: 'B', capturedCount: 0, reason: 'insufficient_content' });
|
|
138
|
-
return;
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
trackEvent('first_capture_prompted', { mode: 'llm', path: 'B' });
|
|
142
|
-
// Auto-capture — no approval UI in Path B
|
|
143
|
-
const allEntries = extractionToEntries(lastExtraction);
|
|
144
|
-
const entriesToCapture = allEntries
|
|
145
|
-
.filter((e) => e.name.trim().split(/\s+/).length >= 2 || e.collection === 'glossary')
|
|
146
|
-
.slice(0, 5);
|
|
147
|
-
if (entriesToCapture.length === 0) {
|
|
148
|
-
process.stdout.write(`\n ${dim('Nothing to save yet. Try')} ${bold('pb capture')} ${dim('to add knowledge manually.')}\n\n`);
|
|
149
|
-
return;
|
|
150
|
-
}
|
|
151
|
-
const { capturedCount, errors } = await batchCaptureEntries(entriesToCapture);
|
|
152
|
-
if (capturedCount > 0) {
|
|
153
|
-
process.stdout.write(`\n ${green(icons.pass)} Saved ${capturedCount} item${capturedCount === 1 ? '' : 's'} to your product brain.\n`);
|
|
154
|
-
trackEvent('capture_completed', { mode: 'llm', path: 'B', count: capturedCount });
|
|
155
|
-
}
|
|
156
|
-
if (errors.length > 0) {
|
|
157
|
-
process.stdout.write(`\n ${dim(`${errors.length} couldn't be saved.`)}\n`);
|
|
158
|
-
}
|
|
159
|
-
// Governance proof moment — show how captured knowledge participates in governance
|
|
160
|
-
await showGovernanceProof(lastExtraction.vision);
|
|
161
|
-
process.stdout.write(` ${dim('Explore with')} ${bold('pb orient -b')} ${dim('or add more with')} ${bold('pb capture')}\n\n`);
|
|
162
|
-
trackEvent('setup_completed', { path: 'B', capturedCount });
|
|
163
|
-
}
|
|
164
|
-
/** Merge two extractions — second takes precedence for scalar fields, arrays concatenate. */
|
|
165
|
-
export function mergeExtractions(first, second) {
|
|
166
|
-
if (!first)
|
|
167
|
-
return second;
|
|
168
|
-
return {
|
|
169
|
-
vision: second.vision || first.vision,
|
|
170
|
-
audience: second.audience || first.audience,
|
|
171
|
-
keyTerms: dedupe([...(first.keyTerms ?? []), ...(second.keyTerms ?? [])]),
|
|
172
|
-
keyDecisions: dedupe([...(first.keyDecisions ?? []), ...(second.keyDecisions ?? [])]),
|
|
173
|
-
tensions: dedupe([...(first.tensions ?? []), ...(second.tensions ?? [])]),
|
|
174
|
-
};
|
|
175
|
-
}
|
|
176
|
-
export function dedupe(arr) {
|
|
177
|
-
return [...new Set(arr.map((s) => s.toLowerCase()))].map((lower) => arr.find((s) => s.toLowerCase() === lower) ?? lower);
|
|
178
|
-
}
|
|
179
|
-
/** Governance proof — show the steering context resolveTaskStartup finds for the captured vision.
|
|
180
|
-
* TASK-556 (WP-777, DEC-1889): the old binding-governance buckets are not shown; they are not
|
|
181
|
-
* the rules that bind a session (the served rule lists are). */
|
|
182
|
-
async function showGovernanceProof(vision) {
|
|
183
|
-
try {
|
|
184
|
-
const result = await kernelCall('chain.resolveTaskStartup', { task: vision });
|
|
185
|
-
const allItems = (result?.steeringContext ?? []).filter((i) => i.name);
|
|
186
|
-
if (allItems.length > 0) {
|
|
187
|
-
process.stdout.write(`\n ${bold('Your product knowledge is now wired in:')}\n\n`);
|
|
188
|
-
for (const item of allItems.slice(0, 4)) {
|
|
189
|
-
process.stdout.write(` ${dim(icons.dot)} ${item.name}\n`);
|
|
190
|
-
}
|
|
191
|
-
if (allItems.length > 4) {
|
|
192
|
-
process.stdout.write(` ${dim(`...and ${allItems.length - 4} more`)}\n`);
|
|
193
|
-
}
|
|
194
|
-
process.stdout.write('\n');
|
|
195
|
-
}
|
|
196
|
-
}
|
|
197
|
-
catch {
|
|
198
|
-
// Governance proof is best-effort — fall back to orient-based proof
|
|
199
|
-
try {
|
|
200
|
-
// `'orient'` is not a real gateway route (never existed in the registry — this call
|
|
201
|
-
// has been throwing on every invocation, silently caught by the enclosing catch below,
|
|
202
|
-
// PR #397-class bug found via S3c annotation). Fixed to the real route,
|
|
203
|
-
// `chain.getOrientView`, whose return shape has no `.sections` — the closest real
|
|
204
|
-
// analog for "a few named items to display" is `taskContext.context` (entries with a
|
|
205
|
-
// `.name` field, same shape `chain.resolveTaskStartup`'s steeringContext
|
|
206
|
-
// items above use).
|
|
207
|
-
// `renderMode` is the telemetry-attribution axis, not a formatting hint (convex/
|
|
208
|
-
// agentKnowledge/orientView.ts / convex/http.ts): 'json' means "agent-surface machine
|
|
209
|
-
// payload" and feeds the OBJ-51 scoreboard denominator via governanceRenderedJson.
|
|
210
|
-
// This onboarding fallback is a genuinely interactive, human-facing CLI flow (styled
|
|
211
|
-
// stdout text, `ask()` prompts) — 'json' here would mislabel it as agent traffic and
|
|
212
|
-
// contaminate that metric. 'pretty' is documented as exactly "interactive human TTY"
|
|
213
|
-
// and carries no governanceRenderedJson, staying correctly uninstrumented (Codex P2,
|
|
214
|
-
// PR #398 review).
|
|
215
|
-
const orient = await kernelCall('chain.getOrientView', {
|
|
216
|
-
task: vision,
|
|
217
|
-
renderMode: 'pretty',
|
|
218
|
-
});
|
|
219
|
-
const items = (orient?.taskContext?.context ?? []).filter((i) => i.name);
|
|
220
|
-
if (items.length > 0) {
|
|
221
|
-
process.stdout.write(`\n ${bold("Here's how your product brain will use this:")}\n\n`);
|
|
222
|
-
for (const item of items.slice(0, 5)) {
|
|
223
|
-
process.stdout.write(` ${dim(icons.dot)} ${item.name}\n`);
|
|
224
|
-
}
|
|
225
|
-
process.stdout.write('\n');
|
|
226
|
-
}
|
|
227
|
-
}
|
|
228
|
-
catch {
|
|
229
|
-
// Both proofs failed — skip silently
|
|
230
|
-
}
|
|
231
|
-
}
|
|
232
|
-
}
|
|
233
|
-
/** Deterministic fallback when LLM is unavailable. Dynamic import avoids circular dependency with onboarding.ts. */
|
|
234
|
-
async function runPathBFallback(workspaceName) {
|
|
235
|
-
const { runFallbackOnboarding } = await import('./onboarding.js');
|
|
236
|
-
await runFallbackOnboarding(workspaceName);
|
|
237
|
-
}
|
|
238
|
-
//# sourceMappingURL=onboarding-path-b.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"onboarding-path-b.js","sourceRoot":"","sources":["../../src/lib/onboarding-path-b.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AACnC,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACrD,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EACL,mBAAmB,EACnB,mBAAmB,EACnB,UAAU,GAIX,MAAM,wBAAwB,CAAC;AAEhC;;;;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AAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;YACzE,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;gBACrB,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO,IAAI,CAAC,8CAA8C,CAAC,MAAM,CAAC,CAAC;gBACxF,KAAK,MAAM,IAAI,IAAI,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC;oBACrC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,IAAI,CAAC,IAAI,IAAI,CAAC,CAAC;gBAC/D,CAAC;gBACD,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;YAC7B,CAAC;QACH,CAAC;QAAC,MAAM,CAAC;YACP,qCAAqC;QACvC,CAAC;IACH,CAAC;AACH,CAAC;AAED,oHAAoH;AACpH,KAAK,UAAU,gBAAgB,CAAC,aAAqB;IACnD,MAAM,EAAE,qBAAqB,EAAE,GAAG,MAAM,MAAM,CAAC,iBAAiB,CAAC,CAAC;IAClE,MAAM,qBAAqB,CAAC,aAAa,CAAC,CAAC;AAC7C,CAAC"}
|
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Shared onboarding utilities — types, extraction mapping, batch capture, retrieval proof.
|
|
3
|
-
* WP-304: Extracted from onboarding.ts to support both Path A and future Path B.
|
|
4
|
-
*
|
|
5
|
-
* DIVERGED from the MCP server's former extractionToBatchEntries per DEC-522 (that module,
|
|
6
|
-
* start-interview.ts, was deleted as dead code — see git history / TEN-2754's PR for the
|
|
7
|
-
* removal). Copy-and-own: CLI uses 120-char truncate limits (vs MCP's former 80). Shared
|
|
8
|
-
* package deferred. Duplicated due to monorepo import boundary (BR-108).
|
|
9
|
-
*/
|
|
10
|
-
/** @deprecated Use CaptureEntry[] directly — LLM now outputs entry-shaped data. */
|
|
11
|
-
export interface OnboardingExtraction {
|
|
12
|
-
vision: string;
|
|
13
|
-
audience?: string | null;
|
|
14
|
-
keyTerms?: string[] | null;
|
|
15
|
-
keyDecisions?: string[] | null;
|
|
16
|
-
tensions?: string[] | null;
|
|
17
|
-
}
|
|
18
|
-
/** Result from chain.createEntry. */
|
|
19
|
-
export interface CreateEntryResult {
|
|
20
|
-
entryId: string;
|
|
21
|
-
collection: string;
|
|
22
|
-
name: string;
|
|
23
|
-
status: string;
|
|
24
|
-
}
|
|
25
|
-
/** A single entry to capture. */
|
|
26
|
-
export interface CaptureEntry {
|
|
27
|
-
collection: string;
|
|
28
|
-
name: string;
|
|
29
|
-
description: string;
|
|
30
|
-
typeLabel: string;
|
|
31
|
-
/** WP-770 why-producers (TASK-360, TEN-3918, ruling): the LLM's own extracted reason —
|
|
32
|
-
* present ONLY when the LLM genuinely supplied one. Onboarding never invents a why by
|
|
33
|
-
* copying `description` into it (a description is what/that, not why) — see
|
|
34
|
-
* `classifyExtractedEntries`'s skip rule for the why-required collections (strategy,
|
|
35
|
-
* decisions), which never let an entry through without a real `why`. */
|
|
36
|
-
why?: string;
|
|
37
|
-
}
|
|
38
|
-
/** An extracted entry of a why-required kind that had no `why` — reported to the user instead
|
|
39
|
-
* of captured with an invented one (WP-770 why-producers ruling, TASK-360). */
|
|
40
|
-
export interface SkippedEntry {
|
|
41
|
-
name: string;
|
|
42
|
-
collection: string;
|
|
43
|
-
}
|
|
44
|
-
/** Result from the onboarding.chat action — chat mode. */
|
|
45
|
-
export interface OnboardingChatResult {
|
|
46
|
-
content: string;
|
|
47
|
-
/** Coach pattern (Path A): whether the LLM judged the current topic's criteria as met. */
|
|
48
|
-
topicComplete?: boolean;
|
|
49
|
-
/** @deprecated Path B facilitator only. */
|
|
50
|
-
phase?: string;
|
|
51
|
-
signals?: {
|
|
52
|
-
describedProduct?: boolean;
|
|
53
|
-
describedProblem?: boolean;
|
|
54
|
-
answeredWhyPB?: boolean;
|
|
55
|
-
quotableFragments?: string[];
|
|
56
|
-
} | null;
|
|
57
|
-
}
|
|
58
|
-
/** Result from the onboarding.chat action — extract mode. */
|
|
59
|
-
export interface OnboardingExtractResult {
|
|
60
|
-
entries: CaptureEntry[];
|
|
61
|
-
/** @deprecated Backward-compat for Path B. Remove when Path B migrates to entries[]. */
|
|
62
|
-
extraction?: OnboardingExtraction;
|
|
63
|
-
}
|
|
64
|
-
export declare function truncate(str: string, maxLen: number): string;
|
|
65
|
-
export declare function firstNWords(str: string, n: number): string;
|
|
66
|
-
export declare function countWords(text: string): number;
|
|
67
|
-
/** WP-770 why-producers (TASK-360, DEC-1787): the why-required canonicalKeys' collection
|
|
68
|
-
* slugs, scoped to onboarding's own four VALID_COLLECTIONS (glossary/tensions are not
|
|
69
|
-
* why-required) — a local subset, not an import of convex/lib/whyPolicy's canonicalKey list,
|
|
70
|
-
* since onboarding validates by collection slug, not canonicalKey (BR-108 copy-and-own). */
|
|
71
|
-
export declare const WHY_REQUIRED_ONBOARDING_COLLECTIONS: Set<string>;
|
|
72
|
-
/**
|
|
73
|
-
* Validate and clean LLM-extracted entries. The LLM outputs entry-shaped data directly;
|
|
74
|
-
* this function validates shape, deduplicates, and caps the result. A why-required entry
|
|
75
|
-
* with no LLM-supplied `why` is never in this list — see `findSkippedForMissingWhy`.
|
|
76
|
-
*/
|
|
77
|
-
export declare function validateExtractedEntries(entries: unknown[]): CaptureEntry[];
|
|
78
|
-
/** The why-required entries `validateExtractedEntries` left out for lack of a `why` — report
|
|
79
|
-
* these to the user ("skipped, needs a why: <name>") instead of silently dropping them. */
|
|
80
|
-
export declare function findSkippedForMissingWhy(entries: unknown[]): SkippedEntry[];
|
|
81
|
-
/** @deprecated Use validateExtractedEntries instead — kept for backward compat during migration. */
|
|
82
|
-
export declare function extractionToEntries(extracted: OnboardingExtraction): CaptureEntry[];
|
|
83
|
-
/**
|
|
84
|
-
* Display one entry example with schema structure.
|
|
85
|
-
* Shows typeLabel (from LLM), name, and description in a clean format.
|
|
86
|
-
*/
|
|
87
|
-
export declare function displayEntryExample(entry: CaptureEntry): void;
|
|
88
|
-
/**
|
|
89
|
-
* Batch-capture entries via MCP chain.createEntry.
|
|
90
|
-
* Returns count of captured entries and any error messages.
|
|
91
|
-
*/
|
|
92
|
-
export declare function batchCaptureEntries(entries: CaptureEntry[]): Promise<{
|
|
93
|
-
capturedCount: number;
|
|
94
|
-
captured: CaptureEntry[];
|
|
95
|
-
errors: string[];
|
|
96
|
-
}>;
|
|
97
|
-
/**
|
|
98
|
-
* Show deterministic proof of what was captured — displays the entries that were just saved.
|
|
99
|
-
* Guaranteed to show content (no network call that can fail or return empty).
|
|
100
|
-
* Satisfies BR-141: "First-session flow MUST end with retrieval demonstration."
|
|
101
|
-
*/
|
|
102
|
-
export declare function showCapturedSummary(entries: CaptureEntry[], capturedCount: number): void;
|
|
103
|
-
//# sourceMappingURL=onboarding-shared.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"onboarding-shared.d.ts","sourceRoot":"","sources":["../../src/lib/onboarding-shared.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAQH,mFAAmF;AACnF,MAAM,WAAW,oBAAoB;IACnC,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,QAAQ,CAAC,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;IAC3B,YAAY,CAAC,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;IAC/B,QAAQ,CAAC,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;CAC5B;AAED,qCAAqC;AACrC,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,iCAAiC;AACjC,MAAM,WAAW,YAAY;IAC3B,UAAU,EAAE,MA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EAAE,GAAG,YAAY,EAAE,CAE3E;AAED,oGAAoG;AACpG,wBAAgB,mBAAmB,CAAC,SAAS,EAAE,oBAAoB,GAAG,YAAY,EAAE,CAwDnF;AAID;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,YAAY,GAAG,IAAI,CAO7D;AAID;;;GAGG;AACH,wBAAsB,mBAAmB,CACvC,OAAO,EAAE,YAAY,EAAE,GACtB,OAAO,CAAC;IAAE,aAAa,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,YAAY,EAAE,CAAC;IAAC,MAAM,EAAE,MAAM,EAAE,CAAA;CAAE,CAAC,CAuBhF;AAID;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,aAAa,EAAE,MAAM,GAAG,IAAI,CAWxF"}
|
|
@@ -1,208 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Shared onboarding utilities — types, extraction mapping, batch capture, retrieval proof.
|
|
3
|
-
* WP-304: Extracted from onboarding.ts to support both Path A and future Path B.
|
|
4
|
-
*
|
|
5
|
-
* DIVERGED from the MCP server's former extractionToBatchEntries per DEC-522 (that module,
|
|
6
|
-
* start-interview.ts, was deleted as dead code — see git history / TEN-2754's PR for the
|
|
7
|
-
* removal). Copy-and-own: CLI uses 120-char truncate limits (vs MCP's former 80). Shared
|
|
8
|
-
* package deferred. Duplicated due to monorepo import boundary (BR-108).
|
|
9
|
-
*/
|
|
10
|
-
import { kernelCallWithSession } from './client.js';
|
|
11
|
-
import { bold, cyan, dim, icons } from './style.js';
|
|
12
|
-
// ── String helpers ─────────────────────────────────────────────────────────
|
|
13
|
-
export function truncate(str, maxLen) {
|
|
14
|
-
if (str.length <= maxLen)
|
|
15
|
-
return str;
|
|
16
|
-
const truncated = str.slice(0, maxLen);
|
|
17
|
-
const lastSpace = truncated.lastIndexOf(' ');
|
|
18
|
-
return lastSpace > maxLen * 0.6 ? truncated.slice(0, lastSpace) : truncated;
|
|
19
|
-
}
|
|
20
|
-
export function firstNWords(str, n) {
|
|
21
|
-
return str.split(/\s+/).slice(0, n).join(' ');
|
|
22
|
-
}
|
|
23
|
-
export function countWords(text) {
|
|
24
|
-
return text.trim().split(/\s+/).filter(Boolean).length;
|
|
25
|
-
}
|
|
26
|
-
// ── Extraction → Entries Validation ──────────────────────────────────────
|
|
27
|
-
// P3b U0b (TASK-427, WP-780, TEN-3855): audiences removed — retired, no repoint.
|
|
28
|
-
// PR #1126 review round 2 (Codex, PRRT_kwDORS4ils6l5QN4): architecture removed too — same
|
|
29
|
-
// retirement (dev-system-collections.json), no repoint.
|
|
30
|
-
const VALID_COLLECTIONS = new Set(['strategy', 'glossary', 'decisions', 'tensions']);
|
|
31
|
-
/** WP-770 why-producers (TASK-360, DEC-1787): the why-required canonicalKeys' collection
|
|
32
|
-
* slugs, scoped to onboarding's own four VALID_COLLECTIONS (glossary/tensions are not
|
|
33
|
-
* why-required) — a local subset, not an import of convex/lib/whyPolicy's canonicalKey list,
|
|
34
|
-
* since onboarding validates by collection slug, not canonicalKey (BR-108 copy-and-own). */
|
|
35
|
-
export const WHY_REQUIRED_ONBOARDING_COLLECTIONS = new Set(['strategy', 'decisions']);
|
|
36
|
-
/**
|
|
37
|
-
* Shape/dedup/cap an LLM-extracted entry list, split into what to capture and what to skip.
|
|
38
|
-
* WP-770 why-producers ruling (TASK-360, TEN-3918): onboarding never invents a why — copying
|
|
39
|
-
* `description` into `why` is filler (what/that), not a reason (why). A why-required kind
|
|
40
|
-
* (strategy, decisions) the LLM extracted WITHOUT its own `why` is not captured; it is
|
|
41
|
-
* reported as skipped so the user can add the reason themselves via `pb capture`.
|
|
42
|
-
*/
|
|
43
|
-
function classifyExtractedEntries(entries) {
|
|
44
|
-
if (!Array.isArray(entries))
|
|
45
|
-
return { entries: [], skipped: [] };
|
|
46
|
-
const seen = new Set();
|
|
47
|
-
const validated = [];
|
|
48
|
-
const skipped = [];
|
|
49
|
-
for (const entry of entries) {
|
|
50
|
-
if (!entry || typeof entry !== 'object')
|
|
51
|
-
continue;
|
|
52
|
-
const e = entry;
|
|
53
|
-
const collection = typeof e.collection === 'string' ? e.collection : '';
|
|
54
|
-
const name = typeof e.name === 'string' ? e.name.trim() : '';
|
|
55
|
-
const description = typeof e.description === 'string' ? e.description.trim() : '';
|
|
56
|
-
const typeLabel = typeof e.typeLabel === 'string' ? e.typeLabel.trim() : '';
|
|
57
|
-
const why = typeof e.why === 'string' && e.why.trim() ? e.why.trim() : undefined;
|
|
58
|
-
// Validate required fields
|
|
59
|
-
if (!name || !description || !VALID_COLLECTIONS.has(collection))
|
|
60
|
-
continue;
|
|
61
|
-
// Skip single-word names (except glossary)
|
|
62
|
-
if (name.split(/\s+/).length < 2 && collection !== 'glossary')
|
|
63
|
-
continue;
|
|
64
|
-
// Dedup by name (case-insensitive) — WP-770 why-producers round 4 (TASK-360,
|
|
65
|
-
// PRRT_kwDORS4ils6mNX-n): `seen` is marked only once a row is ACCEPTED below, never on a
|
|
66
|
-
// skip, so a later duplicate that DOES supply a why can still replace an earlier skipped
|
|
67
|
-
// same-named row instead of being silently deduped away against it.
|
|
68
|
-
const key = name.toLowerCase();
|
|
69
|
-
if (seen.has(key))
|
|
70
|
-
continue;
|
|
71
|
-
if (WHY_REQUIRED_ONBOARDING_COLLECTIONS.has(collection) && !why) {
|
|
72
|
-
skipped.push({ name: truncate(name, 120), collection });
|
|
73
|
-
continue;
|
|
74
|
-
}
|
|
75
|
-
seen.add(key);
|
|
76
|
-
validated.push({
|
|
77
|
-
collection,
|
|
78
|
-
name: truncate(name, 120),
|
|
79
|
-
description,
|
|
80
|
-
typeLabel: typeLabel || collection, // fallback to collection if LLM omits
|
|
81
|
-
...(why ? { why } : {}),
|
|
82
|
-
});
|
|
83
|
-
}
|
|
84
|
-
return { entries: validated.slice(0, 7), skipped };
|
|
85
|
-
}
|
|
86
|
-
/**
|
|
87
|
-
* Validate and clean LLM-extracted entries. The LLM outputs entry-shaped data directly;
|
|
88
|
-
* this function validates shape, deduplicates, and caps the result. A why-required entry
|
|
89
|
-
* with no LLM-supplied `why` is never in this list — see `findSkippedForMissingWhy`.
|
|
90
|
-
*/
|
|
91
|
-
export function validateExtractedEntries(entries) {
|
|
92
|
-
return classifyExtractedEntries(entries).entries;
|
|
93
|
-
}
|
|
94
|
-
/** The why-required entries `validateExtractedEntries` left out for lack of a `why` — report
|
|
95
|
-
* these to the user ("skipped, needs a why: <name>") instead of silently dropping them. */
|
|
96
|
-
export function findSkippedForMissingWhy(entries) {
|
|
97
|
-
return classifyExtractedEntries(entries).skipped;
|
|
98
|
-
}
|
|
99
|
-
/** @deprecated Use validateExtractedEntries instead — kept for backward compat during migration. */
|
|
100
|
-
export function extractionToEntries(extracted) {
|
|
101
|
-
const entries = [];
|
|
102
|
-
if (extracted.vision?.trim()) {
|
|
103
|
-
entries.push({
|
|
104
|
-
collection: 'strategy',
|
|
105
|
-
name: 'Product Vision',
|
|
106
|
-
description: extracted.vision,
|
|
107
|
-
typeLabel: "What you're building",
|
|
108
|
-
});
|
|
109
|
-
}
|
|
110
|
-
// P3b U0b (TASK-427, WP-780, TEN-3855): the audiences emission is removed — retired, no
|
|
111
|
-
// repoint. extracted.audience (the field itself, and mergeExtractions' handling of it) stays
|
|
112
|
-
// declared: OnboardingExtraction is already @deprecated in full, and no reader is left to
|
|
113
|
-
// populate it now that this is gone — dead, but harmless, and out of this slice's named scope.
|
|
114
|
-
if (extracted.keyTerms?.length) {
|
|
115
|
-
for (const term of extracted.keyTerms) {
|
|
116
|
-
const alreadyAdded = entries.some((e) => e.collection === 'glossary' && e.name.toLowerCase() === term.toLowerCase());
|
|
117
|
-
if (!alreadyAdded) {
|
|
118
|
-
entries.push({
|
|
119
|
-
collection: 'glossary',
|
|
120
|
-
name: term,
|
|
121
|
-
description: `Core domain term: ${term}`,
|
|
122
|
-
typeLabel: 'A term worth remembering',
|
|
123
|
-
});
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
if (extracted.keyDecisions?.length) {
|
|
128
|
-
for (const decision of extracted.keyDecisions) {
|
|
129
|
-
entries.push({
|
|
130
|
-
collection: 'decisions',
|
|
131
|
-
name: truncate(decision, 120),
|
|
132
|
-
description: decision,
|
|
133
|
-
typeLabel: 'A decision you\'ve made',
|
|
134
|
-
});
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
if (extracted.tensions?.length) {
|
|
138
|
-
for (const tension of extracted.tensions) {
|
|
139
|
-
entries.push({
|
|
140
|
-
collection: 'tensions',
|
|
141
|
-
name: truncate(tension, 120),
|
|
142
|
-
description: tension,
|
|
143
|
-
typeLabel: 'A challenge you\'re facing',
|
|
144
|
-
});
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
return entries;
|
|
148
|
-
}
|
|
149
|
-
// ── Display helpers ───────────────────────────────────────────────────────
|
|
150
|
-
/**
|
|
151
|
-
* Display one entry example with schema structure.
|
|
152
|
-
* Shows typeLabel (from LLM), name, and description in a clean format.
|
|
153
|
-
*/
|
|
154
|
-
export function displayEntryExample(entry) {
|
|
155
|
-
process.stdout.write(` ${cyan(entry.typeLabel)}\n`);
|
|
156
|
-
process.stdout.write(` ${bold(entry.name)}\n`);
|
|
157
|
-
if (entry.description !== entry.name) {
|
|
158
|
-
process.stdout.write(` ${dim(entry.description)}\n`);
|
|
159
|
-
}
|
|
160
|
-
process.stdout.write('\n');
|
|
161
|
-
}
|
|
162
|
-
// ── Batch capture ─────────────────────────────────────────────────────────
|
|
163
|
-
/**
|
|
164
|
-
* Batch-capture entries via MCP chain.createEntry.
|
|
165
|
-
* Returns count of captured entries and any error messages.
|
|
166
|
-
*/
|
|
167
|
-
export async function batchCaptureEntries(entries) {
|
|
168
|
-
let capturedCount = 0;
|
|
169
|
-
const captured = [];
|
|
170
|
-
const errors = [];
|
|
171
|
-
for (const entry of entries) {
|
|
172
|
-
try {
|
|
173
|
-
await kernelCallWithSession('chain.createEntry', {
|
|
174
|
-
collectionSlug: entry.collection,
|
|
175
|
-
name: entry.name,
|
|
176
|
-
// DEC-896 / BR-76: omit status — server resolves from governanceMode (Open→active, else draft).
|
|
177
|
-
// WP-770 why-producers (TASK-360): `why` rides along when the entry genuinely has one (classifyExtractedEntries never invents one).
|
|
178
|
-
data: { description: entry.description, ...(entry.why ? { why: entry.why } : {}) },
|
|
179
|
-
});
|
|
180
|
-
capturedCount++;
|
|
181
|
-
captured.push(entry);
|
|
182
|
-
}
|
|
183
|
-
catch (err) {
|
|
184
|
-
const msg = err instanceof Error ? err.message : String(err);
|
|
185
|
-
errors.push(`${entry.name}: ${msg}`);
|
|
186
|
-
}
|
|
187
|
-
}
|
|
188
|
-
return { capturedCount, captured, errors };
|
|
189
|
-
}
|
|
190
|
-
// ── Captured proof ────────────────────────────────────────────────────────
|
|
191
|
-
/**
|
|
192
|
-
* Show deterministic proof of what was captured — displays the entries that were just saved.
|
|
193
|
-
* Guaranteed to show content (no network call that can fail or return empty).
|
|
194
|
-
* Satisfies BR-141: "First-session flow MUST end with retrieval demonstration."
|
|
195
|
-
*/
|
|
196
|
-
export function showCapturedSummary(entries, capturedCount) {
|
|
197
|
-
if (capturedCount === 0 || entries.length === 0)
|
|
198
|
-
return;
|
|
199
|
-
process.stdout.write(`\n ${bold('Your AI tools will now remember:')}\n\n`);
|
|
200
|
-
for (const entry of entries.slice(0, 5)) {
|
|
201
|
-
process.stdout.write(` ${dim(icons.dot)} ${entry.name}\n`);
|
|
202
|
-
}
|
|
203
|
-
if (entries.length > 5) {
|
|
204
|
-
process.stdout.write(` ${dim(`...and ${entries.length - 5} more`)}\n`);
|
|
205
|
-
}
|
|
206
|
-
process.stdout.write('\n');
|
|
207
|
-
}
|
|
208
|
-
//# sourceMappingURL=onboarding-shared.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"onboarding-shared.js","sourceRoot":"","sources":["../../src/lib/onboarding-shared.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,OAAO,EA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