@aibvf/core 0.10.6 → 0.11.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/dist/aliases.d.ts +6 -1
- package/dist/aliases.d.ts.map +1 -1
- package/dist/aliases.js +159 -40
- package/dist/aliases.js.map +1 -1
- package/dist/assessInitiative.d.ts +11 -4
- package/dist/assessInitiative.d.ts.map +1 -1
- package/dist/assessInitiative.js +338 -145
- package/dist/assessInitiative.js.map +1 -1
- package/dist/assessInitiative.test.js +211 -258
- package/dist/assessInitiative.test.js.map +1 -1
- package/dist/audit.d.ts +1 -1
- package/dist/audit.js +1 -1
- package/dist/extractRevenue.d.ts +7 -0
- package/dist/extractRevenue.d.ts.map +1 -0
- package/dist/extractRevenue.js +104 -0
- package/dist/extractRevenue.js.map +1 -0
- package/dist/extractRevenue.test.d.ts +2 -0
- package/dist/extractRevenue.test.d.ts.map +1 -0
- package/dist/extractRevenue.test.js +119 -0
- package/dist/extractRevenue.test.js.map +1 -0
- package/dist/guidedQuestions.d.ts +30 -0
- package/dist/guidedQuestions.d.ts.map +1 -0
- package/dist/guidedQuestions.js +104 -0
- package/dist/guidedQuestions.js.map +1 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/plainLanguage.test.d.ts +2 -0
- package/dist/plainLanguage.test.d.ts.map +1 -0
- package/dist/plainLanguage.test.js +97 -0
- package/dist/plainLanguage.test.js.map +1 -0
- package/dist/types.d.ts +107 -7
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Reads a company's annual revenue in EUR from a plain-language proposal.
|
|
3
|
+
* The front door no longer asks for revenue; this stays for the specialist
|
|
4
|
+
* scoring tools and for callers that use it directly.
|
|
5
|
+
*/
|
|
6
|
+
const MULTIPLIER = {
|
|
7
|
+
k: 1_000, thousand: 1_000,
|
|
8
|
+
m: 1_000_000, mn: 1_000_000, million: 1_000_000,
|
|
9
|
+
b: 1_000_000_000, bn: 1_000_000_000, billion: 1_000_000_000,
|
|
10
|
+
};
|
|
11
|
+
const SCALE = 'billion|million|thousand|bn|mn|[kmb]';
|
|
12
|
+
const CURRENCY = 'EUR|euros?|USD|dollars?|GBP|pounds?|CHF|AUD|CAD|NZD|SEK|NOK|DKK|JPY|CNY|INR|BRL|RUB|ZAR|AED|SGD|HKD|PLN|CZK|HUF|KRW|ILS|TRY|MXN|TWD|THB|MYR|PHP|IDR|[€$£¥]';
|
|
13
|
+
function amount(value, scale) {
|
|
14
|
+
const compact = value.replace(/ /g, '');
|
|
15
|
+
let normalized = compact;
|
|
16
|
+
if (compact.includes(',') && compact.includes('.')) {
|
|
17
|
+
if (/^\d{1,3}(?:,\d{3})+\.\d+$/.test(compact)) {
|
|
18
|
+
normalized = compact.replace(/,/g, '');
|
|
19
|
+
}
|
|
20
|
+
else if (/^\d{1,3}(?:\.\d{3})+,\d+$/.test(compact)) {
|
|
21
|
+
normalized = compact.replace(/\./g, '').replace(',', '.');
|
|
22
|
+
}
|
|
23
|
+
else
|
|
24
|
+
return undefined;
|
|
25
|
+
}
|
|
26
|
+
else if (/[,.]/.test(compact)) {
|
|
27
|
+
const parts = compact.split(/[,.]/);
|
|
28
|
+
const grouped = /^\d{1,3}(?:[,.]\d{3})+$/.test(compact);
|
|
29
|
+
// A scaled value such as "1,200 million" has two plausible readings.
|
|
30
|
+
if (scale && grouped)
|
|
31
|
+
return undefined;
|
|
32
|
+
if (grouped)
|
|
33
|
+
normalized = compact.replace(/[,.]/g, '');
|
|
34
|
+
else if (parts.length === 2)
|
|
35
|
+
normalized = compact.replace(',', '.');
|
|
36
|
+
else
|
|
37
|
+
return undefined;
|
|
38
|
+
}
|
|
39
|
+
const result = Math.round(Number(normalized) * (scale ? MULTIPLIER[scale.toLowerCase()] : 1));
|
|
40
|
+
return Number.isSafeInteger(result) && result >= 0 ? result : undefined;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Reads revenue-labelled amounts and explicit EUR company-size descriptions.
|
|
44
|
+
* Costs, foreign currencies and conflicting amounts require a revenue answer.
|
|
45
|
+
* Unmarked revenue/turnover retains the EUR default used by the assessment.
|
|
46
|
+
*/
|
|
47
|
+
export function extractRevenueEur(proposal) {
|
|
48
|
+
const text = proposal.replace(/[\u00a0\u202f]/g, ' ');
|
|
49
|
+
const number = '(?:[0-9]{1,3}(?: [0-9]{3})+(?:[.,][0-9]+)?|[0-9]+(?:[.,][0-9]+)*)';
|
|
50
|
+
const monetaryAmount = new RegExp(String.raw `(?<![\w.,])(?:(?<before>${CURRENCY})\s*)?(?<value>${number})\s*(?<scale>${SCALE})?(?![\w]|[.,][0-9])(?:\s*(?<after>${CURRENCY})(?!\w|\s*[0-9]))?`, 'gi');
|
|
51
|
+
const revenueBefore = /\b(?:revenue|turnover)\s*(?:(?:of|is|was|at|around|about|approximately|approx\.?|equals)\s*)?[:=]?\s*$/i;
|
|
52
|
+
const revenueAfter = /^\s*(?:(?:in|of)\s+)?(?:annual\s+)?(?:revenue|turnover)\b/i;
|
|
53
|
+
const nonRevenueBefore = /\b(?:pilot|project|budget|costs?|spend|investment|savings?|benefits?|funding|profit|valuation)\s*(?:(?:of|is|are|was|at|around|about|approximately|approx\.?|equals)\s*)?[:=]?\s*$/i;
|
|
54
|
+
const nonRevenueAfter = /^\s*(?:(?:in|of|for|annual|projected|expected|implementation|operating)\s+)*(?:pilot|project|budget|costs?|spend|investment|savings?|benefits?|funding|profit|valuation)\b/i;
|
|
55
|
+
const projectRevenueBefore = /\b(?:(?:project|pilot|initiative)(?:['’]s)?|incremental|additional|projected|expected|potential|target|expect|forecast|anticipate)\s+(?:annual\s+)?(?:revenue|turnover)\s*(?:(?:of|is|was|at|around|about|approximately|approx\.?|equals)\s*)?[:=]?\s*$/i;
|
|
56
|
+
const projectRevenueAfter = /^\s*(?:(?:in|of)\s+)?(?:incremental|additional|projected|expected|potential|target)\s+(?:annual\s+)?(?:revenue|turnover)\b/i;
|
|
57
|
+
const projectRevenueSource = /^\s*(?:(?:in|of)\s+)?(?:(?:annual|incremental|additional|projected|expected|potential|target)\s+)?(?:(?:revenue|turnover)\s+)?(?:from|for|generated\s+by|attributable\s+to)\s+(?:(?:the|this|our|an?)\s+)?(?:pilot|project|initiative)\b/i;
|
|
58
|
+
const periodicRevenueBefore = /\b(?:monthly|quarterly|weekly|daily|Q[1-4])\s+(?:(?:company|organisation|organization)\s+)?(?:revenue|turnover)\s*(?:(?:of|is|was|at|around|about|approximately|approx\.?|equals)\s*)?[:=]?\s*$/i;
|
|
59
|
+
const periodicRevenueAfter = /^\s*(?:(?:in|of)\s+)?(?:(?:revenue|turnover)\s+)?(?:(?:per|a|each|every)\s+(?:month|quarter|week|day)\b|(?:monthly|quarterly|weekly|daily)\b|\/\s*(?:month|quarter|week|day)\b)/i;
|
|
60
|
+
// "15m euro IT services company": up to three describing words may sit between the
|
|
61
|
+
// amount and the organisation noun, but never a preposition or verb ("EUR 2m saved by the business").
|
|
62
|
+
const companyAfter = /^\s*(?:(?!(?:at|for|by|in|to|from|of|on|with|per|and|or|that|which|is|was|are|will|would|saved|spent|invested|raised|paid|lost)\b)[\w&-]+\s+){0,3}?(?:retailer|company|business|bank|manufacturer|organisation|organization|hospital|insurer|enterprise|non-profit|nonprofit|firm|practice|agency|group|provider|msp|charity|startup|consultancy|partnership|council|university|school|studio|clinic)\b/i;
|
|
63
|
+
const rangeAfter = new RegExp(String.raw `^\s*(?:[-–—/]|to\b|through\b|or\b)\s*(?:(?:${CURRENCY})\s*)?[0-9]`, 'i');
|
|
64
|
+
const foreignCodeSuffix = /^\s*[A-Z]{3}\b/;
|
|
65
|
+
const foreignSuffix = /^\s*(?:dollars?\b|pounds?\b|yen\b|yuan\b|renminbi\b|rupees?\b)/i;
|
|
66
|
+
const revenues = [];
|
|
67
|
+
const otherAmounts = [];
|
|
68
|
+
let unresolved = false;
|
|
69
|
+
for (const match of text.matchAll(monetaryAmount)) {
|
|
70
|
+
const { before: currencyBefore, after: currencyAfter, value, scale } = match.groups;
|
|
71
|
+
const before = text.slice(0, match.index).slice(-100);
|
|
72
|
+
const after = text.slice(match.index + match[0].length, match.index + match[0].length + 100);
|
|
73
|
+
const labelled = revenueBefore.test(before) || revenueAfter.test(after);
|
|
74
|
+
if (projectRevenueBefore.test(before) || projectRevenueAfter.test(after)
|
|
75
|
+
|| projectRevenueSource.test(after) || periodicRevenueBefore.test(before)
|
|
76
|
+
|| periodicRevenueAfter.test(after))
|
|
77
|
+
continue;
|
|
78
|
+
if (!labelled && (nonRevenueBefore.test(before) || nonRevenueAfter.test(after)))
|
|
79
|
+
continue;
|
|
80
|
+
const currencies = [currencyBefore, currencyAfter].filter(Boolean);
|
|
81
|
+
const euro = currencies.length > 0 && currencies.every((currency) => /^(?:EUR|euros?|€)$/i.test(currency));
|
|
82
|
+
const companySize = euro && companyAfter.test(after);
|
|
83
|
+
if (!labelled && !companySize && !currencies.length)
|
|
84
|
+
continue;
|
|
85
|
+
const parsed = amount(value, scale);
|
|
86
|
+
if ((currencies.length && !euro) || /[-−]\s*$/.test(before) || parsed === undefined
|
|
87
|
+
|| rangeAfter.test(after) || /^\s*[0-9]/.test(after)
|
|
88
|
+
|| (!currencies.length && (foreignCodeSuffix.test(after) || foreignSuffix.test(after)))) {
|
|
89
|
+
if (labelled || companySize)
|
|
90
|
+
unresolved = true;
|
|
91
|
+
continue;
|
|
92
|
+
}
|
|
93
|
+
if (labelled || companySize)
|
|
94
|
+
revenues.push(parsed);
|
|
95
|
+
else
|
|
96
|
+
otherAmounts.push(parsed);
|
|
97
|
+
}
|
|
98
|
+
const distinct = new Set(revenues);
|
|
99
|
+
if (unresolved || distinct.size !== 1)
|
|
100
|
+
return undefined;
|
|
101
|
+
const revenue = revenues[0];
|
|
102
|
+
return otherAmounts.some((value) => value !== revenue) ? undefined : revenue;
|
|
103
|
+
}
|
|
104
|
+
//#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AAC;YAC/C,SAAS;QACX,CAAC;QACD,IAAI,QAAQ,IAAI,WAAW;YAAE,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;;YAC9C,YAAY,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACjC,CAAC;IAED,MAAM,QAAQ,GAAG,IAAI,GAAG,CAAC,QAAQ,CAAC,CAAC;IACnC,IAAI,UAAU,IAAI,QAAQ,CAAC,IAAI,KAAK,CAAC;QAAE,OAAO,SAAS,CAAC;IACxD,MAAM,OAAO,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;IAC5B,OAAO,YAAY,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,KAAK,OAAO,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,OAAO,CAAC;AAC/E,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"extractRevenue.test.d.ts","sourceRoot":"","sources":["../src/extractRevenue.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import test from 'node:test';
|
|
2
|
+
import assert from 'node:assert/strict';
|
|
3
|
+
import { extractRevenueEur } from './extractRevenue.js';
|
|
4
|
+
test('extractRevenueEur reads common EUR business formats', () => {
|
|
5
|
+
assert.equal(extractRevenueEur('a EUR 300m retailer'), 300_000_000);
|
|
6
|
+
assert.equal(extractRevenueEur('turnover of 1.2 billion'), 1_200_000_000);
|
|
7
|
+
assert.equal(extractRevenueEur('300 million euro retailer'), 300_000_000);
|
|
8
|
+
});
|
|
9
|
+
test('revenue extraction separates company revenue from initiative costs and benefits', () => {
|
|
10
|
+
for (const proposal of [
|
|
11
|
+
'A EUR 250k pilot for a retailer with EUR 300m annual revenue.',
|
|
12
|
+
'Pilot EUR 250k; company annual revenue EUR 300m.',
|
|
13
|
+
'Company revenue EUR 300 million; implementation costs EUR 250k.',
|
|
14
|
+
'Project adds EUR 2m incremental revenue; company revenue is EUR 300m.',
|
|
15
|
+
'Project revenue EUR 2m; company turnover EUR 300m.',
|
|
16
|
+
]) {
|
|
17
|
+
assert.equal(extractRevenueEur(proposal), 300_000_000, proposal);
|
|
18
|
+
}
|
|
19
|
+
for (const proposal of [
|
|
20
|
+
'Pilot cost EUR 250k; annual operating cost EUR 50k.',
|
|
21
|
+
'Company revenue is undisclosed; project budget EUR 250k.',
|
|
22
|
+
'We expect EUR 2m incremental revenue from the project.',
|
|
23
|
+
'An investment of EUR 2m in a traditional retailer.',
|
|
24
|
+
'Annual revenue USD 300m; project budget EUR 250k.',
|
|
25
|
+
'Revenue 300 million dollars; a EUR 250k pilot.',
|
|
26
|
+
'Company revenue 300m BRL.',
|
|
27
|
+
'Company revenue 300m rupees.',
|
|
28
|
+
]) {
|
|
29
|
+
assert.equal(extractRevenueEur(proposal), undefined, proposal);
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
test('conflicting amounts require clarification while repeated equivalent revenue resolves', () => {
|
|
33
|
+
for (const proposal of [
|
|
34
|
+
'Annual revenue EUR 300m; annual revenue EUR 400m.',
|
|
35
|
+
'Revenue EUR 300m in 2024 and EUR 350m in 2025.',
|
|
36
|
+
'Revenue EUR 300m EUR 400m.',
|
|
37
|
+
'An EUR 300m retailer and an EUR 400m bank.',
|
|
38
|
+
'Revenue EUR 300m and an unexplained EUR 250k.',
|
|
39
|
+
'Revenue EUR 300-400m.',
|
|
40
|
+
'Revenue EUR 300m to EUR 400m.',
|
|
41
|
+
'Revenue EUR 300m or 400m.',
|
|
42
|
+
]) {
|
|
43
|
+
assert.equal(extractRevenueEur(proposal), undefined, proposal);
|
|
44
|
+
}
|
|
45
|
+
assert.equal(extractRevenueEur('Annual revenue EUR 300m, also reported as EUR 300,000,000.'), 300_000_000);
|
|
46
|
+
});
|
|
47
|
+
test('revenue extraction handles full scales, decimal commas and grouped EUR amounts', () => {
|
|
48
|
+
for (const [proposal, expected] of [
|
|
49
|
+
['A EUR300m retailer.', 300_000_000],
|
|
50
|
+
['Annual revenue EUR 1.5 billion.', 1_500_000_000],
|
|
51
|
+
['Annual revenue EUR 1,5 million.', 1_500_000],
|
|
52
|
+
['Annual revenue EUR 1,500,000.50.', 1_500_001],
|
|
53
|
+
['Annual revenue EUR 1.500.000,50.', 1_500_001],
|
|
54
|
+
['Annual revenue EUR 1 500 000.', 1_500_000],
|
|
55
|
+
['Annual revenue EUR\u202f1\u202f500\u202f000.', 1_500_000],
|
|
56
|
+
['Annual turnover: 2bn.', 2_000_000_000],
|
|
57
|
+
['Annual turnover: EUR 250 thousand.', 250_000],
|
|
58
|
+
['Annual revenue EUR 0.', 0],
|
|
59
|
+
['Annual revenue EUR 300 measured.', 300],
|
|
60
|
+
]) {
|
|
61
|
+
assert.equal(extractRevenueEur(proposal), expected, proposal);
|
|
62
|
+
}
|
|
63
|
+
for (const proposal of [
|
|
64
|
+
'Annual revenue EUR 1,200 million.',
|
|
65
|
+
'Annual revenue EUR 1,20,000.',
|
|
66
|
+
'Annual revenue EUR 12 34 567.',
|
|
67
|
+
'Annual revenue EUR 300m2.',
|
|
68
|
+
'Annual revenue -EUR 300m.',
|
|
69
|
+
'Annual revenue EUR 999999999999999999999 billion.',
|
|
70
|
+
]) {
|
|
71
|
+
assert.equal(extractRevenueEur(proposal), undefined, proposal);
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
test('project-attributed revenue requires a separate company revenue answer', () => {
|
|
75
|
+
for (const proposal of [
|
|
76
|
+
"The pilot's revenue is EUR 2m.",
|
|
77
|
+
'The pilot’s annual revenue is EUR 2m.',
|
|
78
|
+
"The project's annual turnover is EUR 2m.",
|
|
79
|
+
'We expect revenue of EUR 2m from the project.',
|
|
80
|
+
'Revenue EUR 2m attributable to this initiative.',
|
|
81
|
+
'EUR 2m annual revenue generated by the pilot.',
|
|
82
|
+
]) {
|
|
83
|
+
assert.equal(extractRevenueEur(proposal), undefined, proposal);
|
|
84
|
+
assert.equal(extractRevenueEur(proposal + ' Company annual revenue is EUR 300m.'), 300_000_000, proposal);
|
|
85
|
+
}
|
|
86
|
+
assert.equal(extractRevenueEur('A pilot for a retailer with company annual revenue EUR 300m.'), 300_000_000);
|
|
87
|
+
});
|
|
88
|
+
test('monthly and quarterly amounts require annual revenue clarification', () => {
|
|
89
|
+
for (const proposal of [
|
|
90
|
+
'Company monthly revenue is EUR 2m.',
|
|
91
|
+
'Quarterly company revenue: EUR 6m.',
|
|
92
|
+
'Annual revenue EUR 2m monthly.',
|
|
93
|
+
'Revenue EUR 2m per month.',
|
|
94
|
+
'EUR 6m quarterly revenue.',
|
|
95
|
+
'Revenue EUR 6m each quarter.',
|
|
96
|
+
'Revenue EUR 2m/month.',
|
|
97
|
+
'EUR 2m in monthly revenue.',
|
|
98
|
+
]) {
|
|
99
|
+
assert.equal(extractRevenueEur(proposal), undefined, proposal);
|
|
100
|
+
assert.equal(extractRevenueEur(proposal + ' Company annual revenue is EUR 24m.'), 24_000_000, proposal);
|
|
101
|
+
}
|
|
102
|
+
});
|
|
103
|
+
test('foreign currency names are case-insensitive without rejecting ordinary connecting words', () => {
|
|
104
|
+
for (const currency of ['rupees', 'Rupees', 'RUPEES', 'Yen', 'Yuan', 'Renminbi', 'Pounds', 'Dollars']) {
|
|
105
|
+
assert.equal(extractRevenueEur('Company revenue 300m ' + currency + '.'), undefined, currency);
|
|
106
|
+
}
|
|
107
|
+
assert.equal(extractRevenueEur('Company annual revenue 300m and a pilot budget EUR 250k.'), 300_000_000);
|
|
108
|
+
});
|
|
109
|
+
const bank = 'A traditional bank with revenue of EUR 2bn wants autonomous agents in customer service.';
|
|
110
|
+
const retailer = 'A traditional retailer with EUR 300m revenue wants a GenAI assistant for customer service.';
|
|
111
|
+
const allFour = { strategic_alignment: 75, financial_return: 70, change_enablement: 70, governance_risk: 30 };
|
|
112
|
+
const ready = { workflow_redesigned: true, roles_redesigned: true, decision_rights_defined: true, measures_updated: true };
|
|
113
|
+
test('a project budget, two different years or an unlabelled spend never become company revenue', () => {
|
|
114
|
+
assert.equal(extractRevenueEur('A traditional retailer wants a GenAI assistant for customer service with a project budget of EUR 250k.'), undefined);
|
|
115
|
+
assert.equal(extractRevenueEur('A traditional retailer wants a GenAI assistant for customer service. Annual revenue EUR 300m in 2024 and EUR 350m in 2025.'), undefined);
|
|
116
|
+
assert.equal(extractRevenueEur('A traditional retailer wants a EUR 250k GenAI assistant for customer service. Its annual revenue is EUR 300m.'), undefined);
|
|
117
|
+
assert.equal(extractRevenueEur('A traditional retailer wants a GenAI assistant for customer service. Pilot cost EUR 250k; annual revenue EUR 300m.'), 300_000_000);
|
|
118
|
+
});
|
|
119
|
+
//# sourceMappingURL=extractRevenue.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"extractRevenue.test.js","sourceRoot":"","sources":["../src/extractRevenue.test.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,MAAM,MAAM,oBAAoB,CAAC;AACxC,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAExD,IAAI,CAAC,qDAAqD,EAAE,GAAG,EAAE;IAC/D,MAAM,CAAC,KAAK,CAAC,iBAAiB,CAAC,qBAAqB,CAAC,EAAE,WAAW,CAAC,CAAC;IACpE,MAAM,CAAC,KAAK,CAAC,iBAAiB,CAAC,yBAAyB,CAAC,EAAE,aAAa,CAAC,CAAC;IAC1E,MAAM,CAAC,KAAK,CAAC,iBAAiB,CAAC,2BAA2B,CAAC,EAAE,WAAW,CAAC,CAAC;AAC5E,CAAC,CAAC,CAAC;AAEH,IAAI,CAAC,iFAAiF,EAAE,GAAG,EAAE;IAC3F,KAAK,MAAM,QAAQ,IAAI;QACrB,+DAA+D;QAC/D,kDAAkD;QAClD,iEAAiE;QACjE,uEAAuE;QACvE,oDAAoD;KACrD,EAAE,CAAC;QACF,MAAM,CAAC,KAAK,CAAC,iBAAiB,CAAC,QAAQ,CAAC,EAAE,WAAW,EAAE,QAAQ,CA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AE,SAAS,CAAC,CAAC;IAC5J,MAAM,CAAC,KAAK,CAAC,iBAAiB,CAAC,oHAAoH,CAAC,EAAE,WAAW,CAAC,CAAC;AACrK,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The guided questions: at most five, each with four everyday answers and
|
|
3
|
+
* "I do not know yet". Every answer carries a fixed, published score, so a
|
|
4
|
+
* regular user never types a number and the engine never fills one in.
|
|
5
|
+
*
|
|
6
|
+
* Two wordings, one rule set. Organisations under 250 people get questions
|
|
7
|
+
* phrased for an owner; larger ones get questions phrased for an executive.
|
|
8
|
+
* The scores behind the answers, the thresholds and the work redesign gate
|
|
9
|
+
* are identical for both.
|
|
10
|
+
*/
|
|
11
|
+
import type { AssessChoiceId, AssessQuestionId, AssessTrack, PillarScores, WorkArchitectureInput } from './types.js';
|
|
12
|
+
/** Organisations below this headcount get the smaller-firm wording. */
|
|
13
|
+
export declare const SMALLER_FIRM_BELOW = 250;
|
|
14
|
+
export declare const UNKNOWN_LABEL = "I do not know yet.";
|
|
15
|
+
/** The score each answer carries. governance_risk is inverted: higher means more risk. */
|
|
16
|
+
export declare const CHOICE_SCORES: Record<keyof PillarScores, Record<Exclude<AssessChoiceId, 'unknown'>, number>>;
|
|
17
|
+
/** The work redesign answers are cumulative: each one includes the one before. */
|
|
18
|
+
export declare const WORK_ARCHITECTURE_CHOICES: Record<Exclude<AssessChoiceId, 'unknown'>, Required<WorkArchitectureInput>>;
|
|
19
|
+
interface Wording {
|
|
20
|
+
question: string;
|
|
21
|
+
a: string;
|
|
22
|
+
b: string;
|
|
23
|
+
c: string;
|
|
24
|
+
d: string;
|
|
25
|
+
}
|
|
26
|
+
export declare const QUESTION_WHY: Record<AssessQuestionId, string>;
|
|
27
|
+
export declare const WORDING: Record<AssessTrack, Record<AssessQuestionId, Wording>>;
|
|
28
|
+
export declare function trackFor(employees: number): AssessTrack;
|
|
29
|
+
export {};
|
|
30
|
+
//# sourceMappingURL=guidedQuestions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"guidedQuestions.d.ts","sourceRoot":"","sources":["../src/guidedQuestions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,KAAK,EACV,cAAc,EAAE,gBAAgB,EAAE,WAAW,EAAE,YAAY,EAAE,qBAAqB,EACnF,MAAM,YAAY,CAAC;AAEpB,uEAAuE;AACvE,eAAO,MAAM,kBAAkB,MAAM,CAAC;AAEtC,eAAO,MAAM,aAAa,uBAAuB,CAAC;AAElD,0FAA0F;AAC1F,eAAO,MAAM,aAAa,EAAE,MAAM,CAAC,MAAM,YAAY,EAAE,MAAM,CAAC,OAAO,CAAC,cAAc,EAAE,SAAS,CAAC,EAAE,MAAM,CAAC,CAKxG,CAAC;AAEF,kFAAkF;AAClF,eAAO,MAAM,yBAAyB,EAAE,MAAM,CAAC,OAAO,CAAC,cAAc,EAAE,SAAS,CAAC,EAAE,QAAQ,CAAC,qBAAqB,CAAC,CAKjH,CAAC;AAEF,UAAU,OAAO;IAAG,QAAQ,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE;AAElF,eAAO,MAAM,YAAY,EAAE,MAAM,CAAC,gBAAgB,EAAE,MAAM,CAMzD,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,MAAM,CAAC,WAAW,EAAE,MAAM,CAAC,gBAAgB,EAAE,OAAO,CAAC,CA2E1E,CAAC;AAEF,wBAAgB,QAAQ,CAAC,SAAS,EAAE,MAAM,GAAG,WAAW,CAEvD"}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
/** Organisations below this headcount get the smaller-firm wording. */
|
|
2
|
+
export const SMALLER_FIRM_BELOW = 250;
|
|
3
|
+
export const UNKNOWN_LABEL = 'I do not know yet.';
|
|
4
|
+
/** The score each answer carries. governance_risk is inverted: higher means more risk. */
|
|
5
|
+
export const CHOICE_SCORES = {
|
|
6
|
+
financial_return: { a: 15, b: 40, c: 65, d: 85 },
|
|
7
|
+
governance_risk: { a: 80, b: 55, c: 35, d: 15 },
|
|
8
|
+
strategic_alignment: { a: 20, b: 45, c: 65, d: 85 },
|
|
9
|
+
change_enablement: { a: 20, b: 45, c: 65, d: 85 },
|
|
10
|
+
};
|
|
11
|
+
/** The work redesign answers are cumulative: each one includes the one before. */
|
|
12
|
+
export const WORK_ARCHITECTURE_CHOICES = {
|
|
13
|
+
a: { workflow_redesigned: false, roles_redesigned: false, decision_rights_defined: false, measures_updated: false },
|
|
14
|
+
b: { workflow_redesigned: true, roles_redesigned: false, decision_rights_defined: false, measures_updated: false },
|
|
15
|
+
c: { workflow_redesigned: true, roles_redesigned: true, decision_rights_defined: true, measures_updated: false },
|
|
16
|
+
d: { workflow_redesigned: true, roles_redesigned: true, decision_rights_defined: true, measures_updated: true },
|
|
17
|
+
};
|
|
18
|
+
export const QUESTION_WHY = {
|
|
19
|
+
financial_return: 'A return too thin for the scope stops the initiative on its own.',
|
|
20
|
+
governance_risk: 'Risk that nobody controls stops the initiative on its own.',
|
|
21
|
+
strategic_alignment: 'Accelerate needs a clear link to a result the organisation already tracks.',
|
|
22
|
+
change_enablement: 'Accelerate needs a named owner and funded change work.',
|
|
23
|
+
work_architecture: 'Accelerate needs the work redesigned around the AI, with all four parts shown.',
|
|
24
|
+
};
|
|
25
|
+
export const WORDING = {
|
|
26
|
+
enterprise: {
|
|
27
|
+
financial_return: {
|
|
28
|
+
question: 'What does it cost to build and run, and what does it return each year?',
|
|
29
|
+
a: 'It costs more than it returns.',
|
|
30
|
+
b: 'It roughly breaks even, or the return rests on assumptions nobody has tested.',
|
|
31
|
+
c: 'The return covers the cost within two years, on figures finance has checked.',
|
|
32
|
+
d: 'The return covers the cost within a year, on measured figures.',
|
|
33
|
+
},
|
|
34
|
+
governance_risk: {
|
|
35
|
+
question: 'What could go wrong, and who can stop or override the AI?',
|
|
36
|
+
a: 'It acts on customers, money or regulated decisions, and nobody can stop or override it.',
|
|
37
|
+
b: 'The risks are known, and no named person owns them.',
|
|
38
|
+
c: 'A named person owns the risks, checks its work and can override it.',
|
|
39
|
+
d: 'The controls are tested, a named person can stop it, and its actions are logged and reviewed.',
|
|
40
|
+
},
|
|
41
|
+
strategic_alignment: {
|
|
42
|
+
question: 'Which business result does this move, and by how much?',
|
|
43
|
+
a: 'No business result is named.',
|
|
44
|
+
b: 'A result is named, with no target.',
|
|
45
|
+
c: 'A result the organisation already tracks, with a target and a named executive owner.',
|
|
46
|
+
d: 'A board-level result, with a target, a named owner and a baseline measured today.',
|
|
47
|
+
},
|
|
48
|
+
change_enablement: {
|
|
49
|
+
question: 'Who owns the change, and are the time and budget for it funded?',
|
|
50
|
+
a: 'Nobody owns it.',
|
|
51
|
+
b: 'An owner is named, with no time or budget for the change work.',
|
|
52
|
+
c: 'An owner is named and the change work is funded.',
|
|
53
|
+
d: 'A senior sponsor is active, the owner is named, the change work is funded and the people affected are involved.',
|
|
54
|
+
},
|
|
55
|
+
work_architecture: {
|
|
56
|
+
question: 'What has been redesigned in the work itself before go-live?',
|
|
57
|
+
a: 'Nothing yet. The AI is added to the existing process.',
|
|
58
|
+
b: 'The workflow has been redesigned.',
|
|
59
|
+
c: 'The workflow, the affected roles, and the decision and override rights have been redesigned.',
|
|
60
|
+
d: 'All four: the workflow, the roles, the decision and override rights, and the measures people are judged on.',
|
|
61
|
+
},
|
|
62
|
+
},
|
|
63
|
+
smaller_firm: {
|
|
64
|
+
financial_return: {
|
|
65
|
+
question: 'What does it cost each month, and what does it save or earn?',
|
|
66
|
+
a: 'It costs more than it saves.',
|
|
67
|
+
b: 'About even, or we are estimating.',
|
|
68
|
+
c: 'It pays for itself within two years, on numbers we have checked.',
|
|
69
|
+
d: 'It pays for itself within a year, on numbers we have measured.',
|
|
70
|
+
},
|
|
71
|
+
governance_risk: {
|
|
72
|
+
question: 'What could go wrong, and who can step in?',
|
|
73
|
+
a: 'It deals with customers, money or personal data, and nobody checks it.',
|
|
74
|
+
b: 'We know the risks, and nobody is responsible for them.',
|
|
75
|
+
c: 'One named person is responsible, checks its work and can step in.',
|
|
76
|
+
d: 'It has been tested, one person can switch it off, and what it does is recorded and reviewed.',
|
|
77
|
+
},
|
|
78
|
+
strategic_alignment: {
|
|
79
|
+
question: 'What will be better in the business, and by how much?',
|
|
80
|
+
a: 'We have not said.',
|
|
81
|
+
b: 'We know what should improve, with no target.',
|
|
82
|
+
c: 'One number we already watch, with a target and someone responsible.',
|
|
83
|
+
d: 'The number that matters most to the business, with a target, someone responsible and the figure for today written down.',
|
|
84
|
+
},
|
|
85
|
+
change_enablement: {
|
|
86
|
+
question: 'Who makes this happen, and do they have the time?',
|
|
87
|
+
a: 'Nobody in particular.',
|
|
88
|
+
b: 'Someone is named, on top of their normal job.',
|
|
89
|
+
c: 'Someone is named and has time set aside.',
|
|
90
|
+
d: 'The owner backs it, someone is named with time set aside, and the people who will use it are involved.',
|
|
91
|
+
},
|
|
92
|
+
work_architecture: {
|
|
93
|
+
question: 'What changes in how the work gets done?',
|
|
94
|
+
a: 'Nothing yet. We are adding the AI to how we work today.',
|
|
95
|
+
b: 'We have rewritten the steps of the job.',
|
|
96
|
+
c: 'We have rewritten the steps, who does what, and who decides or overrides.',
|
|
97
|
+
d: 'All four: the steps, who does what, who decides, and how we judge good work.',
|
|
98
|
+
},
|
|
99
|
+
},
|
|
100
|
+
};
|
|
101
|
+
export function trackFor(employees) {
|
|
102
|
+
return employees < SMALLER_FIRM_BELOW ? 'smaller_firm' : 'enterprise';
|
|
103
|
+
}
|
|
104
|
+
//# sourceMappingURL=guidedQuestions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"guidedQuestions.js","sourceRoot":"","sources":["../src/guidedQuestions.ts"],"names":[],"mappings":"AAcA,uEAAuE;AACvE,MAAM,CAAC,MAAM,kBAAk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AQ,EAAE,2CAA2C;YACrD,CAAC,EAAE,wEAAwE;YAC3E,CAAC,EAAE,wDAAwD;YAC3D,CAAC,EAAE,mEAAmE;YACtE,CAAC,EAAE,8FAA8F;SAClG;QACD,mBAAmB,EAAE;YACnB,QAAQ,EAAE,uDAAuD;YACjE,CAAC,EAAE,mBAAmB;YACtB,CAAC,EAAE,8CAA8C;YACjD,CAAC,EAAE,qEAAqE;YACxE,CAAC,EAAE,yHAAyH;SAC7H;QACD,iBAAiB,EAAE;YACjB,QAAQ,EAAE,mDAAmD;YAC7D,CAAC,EAAE,uBAAuB;YAC1B,CAAC,EAAE,+CAA+C;YAClD,CAAC,EAAE,0CAA0C;YAC7C,CAAC,EAAE,wGAAwG;SAC5G;QACD,iBAAiB,EAAE;YACjB,QAAQ,EAAE,yCAAyC;YACnD,CAAC,EAAE,yDAAyD;YAC5D,CAAC,EAAE,yCAAyC;YAC5C,CAAC,EAAE,2EAA2E;YAC9E,CAAC,EAAE,8EAA8E;SAClF;KACF;CACF,CAAC;AAEF,MAAM,UAAU,QAAQ,CAAC,SAAiB;IACxC,OAAO,SAAS,GAAG,kBAAkB,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,YAAY,CAAC;AACxE,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -6,7 +6,8 @@ export { inferReadiness } from './inferReadiness.js';
|
|
|
6
6
|
export { sequencePortfolio } from './sequencePortfolio.js';
|
|
7
7
|
export { assemblePortfolio } from './assemblePortfolio.js';
|
|
8
8
|
export { mapToTaxonomy } from './aliases.js';
|
|
9
|
-
export { assessInitiative, extractRevenueEur } from './assessInitiative.js';
|
|
9
|
+
export { assessInitiative, extractEmployees, extractRevenueEur } from './assessInitiative.js';
|
|
10
|
+
export { CHOICE_SCORES, SMALLER_FIRM_BELOW, WORDING, WORK_ARCHITECTURE_CHOICES } from './guidedQuestions.js';
|
|
10
11
|
export { assessWorkArchitecture } from './workArchitecture.js';
|
|
11
12
|
export { buildAudit, CORE_VERSION } from './audit.js';
|
|
12
13
|
export { bvfSchema } from './schema.js';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EACL,KAAK,EACL,qBAAqB,EACrB,sBAAsB,EACtB,eAAe,EAAE,cAAc,EAC/B,UAAU,EAAE,2BAA2B,EAAE,QAAQ,EAAE,QAAQ,EAAE,iBAAiB,EAAE,cAAc,GAC/F,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,eAAe,EACf,aAAa,EAAE,QAAQ,EAAE,gBAAgB,GAC1C,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EACL,KAAK,EACL,qBAAqB,EACrB,sBAAsB,EACtB,eAAe,EAAE,cAAc,EAC/B,UAAU,EAAE,2BAA2B,EAAE,QAAQ,EAAE,QAAQ,EAAE,iBAAiB,EAAE,cAAc,GAC/F,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,eAAe,EACf,aAAa,EAAE,QAAQ,EAAE,gBAAgB,GAC1C,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC9F,OAAO,EAAE,aAAa,EAAE,kBAAkB,EAAE,OAAO,EAAE,yBAAyB,EAAE,MAAM,sBAAsB,CAAC;AAC7G,OAAO,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAC/D,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,QAAQ,EAAE,SAAS,EAAE,cAAc,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AACvH,mBAAmB,YAAY,CAAC;AAEhC,eAAO,MAAM,WAAW,QAAQ,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -6,7 +6,8 @@ export { inferReadiness } from './inferReadiness.js';
|
|
|
6
6
|
export { sequencePortfolio } from './sequencePortfolio.js';
|
|
7
7
|
export { assemblePortfolio } from './assemblePortfolio.js';
|
|
8
8
|
export { mapToTaxonomy } from './aliases.js';
|
|
9
|
-
export { assessInitiative, extractRevenueEur } from './assessInitiative.js';
|
|
9
|
+
export { assessInitiative, extractEmployees, extractRevenueEur } from './assessInitiative.js';
|
|
10
|
+
export { CHOICE_SCORES, SMALLER_FIRM_BELOW, WORDING, WORK_ARCHITECTURE_CHOICES } from './guidedQuestions.js';
|
|
10
11
|
export { assessWorkArchitecture } from './workArchitecture.js';
|
|
11
12
|
export { buildAudit, CORE_VERSION } from './audit.js';
|
|
12
13
|
export { bvfSchema } from './schema.js';
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EACL,KAAK,EACL,qBAAqB,EACrB,sBAAsB,EACtB,eAAe,EAAE,cAAc,EAC/B,UAAU,EAAE,2BAA2B,EAAE,QAAQ,EAAE,QAAQ,EAAE,iBAAiB,EAAE,cAAc,GAC/F,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,eAAe,EACf,aAAa,EAAE,QAAQ,EAAE,gBAAgB,GAC1C,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EACL,KAAK,EACL,qBAAqB,EACrB,sBAAsB,EACtB,eAAe,EAAE,cAAc,EAC/B,UAAU,EAAE,2BAA2B,EAAE,QAAQ,EAAE,QAAQ,EAAE,iBAAiB,EAAE,cAAc,GAC/F,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,eAAe,EACf,aAAa,EAAE,QAAQ,EAAE,gBAAgB,GAC1C,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC9F,OAAO,EAAE,aAAa,EAAE,kBAAkB,EAAE,OAAO,EAAE,yBAAyB,EAAE,MAAM,sBAAsB,CAAC;AAC7G,OAAO,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAC/D,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,QAAQ,EAAE,SAAS,EAAE,cAAc,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAGvH,MAAM,CAAC,MAAM,WAAW,GAAG,KAAK,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plainLanguage.test.d.ts","sourceRoot":"","sources":["../src/plainLanguage.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Plain-language reading set. Each proposal is written the way a regular
|
|
3
|
+
* user writes one. The reading must be right, or the field must stay open
|
|
4
|
+
* and become a question. A wrong reading is the failure this file exists
|
|
5
|
+
* to prevent: add a case here whenever a user reports one.
|
|
6
|
+
*/
|
|
7
|
+
import test from 'node:test';
|
|
8
|
+
import assert from 'node:assert/strict';
|
|
9
|
+
import { assessInitiative } from './assessInitiative.js';
|
|
10
|
+
import { mapToTaxonomy } from './aliases.js';
|
|
11
|
+
const CASES = [
|
|
12
|
+
{ "proposal": "We are a European retail bank with around 2 billion euros in revenue. We want to deploy autonomous agents in customer service to handle complaints end to end. We are quite hierarchical.", "resolved": { "industry": "financial", "function": "cx", "ai_tier": "gen3" } },
|
|
13
|
+
{ "proposal": "We are a 40-person accountancy firm and we want to use AI to speed up our month-end bookkeeping for clients.", "resolved": { "industry": "professional", "function": "finance", "employees": 40, "track": "smaller_firm" } },
|
|
14
|
+
{ "proposal": "Should we roll out Copilot to our sales team? We're a 15m euro IT services company.", "resolved": { "industry": "technology", "function": "sales", "ai_tier": "gen2" } },
|
|
15
|
+
{ "proposal": "We are a 12 person MSP with revenue of EUR 1.8 million. We want an AI agent to triage helpdesk tickets. We are agile.", "resolved": { "industry": "technology", "function": "cx", "ai_tier": "gen3", "employees": 12, "track": "smaller_firm" } },
|
|
16
|
+
{ "proposal": "Our hospital pharmacy wants to use a chatbot for staff rota questions. Revenue about €300m. Departments mostly work separately.", "resolved": { "industry": "healthcare", "ai_tier": "gen2" } },
|
|
17
|
+
{ "proposal": "A company wants to use AI for invoicing.", "resolved": { "function": "finance" } },
|
|
18
|
+
{ "proposal": "We sell laptops and want a chatbot on our website.", "resolved": { "ai_tier": "gen2" } },
|
|
19
|
+
{ "proposal": "We want AI to help our people write better proposals.", "resolved": {} },
|
|
20
|
+
{ "proposal": "Our contact centre agents spend too long on wrap-up notes. We want GenAI to draft them.", "resolved": { "function": "cx", "ai_tier": "gen2" } },
|
|
21
|
+
{ "proposal": "A law firm with turnover of €8m wants Claude to draft first versions of contracts.", "resolved": { "industry": "professional", "ai_tier": "gen2" } },
|
|
22
|
+
{ "proposal": "We are a software company selling to hospitals and want a copilot for our support team.", "resolved": { "function": "cx", "ai_tier": "gen2" }, "ambiguous": { "industry": ["healthcare", "technology"] } },
|
|
23
|
+
{ "proposal": "We established a pilot last year using ChatGPT for marketing copy.", "resolved": { "function": "sales", "ai_tier": "gen2" } },
|
|
24
|
+
{ "proposal": "Any ideas on using AI in a 30 person architecture practice?", "resolved": { "industry": "professional", "employees": 30, "track": "smaller_firm" } },
|
|
25
|
+
{ "proposal": "We are a slow growing charity with revenue of £4m and want a chatbot for donor questions.", "resolved": { "industry": "nonprofit", "ai_tier": "gen2" } },
|
|
26
|
+
{ "proposal": "Our factory wants predictive maintenance using machine learning.", "resolved": { "industry": "manufacturing" } },
|
|
27
|
+
{ "proposal": "We have €15m in sales and want AI for accounts payable.", "resolved": {}, "ambiguous": { "function": ["finance", "sales"] } },
|
|
28
|
+
{ "proposal": "A logistics company with EUR 80m revenue wants agentic AI for procurement. We are siloed.", "resolved": { "industry": "logistics", "function": "supply", "ai_tier": "gen3" } },
|
|
29
|
+
{ "proposal": "We want to use technology to improve our product.", "resolved": {} },
|
|
30
|
+
{ "proposal": "An insurer, €900m revenue, traditional, wants RPA for claims handling in customer service.", "resolved": { "industry": "financial", "function": "cx", "ai_tier": "gen1" } },
|
|
31
|
+
{ "proposal": "Our council wants a chatbot to answer housing questions from residents.", "resolved": { "industry": "public_sector", "ai_tier": "gen2" } },
|
|
32
|
+
{ "proposal": "A design agency of 9 people wants AI agents to run its social media.", "resolved": { "industry": "creative", "ai_tier": "gen3", "employees": 9, "track": "smaller_firm" } },
|
|
33
|
+
{ "proposal": "We are a regional building society and want AI to check mortgage applications for fraud.", "resolved": { "industry": "financial", "function": "risk" } },
|
|
34
|
+
{ "proposal": "Our university IT helpdesk wants an AI assistant for password resets.", "resolved": { "industry": "education", "function": "it", "ai_tier": "gen2" } },
|
|
35
|
+
{ "proposal": "We run a chain of care homes and want AI to draft care notes.", "resolved": { "industry": "healthcare" } },
|
|
36
|
+
{ "proposal": "A 200 million euro manufacturer wants an AI copilot for its engineers in R&D. Cross-functional teams.", "resolved": { "industry": "manufacturing", "function": "rd", "ai_tier": "gen2" } },
|
|
37
|
+
{ "proposal": "We are a recruitment agency and want AI to screen CVs.", "resolved": { "industry": "professional" } },
|
|
38
|
+
{ "proposal": "Our finance team wants to automate reconciliations with RPA. We are a retailer with revenue of EUR 450m, bureaucratic.", "resolved": { "industry": "retail", "function": "finance", "ai_tier": "gen1" } },
|
|
39
|
+
{ "proposal": "A power company wants autonomous agents to manage grid maintenance schedules.", "resolved": { "industry": "energy", "ai_tier": "gen3" } },
|
|
40
|
+
{ "proposal": "Our pilot budget is €250k for a GenAI assistant in HR. We are a bank.", "resolved": { "industry": "financial", "function": "hr", "ai_tier": "gen2" } },
|
|
41
|
+
{ "proposal": "We are a tech startup, revenue €3m, want AI agents for lead generation.", "resolved": { "industry": "technology", "function": "sales", "ai_tier": "gen3" } },
|
|
42
|
+
{ "proposal": "The business went bankrupt once, so we are careful. We want AI for stock forecasting in our warehouse.", "resolved": { "function": "supply" } },
|
|
43
|
+
{ "proposal": "We want a healthy return from AI in our garden centre shops.", "resolved": {} },
|
|
44
|
+
{ "proposal": "Our platform team wants to automate cloud cost reports.", "resolved": {} },
|
|
45
|
+
{ "proposal": "We are a general contractor in construction, revenue of EUR 60m, and want AI to price tenders.", "resolved": { "industry": "real_estate" } },
|
|
46
|
+
{ "proposal": "A school trust wants an AI assistant for teachers to plan lessons.", "resolved": { "ai_tier": "gen2" } },
|
|
47
|
+
{ "proposal": "We are a marketing agency of 25 people, turnover €3.5m, and want GenAI to write first drafts for clients.", "resolved": { "industry": "creative", "ai_tier": "gen2", "employees": 25, "track": "smaller_firm" } },
|
|
48
|
+
{ "proposal": "Our law firm wants autonomous agents to review contracts. Partners decide everything by committee.", "resolved": { "industry": "professional", "ai_tier": "gen3" } },
|
|
49
|
+
{ "proposal": "We want an AI agent for our estate agency to book viewings.", "resolved": { "industry": "real_estate", "ai_tier": "gen3" } },
|
|
50
|
+
{ "proposal": "An NGO wants to use AI to translate field reports.", "resolved": { "industry": "nonprofit" } },
|
|
51
|
+
{ "proposal": "A 500 million euro insurer wants GenAI in claims. Hierarchical.", "resolved": { "industry": "financial", "ai_tier": "gen2" } },
|
|
52
|
+
{ "proposal": "We are a dental clinic with 14 staff and want AI to handle appointment calls.", "resolved": { "industry": "healthcare", "employees": 14, "track": "smaller_firm" } },
|
|
53
|
+
{ "proposal": "Our IT department wants Copilot for all 600 staff. We are a housing association with revenue of €95m.", "resolved": { "industry": "real_estate", "function": "it", "ai_tier": "gen2", "employees": 600, "track": "enterprise" } },
|
|
54
|
+
{ "proposal": "We are a telecom with EUR 4bn revenue and want agentic AI in the call centre. Siloed.", "resolved": { "industry": "technology", "function": "cx", "ai_tier": "gen3" } },
|
|
55
|
+
{ "proposal": "Our growth has stalled. We are a SaaS company with ARR of €6m and want AI in customer support.", "resolved": { "industry": "technology", "function": "cx" } },
|
|
56
|
+
{ "proposal": "We are a family-run haulage firm, 60 drivers, and want AI to plan routes.", "resolved": { "industry": "logistics" } },
|
|
57
|
+
{ "proposal": "A pharma company wants generative AI to speed up regulatory submissions. Revenue €12bn. Matrix organisation.", "resolved": { "industry": "healthcare", "function": "risk", "ai_tier": "gen2" } },
|
|
58
|
+
];
|
|
59
|
+
test('every plain-language proposal is read correctly or left open as a question', () => {
|
|
60
|
+
assert.ok(CASES.length >= 40);
|
|
61
|
+
for (const c of CASES) {
|
|
62
|
+
const r = assessInitiative({ proposal: c.proposal });
|
|
63
|
+
assert.deepEqual(r.resolved_inputs, c.resolved, c.proposal);
|
|
64
|
+
assert.deepEqual(r.ambiguous_fields ?? {}, c.ambiguous ?? {}, c.proposal);
|
|
65
|
+
assert.equal(r.status, r.missing_fields.length ? 'needs_input' : 'needs_confirmation', c.proposal);
|
|
66
|
+
}
|
|
67
|
+
});
|
|
68
|
+
test('a word never matches inside another word', () => {
|
|
69
|
+
assert.equal(mapToTaxonomy({ industry: 'a company' }).industry?.resolved, null);
|
|
70
|
+
assert.equal(mapToTaxonomy({ function: 'laptops' }).function?.resolved, null);
|
|
71
|
+
assert.equal(mapToTaxonomy({ industry: 'we went bankrupt' }).industry?.resolved, null);
|
|
72
|
+
assert.equal(mapToTaxonomy({ industry: 'a healthy business' }).industry?.resolved, null);
|
|
73
|
+
});
|
|
74
|
+
test('the longest phrase wins, so a retail bank is a bank', () => {
|
|
75
|
+
const m = mapToTaxonomy({ industry: 'European retail bank' }).industry;
|
|
76
|
+
assert.equal(m?.resolved, 'financial');
|
|
77
|
+
assert.equal(m?.matched_on, 'retail bank');
|
|
78
|
+
});
|
|
79
|
+
test('wording that points two ways returns no value and names both candidates', () => {
|
|
80
|
+
const m = mapToTaxonomy({ industry: 'a software company selling to hospitals and clinics across Europe' }).industry;
|
|
81
|
+
assert.equal(m?.resolved, null);
|
|
82
|
+
assert.deepEqual(m?.candidates, ['healthcare', 'technology']);
|
|
83
|
+
});
|
|
84
|
+
test('ordinary words count as a short direct answer and never inside a long description', () => {
|
|
85
|
+
assert.equal(mapToTaxonomy({ function: 'people' }).function?.resolved, 'hr');
|
|
86
|
+
assert.equal(mapToTaxonomy({ function: 'we want AI to help our people write better proposals' }).function?.resolved, null);
|
|
87
|
+
assert.equal(mapToTaxonomy({ ai_tier: 'agents' }).ai_tier?.resolved, 'gen3');
|
|
88
|
+
assert.equal(mapToTaxonomy({ ai_tier: 'our contact centre agents spend too long on notes' }).ai_tier?.resolved, null);
|
|
89
|
+
});
|
|
90
|
+
test('a proposal padded with long runs of spaces is read in linear time', () => {
|
|
91
|
+
const padded = `A retailer wants a chatbot. ${`revenue${' '.repeat(20_000)}`.repeat(3)}x`;
|
|
92
|
+
const started = performance.now();
|
|
93
|
+
const r = assessInitiative({ proposal: padded });
|
|
94
|
+
assert.ok(performance.now() - started < 1_000);
|
|
95
|
+
assert.equal(r.resolved_inputs.industry, 'retail');
|
|
96
|
+
});
|
|
97
|
+
//# sourceMappingURL=plainLanguage.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plainLanguage.test.js","sourceRoot":"","sources":["../src/plainLanguage.test.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,MAAM,MAAM,oBAAoB,CAAC;AACxC,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc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