@unclick/mcp-server 0.1.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/README.md +139 -0
- package/dist/amazon-tool.d.ts +5 -0
- package/dist/amazon-tool.d.ts.map +1 -0
- package/dist/amazon-tool.js +307 -0
- package/dist/amazon-tool.js.map +1 -0
- package/dist/bluesky-tool.d.ts +2 -0
- package/dist/bluesky-tool.d.ts.map +1 -0
- package/dist/bluesky-tool.js +368 -0
- package/dist/bluesky-tool.js.map +1 -0
- package/dist/catalog.d.ts +28 -0
- package/dist/catalog.d.ts.map +1 -0
- package/dist/catalog.js +1865 -0
- package/dist/catalog.js.map +1 -0
- package/dist/client.d.ts +12 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +73 -0
- package/dist/client.js.map +1 -0
- package/dist/converter-tools.d.ts +50 -0
- package/dist/converter-tools.d.ts.map +1 -0
- package/dist/converter-tools.js +137 -0
- package/dist/converter-tools.js.map +1 -0
- package/dist/csuite-tool.d.ts +35 -0
- package/dist/csuite-tool.d.ts.map +1 -0
- package/dist/csuite-tool.js +791 -0
- package/dist/csuite-tool.js.map +1 -0
- package/dist/discord-tool.d.ts +8 -0
- package/dist/discord-tool.d.ts.map +1 -0
- package/dist/discord-tool.js +195 -0
- package/dist/discord-tool.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +7 -0
- package/dist/index.js.map +1 -0
- package/dist/local-tools.d.ts +72 -0
- package/dist/local-tools.d.ts.map +1 -0
- package/dist/local-tools.js +563 -0
- package/dist/local-tools.js.map +1 -0
- package/dist/mastodon-tool.d.ts +2 -0
- package/dist/mastodon-tool.d.ts.map +1 -0
- package/dist/mastodon-tool.js +372 -0
- package/dist/mastodon-tool.js.map +1 -0
- package/dist/reddit-tool.d.ts +59 -0
- package/dist/reddit-tool.d.ts.map +1 -0
- package/dist/reddit-tool.js +348 -0
- package/dist/reddit-tool.js.map +1 -0
- package/dist/server.d.ts +4 -0
- package/dist/server.d.ts.map +1 -0
- package/dist/server.js +2337 -0
- package/dist/server.js.map +1 -0
- package/dist/shopify-tool.d.ts +8 -0
- package/dist/shopify-tool.d.ts.map +1 -0
- package/dist/shopify-tool.js +305 -0
- package/dist/shopify-tool.js.map +1 -0
- package/dist/slack-tool.d.ts +2 -0
- package/dist/slack-tool.d.ts.map +1 -0
- package/dist/slack-tool.js +316 -0
- package/dist/slack-tool.js.map +1 -0
- package/dist/telegram-tool.d.ts +7 -0
- package/dist/telegram-tool.d.ts.map +1 -0
- package/dist/telegram-tool.js +297 -0
- package/dist/telegram-tool.js.map +1 -0
- package/dist/vault-tool.d.ts +2 -0
- package/dist/vault-tool.d.ts.map +1 -0
- package/dist/vault-tool.js +395 -0
- package/dist/vault-tool.js.map +1 -0
- package/dist/xero-tool.d.ts +9 -0
- package/dist/xero-tool.d.ts.map +1 -0
- package/dist/xero-tool.js +330 -0
- package/dist/xero-tool.js.map +1 -0
- package/package.json +57 -0
|
@@ -0,0 +1,791 @@
|
|
|
1
|
+
// ─── C-Suite Analysis Tool ────────────────────────────────────────────────────
|
|
2
|
+
// Runs a business scenario through multiple executive perspectives simultaneously.
|
|
3
|
+
// Pure local computation - no API calls, no external deps.
|
|
4
|
+
// ─── Role metadata ─────────────────────────────────────────────────────────────
|
|
5
|
+
const ROLE_META = {
|
|
6
|
+
CEO: { title: "Chief Executive Officer", lens: "strategy, vision, competitive positioning, risk appetite" },
|
|
7
|
+
COO: { title: "Chief Operating Officer", lens: "operational feasibility, resource allocation, process impact, scalability" },
|
|
8
|
+
CTO: { title: "Chief Technology Officer", lens: "technical complexity, tech debt, architecture, build vs buy" },
|
|
9
|
+
CFO: { title: "Chief Financial Officer", lens: "financial impact, ROI, cash flow, budget, runway" },
|
|
10
|
+
CMO: { title: "Chief Marketing Officer", lens: "market positioning, brand impact, customer perception, growth" },
|
|
11
|
+
CIO: { title: "Chief Information Officer", lens: "information systems, data strategy, digital transformation, integration" },
|
|
12
|
+
CHRO: { title: "Chief Human Resources Officer", lens: "people impact, hiring, culture fit, organizational change" },
|
|
13
|
+
CDO: { title: "Chief Data Officer", lens: "data governance, analytics opportunity, compliance, data ethics" },
|
|
14
|
+
CPO: { title: "Chief Product Officer", lens: "product-market fit, UX, feature prioritization, roadmap impact" },
|
|
15
|
+
CSO: { title: "Chief Security Officer", lens: "security implications, threat vectors, compliance, risk mitigation" },
|
|
16
|
+
CCO: { title: "Chief Customer Officer", lens: "customer impact, support burden, satisfaction, retention" },
|
|
17
|
+
CAIO: { title: "Chief AI Officer", lens: "AI/automation opportunity, model feasibility, AI ethics, competitive AI landscape" },
|
|
18
|
+
};
|
|
19
|
+
// ─── Keyword signal extraction ──────────────────────────────────────────────────
|
|
20
|
+
function extractSignals(text) {
|
|
21
|
+
const t = text.toLowerCase();
|
|
22
|
+
const signals = new Set();
|
|
23
|
+
// Cost/financial signals
|
|
24
|
+
if (/\b(cost|price|budget|spend|invest|fund|revenue|profit|margin|burn|runway|roi|payback|expense|savings|capital)\b/.test(t))
|
|
25
|
+
signals.add("financial");
|
|
26
|
+
// Growth/scale signals
|
|
27
|
+
if (/\b(scale|grow|expand|launch|enter|market|acquire|onboard|users?|customers?|revenue|sales)\b/.test(t))
|
|
28
|
+
signals.add("growth");
|
|
29
|
+
// Technical/build signals
|
|
30
|
+
if (/\b(build|develop|engineer|code|system|platform|api|infrastructure|stack|migrate|legacy|refactor|deploy|architecture)\b/.test(t))
|
|
31
|
+
signals.add("technical");
|
|
32
|
+
// People/org signals
|
|
33
|
+
if (/\b(hire|team|headcount|culture|layoff|restructure|remote|office|morale|talent|staff|employees?|org|department|manager)\b/.test(t))
|
|
34
|
+
signals.add("people");
|
|
35
|
+
// Security/compliance signals
|
|
36
|
+
if (/\b(security|compliance|privacy|gdpr|hipaa|audit|breach|vulnerability|access|permissions?|regulation|legal|risk|liability)\b/.test(t))
|
|
37
|
+
signals.add("security");
|
|
38
|
+
// Data/AI signals
|
|
39
|
+
if (/\b(data|analytics?|model|ai|machine learning|ml|llm|automat|predict|insight|dashboard|report|metric)\b/.test(t))
|
|
40
|
+
signals.add("data_ai");
|
|
41
|
+
// Customer signals
|
|
42
|
+
if (/\b(customer|user|client|churn|nps|support|satisfaction|onboard|experience|retention|feedback|complaint)\b/.test(t))
|
|
43
|
+
signals.add("customer");
|
|
44
|
+
// Product signals
|
|
45
|
+
if (/\b(feature|product|roadmap|release|launch|mvp|iteration|sprint|backlog|priorit|ux|design|interface)\b/.test(t))
|
|
46
|
+
signals.add("product");
|
|
47
|
+
// Speed/urgency signals
|
|
48
|
+
if (/\b(urgent|deadline|asap|fast|quick|immediately|now|today|timeline|delay|behind|schedule)\b/.test(t))
|
|
49
|
+
signals.add("urgency");
|
|
50
|
+
// Third-party/vendor signals
|
|
51
|
+
if (/\b(vendor|partner|outsource|contract|saas|tool|integrate|buy|procure|third.party)\b/.test(t))
|
|
52
|
+
signals.add("vendor");
|
|
53
|
+
// Risk signals
|
|
54
|
+
if (/\b(risk|uncertain|unknown|complex|difficult|challenge|problem|issue|blocker|concern|danger)\b/.test(t))
|
|
55
|
+
signals.add("risk");
|
|
56
|
+
// Revenue impact signals
|
|
57
|
+
if (/\b(revenue|monetize|pricing|subscription|tier|freemium|enterprise|deal|contract|upsell|conversion)\b/.test(t))
|
|
58
|
+
signals.add("revenue");
|
|
59
|
+
return signals;
|
|
60
|
+
}
|
|
61
|
+
// ─── Depth helpers ─────────────────────────────────────────────────────────────
|
|
62
|
+
function pick(depth, quick, standard, deep) {
|
|
63
|
+
if (depth === "quick")
|
|
64
|
+
return quick;
|
|
65
|
+
if (depth === "standard")
|
|
66
|
+
return standard;
|
|
67
|
+
return deep;
|
|
68
|
+
}
|
|
69
|
+
// ─── Per-role analysis generators ─────────────────────────────────────────────
|
|
70
|
+
function analyzeCEO(scenario, context, depth, signals, focus) {
|
|
71
|
+
const hasGrowth = signals.has("growth");
|
|
72
|
+
const hasRisk = signals.has("risk");
|
|
73
|
+
const hasFinancial = signals.has("financial");
|
|
74
|
+
const hasTech = signals.has("technical");
|
|
75
|
+
const risks = pick(depth, ["Strategic misalignment with core mission", "Competitor response or market preemption"], [
|
|
76
|
+
"Potential drift from core strategic thesis",
|
|
77
|
+
"Competitor response or first-mover counter",
|
|
78
|
+
"Stakeholder confidence impact if execution stumbles",
|
|
79
|
+
hasFinancial ? "Capital allocation trade-off vs other strategic priorities" : "Opportunity cost against existing roadmap commitments",
|
|
80
|
+
], [
|
|
81
|
+
"Strategic coherence risk - does this reinforce or dilute our positioning?",
|
|
82
|
+
"Competitor preemption or copycat erosion of any advantage",
|
|
83
|
+
"Stakeholder confidence and board alignment",
|
|
84
|
+
"Second-order effects on adjacent business lines",
|
|
85
|
+
hasRisk ? "Downside scenario: what does failure cost strategically, not just financially?" : "Reversibility: can we unwind this if the thesis proves wrong?",
|
|
86
|
+
hasTech ? "Platform dependency risk if this creates a technical moat owned by one vendor or team" : "Execution dependency risk on key people or single points of failure",
|
|
87
|
+
]);
|
|
88
|
+
const opportunities = pick(depth, ["Competitive differentiation", "New market or revenue vector"], [
|
|
89
|
+
hasGrowth ? "Accelerate market share capture in an underserved segment" : "Extend leadership position in current market",
|
|
90
|
+
"Create a defensible moat or switching cost",
|
|
91
|
+
hasTech ? "Technical lead that compounds over time" : "Operational efficiency that widens margin advantage",
|
|
92
|
+
"Narrative and positioning lift for investors, talent, and press",
|
|
93
|
+
], [
|
|
94
|
+
hasGrowth ? "Land-and-expand into adjacent markets with lower CAC" : "Deepen penetration in the core market with a new wedge",
|
|
95
|
+
"Build compounding strategic advantage that is hard to copy",
|
|
96
|
+
"Reframe the competitive conversation on our terms",
|
|
97
|
+
"Create an ecosystem lock-in effect or network value",
|
|
98
|
+
"Unlock a new partnership or M&A leverage point",
|
|
99
|
+
hasFinancial ? "Demonstrate capital efficiency to improve valuation story" : "Attract top-tier talent through visible innovation leadership",
|
|
100
|
+
]);
|
|
101
|
+
const confidence = (hasGrowth && !hasRisk) ? "high" : hasRisk ? "medium" : "high";
|
|
102
|
+
return {
|
|
103
|
+
role: "CEO",
|
|
104
|
+
title: ROLE_META.CEO.title,
|
|
105
|
+
assessment: `From a strategic standpoint, this decision needs to pass three tests: (1) does it strengthen competitive position, (2) does it align with the long-term vision, and (3) does the risk/reward ratio justify the resource commitment? ${hasTech ? "The technical dimension here is a strategic asset or liability depending on execution." : ""} ${hasFinancial ? "The financial profile of this move will shape stakeholder confidence either way." : ""} The CEO lens asks not just whether this is viable, but whether it is the *right* move at the *right* time given everything else in motion.${focus === "growth" ? " Growth framing should be validated against unit economics, not just topline." : focus === "risk" ? " Risk appetite for this should be benchmarked against what the company can absorb without destabilizing core operations." : ""}`,
|
|
106
|
+
risks,
|
|
107
|
+
opportunities,
|
|
108
|
+
recommendation: hasRisk
|
|
109
|
+
? "Proceed with a staged commitment: validate key assumptions with a time-boxed pilot before full resource allocation."
|
|
110
|
+
: "Move forward with clear ownership, a defined success metric, and a 90-day review checkpoint.",
|
|
111
|
+
confidence,
|
|
112
|
+
priority_flags: [
|
|
113
|
+
...(hasRisk ? ["Define the kill switch criteria before starting"] : []),
|
|
114
|
+
...(hasGrowth ? ["Validate ICP fit before scaling spend"] : []),
|
|
115
|
+
"Align leadership team on the strategic rationale before any external announcement",
|
|
116
|
+
],
|
|
117
|
+
};
|
|
118
|
+
}
|
|
119
|
+
function analyzeCOO(scenario, context, depth, signals, focus) {
|
|
120
|
+
const hasUrgency = signals.has("urgency");
|
|
121
|
+
const hasPeople = signals.has("people");
|
|
122
|
+
const hasTech = signals.has("technical");
|
|
123
|
+
const hasVendor = signals.has("vendor");
|
|
124
|
+
const risks = pick(depth, ["Operational capacity strain", "Process gaps under increased load"], [
|
|
125
|
+
"Team bandwidth overextension if this runs in parallel with existing commitments",
|
|
126
|
+
"Process gaps exposed when volume or complexity increases",
|
|
127
|
+
hasVendor ? "Vendor dependency introducing SLA risk into the critical path" : "Coordination overhead between teams slowing delivery",
|
|
128
|
+
hasPeople ? "Change fatigue if the org has absorbed too many shifts recently" : "Undocumented processes that break under scrutiny",
|
|
129
|
+
], [
|
|
130
|
+
"Capacity ceiling: do we have the operational bandwidth to absorb this without degrading core delivery?",
|
|
131
|
+
"Handoff and coordination failures in cross-functional execution",
|
|
132
|
+
hasVendor ? "Vendor SLA vs internal SLA mismatch creating accountability gaps" : "Process documentation debt that compounds as we scale",
|
|
133
|
+
hasPeople ? "Attrition risk among key ops staff who bear the execution burden" : "Knowledge concentration in one team or individual",
|
|
134
|
+
"Quality drift when teams are stretched across multiple priorities",
|
|
135
|
+
hasUrgency ? "Rushed implementation creating technical or process debt paid later" : "Scope creep after kickoff if the brief is not locked",
|
|
136
|
+
]);
|
|
137
|
+
const opportunities = pick(depth, ["Force process standardization and documentation", "Identify automation potential"], [
|
|
138
|
+
"Force standardization and documentation of currently ad-hoc processes",
|
|
139
|
+
"Identify bottlenecks that limit throughput - and fix them under this initiative",
|
|
140
|
+
hasVendor ? "Evaluate whether vendor can absorb capacity spikes better than internal build" : "Build repeatable playbooks that scale without proportional headcount growth",
|
|
141
|
+
"Improve cross-team coordination structures that benefit all future projects",
|
|
142
|
+
], [
|
|
143
|
+
"Use this as a forcing function to clean up operational tech debt",
|
|
144
|
+
"Build scalable process infrastructure: runbooks, SLAs, escalation paths",
|
|
145
|
+
hasVendor ? "Negotiate favorable terms now while vendor needs our business" : "Create a center-of-excellence model that multiplies output without linear cost",
|
|
146
|
+
"Establish metrics and dashboards that give leadership real-time operational visibility",
|
|
147
|
+
"Cross-train teams to reduce single-person dependencies",
|
|
148
|
+
"Identify and eliminate the top 3 friction points in the current operating model",
|
|
149
|
+
]);
|
|
150
|
+
return {
|
|
151
|
+
role: "COO",
|
|
152
|
+
title: ROLE_META.COO.title,
|
|
153
|
+
assessment: `The operational lens here focuses on execution realism. Before committing, three questions: (1) What gets de-prioritized to make room for this? (2) What breaks first if load doubles? (3) Who owns this end-to-end with no ambiguity? ${hasUrgency ? "The urgency signal in this scenario creates execution pressure - rushed implementation creates operational debt that is painful to unwind." : ""} ${hasPeople ? "People are the constraint here - plan for capacity before announcing timelines." : "Process is the constraint - the system needs to be ready before the traffic arrives."}${focus === "cost" ? " COO perspective: the true cost includes the operational drag on teams already running at capacity." : ""}`,
|
|
154
|
+
risks,
|
|
155
|
+
opportunities,
|
|
156
|
+
recommendation: hasPeople
|
|
157
|
+
? "Assign a dedicated operational lead with clear authority before any work begins. Do not let this float across teams."
|
|
158
|
+
: "Map the operational dependencies first, then work backwards from the required outcome to set a realistic timeline.",
|
|
159
|
+
confidence: hasUrgency ? "medium" : "high",
|
|
160
|
+
priority_flags: [
|
|
161
|
+
"Assign a single DRI (directly responsible individual) before kickoff",
|
|
162
|
+
...(hasPeople ? ["Audit team capacity before committing to a timeline"] : []),
|
|
163
|
+
...(hasVendor ? ["Validate vendor SLA against your operational requirements"] : []),
|
|
164
|
+
],
|
|
165
|
+
};
|
|
166
|
+
}
|
|
167
|
+
function analyzeCTO(scenario, context, depth, signals, focus) {
|
|
168
|
+
const hasTech = signals.has("technical");
|
|
169
|
+
const hasVendor = signals.has("vendor");
|
|
170
|
+
const hasDataAI = signals.has("data_ai");
|
|
171
|
+
const hasSecurity = signals.has("security");
|
|
172
|
+
const risks = pick(depth, ["Technical debt accumulation", "Integration complexity underestimated"], [
|
|
173
|
+
"Architectural coupling that limits future optionality",
|
|
174
|
+
hasTech ? "Underestimating integration complexity - especially with legacy systems" : "Technology choice that becomes a liability as requirements evolve",
|
|
175
|
+
"Engineering capacity cannibalization affecting existing roadmap",
|
|
176
|
+
hasVendor ? "Vendor lock-in reducing negotiating power and increasing switching cost" : "Build path underestimating long-term maintenance burden",
|
|
177
|
+
], [
|
|
178
|
+
"Architectural decisions made under time pressure that constrain future direction",
|
|
179
|
+
hasTech ? "Hidden integration complexity: legacy system impedance, API contracts, data format mismatches" : "Technology selection driven by familiarity rather than fit-for-purpose analysis",
|
|
180
|
+
"Engineering team context-switching cost - the real cost is invisible in velocity metrics",
|
|
181
|
+
hasVendor ? "Vendor lock-in: once embedded, switching cost often exceeds original build cost" : "Internal build underestimating operational surface area (monitoring, alerting, scaling, on-call)",
|
|
182
|
+
"Tech debt accrual during fast-build phases that blocks future features",
|
|
183
|
+
hasSecurity ? "Security surface area expansion that security team hasn't scoped yet" : "Observability gaps that make production incidents hard to diagnose",
|
|
184
|
+
]);
|
|
185
|
+
const opportunities = pick(depth, ["Modernize architecture on the back of this investment", "Build reusable infrastructure"], [
|
|
186
|
+
"Use this initiative to pay down architectural debt in the affected surface",
|
|
187
|
+
hasVendor ? "Evaluate buy vs build with a clear 3-year TCO model before defaulting to build" : "Build shared platform capabilities that benefit multiple future features",
|
|
188
|
+
hasDataAI ? "Instrument the system for data capture that unlocks future AI/ML capability" : "Introduce abstraction layers that increase future flexibility",
|
|
189
|
+
"Raise the engineering team's capability through exposure to new problem domains",
|
|
190
|
+
], [
|
|
191
|
+
"Rebuild the affected system components on a cleaner architecture using this as justification",
|
|
192
|
+
hasVendor ? "Negotiate a build-vs-buy inflection point: buy now, build later when the volume justifies it" : "Build internal platform capabilities that create compounding leverage across teams",
|
|
193
|
+
hasDataAI ? "Design for data observability from day one - instrument everything, aggregate later" : "Establish clear API contracts and service boundaries that prevent future coupling",
|
|
194
|
+
"Create internal tooling that improves developer experience and reduces toil",
|
|
195
|
+
"Use this as a reference implementation for future architectural standards",
|
|
196
|
+
"Invest in testing infrastructure so this can ship fast without quality regression",
|
|
197
|
+
]);
|
|
198
|
+
return {
|
|
199
|
+
role: "CTO",
|
|
200
|
+
title: ROLE_META.CTO.title,
|
|
201
|
+
assessment: `Technical assessment requires separating the build complexity from the integration complexity - they are different problems. ${hasVendor ? "The build-vs-buy question deserves a disciplined 3-year TCO analysis including migration cost, vendor risk, and the opportunity cost of not building in-house." : "The in-house build path needs honest capacity accounting - not just initial dev time but ongoing ops burden."} ${hasTech ? "The technical surface area here is non-trivial. Architecture decisions made now will constrain options 18-24 months out." : "The technology dimension is secondary to the data and integration challenges."} ${hasDataAI ? "AI/ML features require data infrastructure that is often more work than the model itself." : ""}${focus === "risk" ? " From a technical risk standpoint, the biggest danger is unknown unknowns in system integration - budget for discovery time." : ""}`,
|
|
202
|
+
risks,
|
|
203
|
+
opportunities,
|
|
204
|
+
recommendation: hasVendor
|
|
205
|
+
? "Run a build-vs-buy evaluation with a strict 30-day timeframe. Include 3-year TCO, vendor stability, and data portability in the criteria."
|
|
206
|
+
: "Prototype the highest-uncertainty component first. De-risk the architectural unknowns before committing the full team.",
|
|
207
|
+
confidence: hasTech ? "medium" : "high",
|
|
208
|
+
priority_flags: [
|
|
209
|
+
...(hasTech ? ["Schedule a technical spike to validate the highest-uncertainty assumption"] : []),
|
|
210
|
+
...(hasVendor ? ["Run buy-vs-build analysis before any engineering starts"] : []),
|
|
211
|
+
...(hasSecurity ? ["Loop in security team before architecture is finalized"] : []),
|
|
212
|
+
"Define the performance and scale requirements before any implementation begins",
|
|
213
|
+
],
|
|
214
|
+
};
|
|
215
|
+
}
|
|
216
|
+
function analyzeCFO(scenario, context, depth, signals, focus) {
|
|
217
|
+
const hasFinancial = signals.has("financial");
|
|
218
|
+
const hasGrowth = signals.has("growth");
|
|
219
|
+
const hasRevenue = signals.has("revenue");
|
|
220
|
+
const risks = pick(depth, ["ROI timeline longer than projected", "Budget overrun from scope creep"], [
|
|
221
|
+
"ROI timeline extending beyond planning horizon, creating a funding gap",
|
|
222
|
+
hasGrowth ? "Customer acquisition cost (CAC) rising as the channel scales" : "Costs front-loaded before revenue materializes",
|
|
223
|
+
"Budget overrun from scope expansion during execution",
|
|
224
|
+
"Cash flow impact if upfront investment is larger than projected",
|
|
225
|
+
], [
|
|
226
|
+
"Payback period extending: initial ROI models are almost always optimistic, budget for a 30% overrun",
|
|
227
|
+
hasGrowth ? "CAC inflation as early-channel efficiency doesn't hold at scale" : "Revenue recognition timing mismatch with cost outflow",
|
|
228
|
+
"Hidden costs: integration, training, change management, and ongoing ops are routinely underestimated",
|
|
229
|
+
"Opportunity cost: capital and people deployed here are unavailable for alternatives with potentially better returns",
|
|
230
|
+
hasRevenue ? "Revenue leakage through pricing model weaknesses exposed at scale" : "Margin compression if this creates ongoing variable costs without matching revenue",
|
|
231
|
+
"Foreign exchange or contractual risk if vendors or customers are in multiple currencies",
|
|
232
|
+
]);
|
|
233
|
+
const opportunities = pick(depth, ["New revenue stream or cost reduction", "Improved unit economics at scale"], [
|
|
234
|
+
hasRevenue ? "New revenue stream with incremental margins above current blended average" : "Cost reduction through process automation or vendor consolidation",
|
|
235
|
+
"Improved unit economics as fixed costs amortize across larger volume",
|
|
236
|
+
"Valuation multiple expansion if this moves the company into a higher-value category",
|
|
237
|
+
"Financial data and instrumentation gaps closed, improving forecasting accuracy",
|
|
238
|
+
], [
|
|
239
|
+
hasRevenue ? "Land a new revenue stream with expansion potential and favorable margin profile" : "Structural cost reduction that persists and compounds over time",
|
|
240
|
+
"Unit economics improvement: lower CAC, higher LTV, or both",
|
|
241
|
+
"Reduce revenue concentration risk by diversifying customer base or revenue streams",
|
|
242
|
+
"Financial leverage: use this initiative to renegotiate terms with existing vendors",
|
|
243
|
+
"Demonstrate capital efficiency that improves investor confidence and valuation story",
|
|
244
|
+
"Create financial visibility into a previously opaque cost or revenue area",
|
|
245
|
+
]);
|
|
246
|
+
const confidence = hasFinancial ? "high" : "medium";
|
|
247
|
+
return {
|
|
248
|
+
role: "CFO",
|
|
249
|
+
title: ROLE_META.CFO.title,
|
|
250
|
+
assessment: `The financial framing is straightforward: what is the IRR, what is the payback period, and how does it compare to alternative uses of capital? ${hasFinancial ? "The financial signals in this scenario suggest costs and revenues are both in play - the model needs to be stress-tested under pessimistic assumptions, not just base case." : "Financial impact needs to be modeled explicitly - vague revenue potential is not a financial case."} ${hasGrowth ? "Growth initiatives have a habit of consuming more capital than forecast once CAC at scale is properly modeled." : ""} The CFO view is not just about saying no - it is about making sure the financial case is honest and the downside is bounded.${focus === "cost" ? " Cost focus: map all cost components including hidden ops and integration overhead before approving any budget." : focus === "growth" ? " Growth investment should be tied to specific unit economics targets, not just topline." : ""}`,
|
|
251
|
+
risks,
|
|
252
|
+
opportunities,
|
|
253
|
+
recommendation: "Build a financial model with three scenarios (optimistic, base, pessimistic) before approving budget. Tie any go-ahead to specific financial milestones that trigger continued investment.",
|
|
254
|
+
confidence,
|
|
255
|
+
priority_flags: [
|
|
256
|
+
"Model the downside scenario, not just base case",
|
|
257
|
+
...(hasGrowth ? ["Validate unit economics (CAC, LTV, payback) before scaling spend"] : []),
|
|
258
|
+
"Define financial success metrics and review cadence upfront",
|
|
259
|
+
...(hasRevenue ? ["Confirm revenue recognition timing with accounting before committing"] : []),
|
|
260
|
+
],
|
|
261
|
+
};
|
|
262
|
+
}
|
|
263
|
+
function analyzeCMO(scenario, context, depth, signals, focus) {
|
|
264
|
+
const hasGrowth = signals.has("growth");
|
|
265
|
+
const hasCustomer = signals.has("customer");
|
|
266
|
+
const hasRevenue = signals.has("revenue");
|
|
267
|
+
const risks = pick(depth, ["Brand dilution or mixed message in market", "Misaligned customer expectations"], [
|
|
268
|
+
"Brand message dilution if this creates mixed signals about who we are and who we serve",
|
|
269
|
+
hasCustomer ? "Customer expectation mismatch leading to dissatisfaction at launch" : "Market confusion about the positioning of the new offering vs existing",
|
|
270
|
+
"Competitive response copying the idea faster or cheaper",
|
|
271
|
+
hasRevenue ? "Pricing strategy conflict between new and existing revenue streams" : "Demand generation gap - feature exists but no one knows about it",
|
|
272
|
+
], [
|
|
273
|
+
"Brand coherence risk: each new initiative either reinforces or fragments the brand narrative",
|
|
274
|
+
hasCustomer ? "Customer journey disruption if this changes how people discover, try, or buy" : "Market positioning ambiguity - is this for existing customers, new segments, or both?",
|
|
275
|
+
"Channel conflict if this competes with or undercuts existing revenue paths",
|
|
276
|
+
"Competitive response: incumbents with more resources can clone quickly if the differentiation is shallow",
|
|
277
|
+
"Launch narrative problem: if we can't explain it simply, market adoption will be slow",
|
|
278
|
+
hasRevenue ? "Revenue attribution confusion across marketing and sales as new streams complicate the funnel" : "Content and campaign strategy build time often underestimated in launch plans",
|
|
279
|
+
]);
|
|
280
|
+
const opportunities = pick(depth, ["New growth channel or audience segment", "Brand positioning lift"], [
|
|
281
|
+
hasGrowth ? "Reach a new audience segment currently outside the funnel" : "Deepen engagement and value perception with existing customers",
|
|
282
|
+
"Sharpen the brand story with a concrete, demonstrable proof point",
|
|
283
|
+
"Create content and PR moments that generate organic reach",
|
|
284
|
+
hasRevenue ? "Expand revenue per customer through a new pricing tier or add-on" : "Increase conversion by addressing a specific objection or barrier to purchase",
|
|
285
|
+
], [
|
|
286
|
+
hasGrowth ? "Open a new acquisition channel with better economics than existing ones" : "Create a flywheel: customers become advocates, reducing paid acquisition dependency",
|
|
287
|
+
"Establish category leadership by defining the terms of the conversation",
|
|
288
|
+
"Generate high-quality content marketing assets from the initiative itself",
|
|
289
|
+
"Build community around the new capability, creating ongoing engagement and retention",
|
|
290
|
+
hasRevenue ? "Launch a premium tier or upsell path that monetizes existing engaged users" : "Use launch as a re-engagement moment for lapsed or dormant customers",
|
|
291
|
+
"Create a competitive moat through brand association with the problem being solved",
|
|
292
|
+
]);
|
|
293
|
+
return {
|
|
294
|
+
role: "CMO",
|
|
295
|
+
title: ROLE_META.CMO.title,
|
|
296
|
+
assessment: `Marketing perspective: positioning and timing are as important as the product decision itself. ${hasGrowth ? "Growth requires both reaching new people and converting them - both halves need a plan." : "Deepening existing customer value is often more capital-efficient than acquiring new ones."} ${hasCustomer ? "The customer experience around this needs to be mapped end-to-end - acquisition is only the first step." : ""} The CMO lens is not just about campaigns - it is about making sure the market story is coherent, the launch has a hook, and the narrative reinforces strategic positioning rather than muddying it.${focus === "growth" ? " Growth lens: every marketing dollar should be tied to a measurable acquisition or retention outcome." : ""}`,
|
|
297
|
+
risks,
|
|
298
|
+
opportunities,
|
|
299
|
+
recommendation: hasGrowth
|
|
300
|
+
? "Run a positioning workshop before launch. Define the ICP, the one-line value prop, and the differentiation proof point before building any campaigns."
|
|
301
|
+
: "Develop the customer narrative first, then work backwards to the feature messaging. Customers buy outcomes, not features.",
|
|
302
|
+
confidence: hasCustomer ? "high" : "medium",
|
|
303
|
+
priority_flags: [
|
|
304
|
+
"Define the target audience and messaging hierarchy before building any assets",
|
|
305
|
+
...(hasGrowth ? ["Map the full funnel: awareness, consideration, conversion, and retention"] : []),
|
|
306
|
+
"Align sales and marketing on qualification criteria and handoff process",
|
|
307
|
+
],
|
|
308
|
+
};
|
|
309
|
+
}
|
|
310
|
+
function analyzeCIO(scenario, context, depth, signals, focus) {
|
|
311
|
+
const hasTech = signals.has("technical");
|
|
312
|
+
const hasDataAI = signals.has("data_ai");
|
|
313
|
+
const hasVendor = signals.has("vendor");
|
|
314
|
+
const hasSecurity = signals.has("security");
|
|
315
|
+
const risks = pick(depth, ["Integration complexity with existing systems", "Data silos created"], [
|
|
316
|
+
"Integration debt: new systems rarely integrate cleanly with existing ones on first attempt",
|
|
317
|
+
hasDataAI ? "Data fragmentation creating inconsistent reporting and analytics" : "Shadow IT emerging if official systems don't serve user needs",
|
|
318
|
+
hasVendor ? "Vendor interoperability gaps discovered post-contract" : "Legacy system compatibility constraints limiting what is actually buildable",
|
|
319
|
+
"Digital transformation initiative fatigue if users have been through too many system changes",
|
|
320
|
+
], [
|
|
321
|
+
"Systems integration complexity: every new system touches multiple existing ones in non-obvious ways",
|
|
322
|
+
hasDataAI ? "Data governance breakdown if new data flows are not mapped and managed from day one" : "Information architecture inconsistency creating long-term analytical confusion",
|
|
323
|
+
"User adoption failure: technically correct systems that no one uses create zombie infrastructure",
|
|
324
|
+
hasVendor ? "Vendor ecosystem fragmentation increasing total maintenance burden" : "Internal build creating a long-lived system that becomes next year's legacy problem",
|
|
325
|
+
"API contract brittleness: undocumented or informal integrations break silently",
|
|
326
|
+
hasSecurity ? "Access control complexity when new systems add new permission surfaces" : "Disaster recovery and business continuity gaps in new system design",
|
|
327
|
+
]);
|
|
328
|
+
const opportunities = pick(depth, ["Modernize information architecture", "Consolidate tools and reduce platform sprawl"], [
|
|
329
|
+
"Consolidate fragmented tools into a more coherent information architecture",
|
|
330
|
+
hasDataAI ? "Create a unified data layer that serves analytics, AI, and operations from one source" : "Standardize APIs and integration patterns that benefit all future system work",
|
|
331
|
+
"Reduce IT support burden through better tooling and automation",
|
|
332
|
+
hasVendor ? "Renegotiate the vendor landscape for better pricing and fewer contracts" : "Build internal capability that reduces external dependency over time",
|
|
333
|
+
], [
|
|
334
|
+
"Use this as a catalyst to modernize the information architecture across the affected domain",
|
|
335
|
+
hasDataAI ? "Implement a data mesh or data fabric approach that enables real-time analytics at scale" : "Establish an enterprise integration layer that standardizes how systems communicate",
|
|
336
|
+
"Reduce platform sprawl by consolidating overlapping tools during the transition",
|
|
337
|
+
"Build an internal developer platform that improves velocity for all future digital initiatives",
|
|
338
|
+
"Create a knowledge management layer on top of systems so institutional knowledge survives turnover",
|
|
339
|
+
"Establish clear data ownership and stewardship roles as a structural improvement",
|
|
340
|
+
]);
|
|
341
|
+
return {
|
|
342
|
+
role: "CIO",
|
|
343
|
+
title: ROLE_META.CIO.title,
|
|
344
|
+
assessment: `The information systems lens asks: how does this fit in the existing architecture, what integration work is needed, and what are the data governance implications? ${hasTech ? "Technical implementation here carries significant integration risk - the real complexity is almost always in the connections between systems, not the systems themselves." : ""} ${hasDataAI ? "Data strategy needs to be designed before implementation begins, not retrofitted after." : ""} ${hasVendor ? "New vendor additions increase the total ecosystem complexity - evaluate whether this adds net capability or just net maintenance cost." : ""} The CIO perspective is about long-term information coherence, not just whether the immediate system works.${focus === "risk" ? " Information risk: unmanaged data flows and undocumented integrations are the most common source of operational incidents." : ""}`,
|
|
345
|
+
risks,
|
|
346
|
+
opportunities,
|
|
347
|
+
recommendation: hasTech
|
|
348
|
+
? "Conduct an integration mapping exercise before procurement or build begins. Identify every touchpoint with existing systems and quantify the integration cost."
|
|
349
|
+
: "Define the information architecture requirements before selecting a solution. The solution must fit the architecture, not the other way around.",
|
|
350
|
+
confidence: "medium",
|
|
351
|
+
priority_flags: [
|
|
352
|
+
"Map all integration touchpoints before committing to any solution",
|
|
353
|
+
...(hasDataAI ? ["Define data ownership and governance model on day one"] : []),
|
|
354
|
+
...(hasSecurity ? ["Include information security in the architecture review"] : []),
|
|
355
|
+
],
|
|
356
|
+
};
|
|
357
|
+
}
|
|
358
|
+
function analyzeCHRO(scenario, context, depth, signals, focus) {
|
|
359
|
+
const hasPeople = signals.has("people");
|
|
360
|
+
const hasGrowth = signals.has("growth");
|
|
361
|
+
const hasUrgency = signals.has("urgency");
|
|
362
|
+
const risks = pick(depth, ["Key person dependency and talent gap", "Culture disruption"], [
|
|
363
|
+
hasPeople ? "Key person dependency risk if this relies on one or two critical hires or existing staff" : "Skills gap: required capabilities may not exist internally",
|
|
364
|
+
"Culture mismatch if this requires ways of working that conflict with current norms",
|
|
365
|
+
hasGrowth ? "Hiring market competition driving up cost and time-to-fill for key roles" : "Change fatigue if the organization is already absorbing significant transformation",
|
|
366
|
+
"Manager bandwidth: leaders who own delivery are often not equipped to manage the change simultaneously",
|
|
367
|
+
], [
|
|
368
|
+
hasPeople ? "Single points of failure: if this depends on two or three people and one leaves, the initiative stalls" : "Capability gap requiring hiring that takes 3-6 months minimum to close",
|
|
369
|
+
"Organizational change resistance - the social dynamics of this change need active management",
|
|
370
|
+
hasGrowth ? "Hiring plan is almost always on the critical path but treated as an afterthought in planning" : "Span of control problems as managers are asked to absorb new scope",
|
|
371
|
+
"Compensation equity issues if new hires come in at rates that create internal resentment",
|
|
372
|
+
"Culture dilution risk if growth outpaces culture transmission",
|
|
373
|
+
hasUrgency ? "Rushed hiring decisions create performance and culture problems that take years to resolve" : "Promotion and succession planning gaps exposed when initiative creates new leadership roles",
|
|
374
|
+
]);
|
|
375
|
+
const opportunities = pick(depth, ["Talent development and capability building", "Culture reinforcement through shared initiative"], [
|
|
376
|
+
"Use this initiative to develop internal talent and reduce external hiring dependency over time",
|
|
377
|
+
"Strengthen culture by creating shared purpose and visible wins for the team",
|
|
378
|
+
hasGrowth ? "Build a talent brand that attracts future hires aligned with the growth trajectory" : "Identify high-potential employees by seeing who thrives in the new context",
|
|
379
|
+
"Create new career paths that improve retention of ambitious employees",
|
|
380
|
+
], [
|
|
381
|
+
"Build internal capability that compounds: every person who grows through this becomes a force multiplier",
|
|
382
|
+
"Use this as a culture-building moment: how we handle this shapes the org's identity",
|
|
383
|
+
hasGrowth ? "Establish the hiring infrastructure (sourcing, screening, onboarding) that scales with the company" : "Design org structure proactively rather than reactively as scope expands",
|
|
384
|
+
"Identify and invest in the high-performers who will own the next wave of growth",
|
|
385
|
+
"Create psychological safety structures that allow honest escalation when things are not working",
|
|
386
|
+
"Implement feedback loops so people issues surface early rather than becoming retention problems",
|
|
387
|
+
]);
|
|
388
|
+
return {
|
|
389
|
+
role: "CHRO",
|
|
390
|
+
title: ROLE_META.CHRO.title,
|
|
391
|
+
assessment: `The people dimension is often the longest-lead-time constraint in any initiative. ${hasPeople ? "This scenario has direct people implications - org design, hiring, and change management need to be planned at the same time as the business decision, not after." : "Even initiatives that don't seem people-intensive require someone to own them and teams to execute."} ${hasGrowth ? "Growth without a hiring and development plan is a trajectory toward burnout and churn." : ""} ${hasUrgency ? "Urgency pressure creates bad hiring decisions - the cost of a wrong hire is always higher than the cost of a delay." : ""} The CHRO lens is about ensuring the human system can support the business decision.${focus === "growth" ? " People are the rate-limiting factor in growth - hiring and development plans need to be on the critical path." : ""}`,
|
|
392
|
+
risks,
|
|
393
|
+
opportunities,
|
|
394
|
+
recommendation: hasPeople
|
|
395
|
+
? "Build the org design and hiring plan before locking the delivery timeline. The people plan IS the timeline."
|
|
396
|
+
: "Identify the people dependencies for this initiative and stress-test whether existing staff can absorb the new scope without impacting other commitments.",
|
|
397
|
+
confidence: hasUrgency ? "low" : "medium",
|
|
398
|
+
priority_flags: [
|
|
399
|
+
...(hasPeople ? ["Build hiring plan in parallel with the business case - not after"] : []),
|
|
400
|
+
"Identify the DRI and their capacity before kickoff",
|
|
401
|
+
"Plan the change management communications from the start",
|
|
402
|
+
],
|
|
403
|
+
};
|
|
404
|
+
}
|
|
405
|
+
function analyzeCDO(scenario, context, depth, signals, focus) {
|
|
406
|
+
const hasDataAI = signals.has("data_ai");
|
|
407
|
+
const hasSecurity = signals.has("security");
|
|
408
|
+
const hasTech = signals.has("technical");
|
|
409
|
+
const risks = pick(depth, ["Data quality and governance gaps", "Compliance and privacy exposure"], [
|
|
410
|
+
"Data quality degradation if new sources are added without governance controls",
|
|
411
|
+
hasSecurity ? "Privacy and regulatory compliance exposure if personal data is involved" : "Data lineage gaps creating audit and debugging problems",
|
|
412
|
+
"Analytical blind spots from inconsistent data definitions across teams",
|
|
413
|
+
hasDataAI ? "Model training data bias or leakage if data pipelines are not properly isolated" : "Reporting inconsistency if multiple teams query the same data differently",
|
|
414
|
+
], [
|
|
415
|
+
"Data governance breakdown: ungoverned data creates liability faster than it creates value",
|
|
416
|
+
hasSecurity ? "GDPR/CCPA/HIPAA exposure if PII flows are not mapped and consented correctly" : "Data quality erosion from untested pipelines creating silent analytical errors",
|
|
417
|
+
"Data silos forming as teams instrument independently without coordination",
|
|
418
|
+
"Metadata and lineage gaps making it impossible to audit data origin for compliance",
|
|
419
|
+
hasDataAI ? "AI training data contamination: using production data in models without proper anonymization" : "Analytical model drift as underlying data distributions change without detection",
|
|
420
|
+
"Access control sprawl: every new data source expands the permission management surface",
|
|
421
|
+
]);
|
|
422
|
+
const opportunities = pick(depth, ["New analytical insights from new data source", "Improve data infrastructure maturity"], [
|
|
423
|
+
hasDataAI ? "Create a new training dataset or behavioral signal that improves model performance" : "Instrument a previously unobserved business process and surface new insights",
|
|
424
|
+
"Improve data infrastructure maturity as a by-product of the initiative",
|
|
425
|
+
"Establish data contracts and quality standards that benefit all downstream consumers",
|
|
426
|
+
"Build a competitive advantage from proprietary data that compounds with scale",
|
|
427
|
+
], [
|
|
428
|
+
hasDataAI ? "Create a proprietary data asset that provides a durable AI competitive advantage" : "Build a 360-degree view of a key business entity (customer, product, operation) currently fragmented",
|
|
429
|
+
"Implement a modern data stack component (event streaming, feature store, semantic layer) that benefits all data use cases",
|
|
430
|
+
"Establish data literacy and self-service analytics capabilities that reduce bottlenecks",
|
|
431
|
+
"Create a data product that becomes a revenue or cost-saving asset in its own right",
|
|
432
|
+
"Close the feedback loop between operational data and strategic decision-making",
|
|
433
|
+
"Build ethical AI and data governance frameworks that become a trust differentiator",
|
|
434
|
+
]);
|
|
435
|
+
return {
|
|
436
|
+
role: "CDO",
|
|
437
|
+
title: ROLE_META.CDO.title,
|
|
438
|
+
assessment: `Data governance is not optional at any scale - it is either planned or it is chaos. ${hasDataAI ? "AI and analytics opportunities here are real, but they require clean, governed, and well-documented data to be reliable." : "The data implications of this decision need to be mapped before implementation begins, not discovered in production."} ${hasSecurity ? "Any initiative involving personal or sensitive data needs a privacy impact assessment as a prerequisite, not an afterthought." : ""} The CDO view is that data is an asset with both value and liability dimensions - both must be managed explicitly.${focus === "risk" ? " Data risk: ungoverned data is both a regulatory liability and a source of silent analytical errors that corrupt decisions." : ""}`,
|
|
439
|
+
risks,
|
|
440
|
+
opportunities,
|
|
441
|
+
recommendation: hasSecurity
|
|
442
|
+
? "Conduct a data privacy impact assessment before any implementation. Map all PII flows, storage locations, and access controls."
|
|
443
|
+
: "Define the data schema, ownership, and quality standards before building any data pipelines. Retrofitting governance is 5x the cost of building it in.",
|
|
444
|
+
confidence: hasDataAI ? "high" : "medium",
|
|
445
|
+
priority_flags: [
|
|
446
|
+
...(hasSecurity ? ["Conduct privacy impact assessment before implementation"] : []),
|
|
447
|
+
"Define data ownership and stewardship before pipelines are built",
|
|
448
|
+
...(hasDataAI ? ["Document training data lineage and validation approach upfront"] : []),
|
|
449
|
+
],
|
|
450
|
+
};
|
|
451
|
+
}
|
|
452
|
+
function analyzeCPO(scenario, context, depth, signals, focus) {
|
|
453
|
+
const hasProduct = signals.has("product");
|
|
454
|
+
const hasCustomer = signals.has("customer");
|
|
455
|
+
const hasGrowth = signals.has("growth");
|
|
456
|
+
const risks = pick(depth, ["Product-market fit uncertainty", "Roadmap disruption"], [
|
|
457
|
+
"Product-market fit uncertainty: building without validated demand is the most common product failure mode",
|
|
458
|
+
"Roadmap disruption: adding scope here has a cascade effect on committed deliverables",
|
|
459
|
+
hasCustomer ? "User experience regression if this adds complexity without proportional value" : "Feature complexity that increases cognitive load and reduces product clarity",
|
|
460
|
+
hasGrowth ? "Premature scaling before the core user loop is proven" : "Scope creep under the guise of completeness",
|
|
461
|
+
], [
|
|
462
|
+
"Product-market fit risk: every unvalidated assumption is a potential wasted build",
|
|
463
|
+
"Opportunity cost: this replaces something else on the roadmap - what is not getting built?",
|
|
464
|
+
hasCustomer ? "User experience degradation: adding features without removing complexity is a slow product death" : "Product strategy dilution if this pulls the product in a direction that serves edge cases over core users",
|
|
465
|
+
"Technical product debt: decisions made for speed create constraints that limit future product options",
|
|
466
|
+
hasGrowth ? "Metrics gaming: optimizing for growth metrics that don't represent genuine user value" : "Retention impact: new features often degrade retention of existing users through disruption",
|
|
467
|
+
"Competitive positioning confusion if this blurs what the product is for",
|
|
468
|
+
]);
|
|
469
|
+
const opportunities = pick(depth, ["Deepen user value and engagement", "Expand addressable market"], [
|
|
470
|
+
hasCustomer ? "Deepen the core user value loop in a way that measurably improves retention" : "Address a high-value user job-to-be-done that is currently unserved",
|
|
471
|
+
hasGrowth ? "Expand addressable market by serving an adjacent user segment with similar needs" : "Create a compelling new product surface that increases engagement frequency",
|
|
472
|
+
"Generate a product differentiator that is hard for competitors to copy quickly",
|
|
473
|
+
"Create a platform foundation that unlocks multiple future product capabilities",
|
|
474
|
+
], [
|
|
475
|
+
hasCustomer ? "Close a critical user pain point that is measurably reducing NPS or increasing churn" : "Build toward a product vision that makes the core use case dramatically better",
|
|
476
|
+
hasGrowth ? "Design a growth loop native to the product rather than dependent on paid acquisition" : "Create a 'wow moment' that improves activation and reduces time-to-value for new users",
|
|
477
|
+
"Establish a product moat through accumulated user data, behavior patterns, or network effects",
|
|
478
|
+
"Use this as an opportunity to reduce product complexity while adding net capability",
|
|
479
|
+
"Build the feedback infrastructure to make this iterative rather than a one-shot bet",
|
|
480
|
+
"Create a testable hypothesis framework: define what success looks like before building",
|
|
481
|
+
]);
|
|
482
|
+
return {
|
|
483
|
+
role: "CPO",
|
|
484
|
+
title: ROLE_META.CPO.title,
|
|
485
|
+
assessment: `Product thinking starts with the user problem, not the solution. ${hasCustomer ? "Customer signals are present in this scenario - have those been translated into specific user stories with validated demand?" : "Before building, the product team needs to validate that users actually want this, not just that internal stakeholders think they will."} ${hasGrowth ? "Growth-oriented product work requires a clear theory of how user behavior changes, not just a feature shipping date." : ""} ${hasProduct ? "Roadmap impact needs to be assessed honestly - every addition displaces something else." : ""} The CPO lens is about ruthless prioritization and validated demand.${focus === "growth" ? " Product-led growth requires designing the growth loop into the product itself, not bolting acquisition on afterwards." : ""}`,
|
|
486
|
+
risks,
|
|
487
|
+
opportunities,
|
|
488
|
+
recommendation: hasCustomer
|
|
489
|
+
? "Define the specific user problem and validation method before any design or engineering work begins. Talk to 5 users first."
|
|
490
|
+
: "Write a one-page product brief: problem statement, target user, success metrics, and explicit non-goals. Align the team before building.",
|
|
491
|
+
confidence: hasProduct ? "high" : "medium",
|
|
492
|
+
priority_flags: [
|
|
493
|
+
"Validate user demand with research before committing engineering time",
|
|
494
|
+
"Define the success metric and measurement plan before kickoff",
|
|
495
|
+
...(hasGrowth ? ["Map the full user journey and identify where the growth lever actually sits"] : []),
|
|
496
|
+
],
|
|
497
|
+
};
|
|
498
|
+
}
|
|
499
|
+
function analyzeCSO(scenario, context, depth, signals, focus) {
|
|
500
|
+
const hasSecurity = signals.has("security");
|
|
501
|
+
const hasTech = signals.has("technical");
|
|
502
|
+
const hasDataAI = signals.has("data_ai");
|
|
503
|
+
const hasVendor = signals.has("vendor");
|
|
504
|
+
const risks = pick(depth, ["Expanded attack surface", "Compliance gap"], [
|
|
505
|
+
"Attack surface expansion from new systems, integrations, or data flows",
|
|
506
|
+
hasSecurity ? "Existing compliance obligations may extend to the new scope in non-obvious ways" : "Security review bypassed under time pressure creating latent vulnerabilities",
|
|
507
|
+
hasVendor ? "Third-party vendor security posture not validated before integration" : "Internal development skipping security review to hit deadlines",
|
|
508
|
+
"Incident response complexity increased if new systems are added without documentation",
|
|
509
|
+
], [
|
|
510
|
+
"Attack surface expansion: every new system, integration point, and data store is a new entry vector",
|
|
511
|
+
hasSecurity ? "Regulatory compliance extension: GDPR, SOC2, ISO27001, and sector-specific rules may apply to new scope" : "Security debt accumulation from features shipped without security review",
|
|
512
|
+
hasVendor ? "Third-party risk: vendor breaches can expose your data and customers without your fault" : "Secrets management and credential rotation scope expanding without corresponding controls",
|
|
513
|
+
"Identity and access management complexity: every new system adds new permission surfaces",
|
|
514
|
+
"Supply chain risk if new dependencies (open source or commercial) have undisclosed vulnerabilities",
|
|
515
|
+
hasDataAI ? "AI-specific risks: prompt injection, model poisoning, output manipulation" : "Social engineering surface expansion as more people are onboarded to new systems",
|
|
516
|
+
]);
|
|
517
|
+
const opportunities = pick(depth, ["Security architecture modernization", "Compliance posture improvement"], [
|
|
518
|
+
"Use this initiative to modernize security architecture in the affected domain",
|
|
519
|
+
"Implement zero-trust principles that improve security posture across the board",
|
|
520
|
+
hasSecurity ? "Achieve a compliance certification that unlocks enterprise sales opportunities" : "Build security tooling that reduces toil and improves detection speed",
|
|
521
|
+
"Create a security-by-design culture that prevents vulnerabilities rather than finding them post-deployment",
|
|
522
|
+
], [
|
|
523
|
+
"Security-by-design: building security controls into the architecture from the start costs 10x less than retrofitting",
|
|
524
|
+
hasSecurity ? "Use this to achieve SOC2/ISO27001 certification that removes security as a sales blocker" : "Establish threat modeling as a standard practice for all future initiatives",
|
|
525
|
+
"Implement automated security scanning in CI/CD that catches vulnerabilities before they ship",
|
|
526
|
+
"Build a security observability layer that enables faster incident detection and response",
|
|
527
|
+
"Create clear security policies and training that reduce the human factor risk",
|
|
528
|
+
hasDataAI ? "Establish AI safety guardrails that protect against new threat vectors before they are exploited" : "Consolidate identity management to reduce the permission surface across the organization",
|
|
529
|
+
]);
|
|
530
|
+
return {
|
|
531
|
+
role: "CSO",
|
|
532
|
+
title: ROLE_META.CSO.title,
|
|
533
|
+
assessment: `Security is not a gate to pass at the end - it is a property to design in from the beginning. ${hasSecurity ? "The security signals in this scenario are significant. This needs a formal threat model and risk assessment before implementation." : "Even initiatives without obvious security implications need to be assessed - the ones that seem low-risk are often where the gaps are found."} ${hasVendor ? "Third-party vendor security posture needs validation before any integration - a breach in their system becomes your liability." : ""} ${hasDataAI ? "AI systems introduce novel threat vectors (prompt injection, data extraction, model manipulation) that require specific mitigations." : ""} The CSO lens is about making sure security enables the business rather than blocking it - but that requires honest risk assessment upfront.${focus === "risk" ? " Security risk: the most dangerous vulnerabilities are the ones introduced under time pressure and never reviewed." : ""}`,
|
|
534
|
+
risks,
|
|
535
|
+
opportunities,
|
|
536
|
+
recommendation: hasSecurity
|
|
537
|
+
? "Require a formal threat model and security architecture review before development begins. Define security acceptance criteria alongside functional requirements."
|
|
538
|
+
: "Include security in the design review process. Add a security checkpoint to the delivery workflow - it is much cheaper than a post-launch incident.",
|
|
539
|
+
confidence: hasSecurity ? "high" : "medium",
|
|
540
|
+
priority_flags: [
|
|
541
|
+
"Include security in architecture design before implementation starts",
|
|
542
|
+
...(hasVendor ? ["Complete vendor security assessment before contract signing"] : []),
|
|
543
|
+
...(hasDataAI ? ["Define AI-specific security controls for this use case"] : []),
|
|
544
|
+
...(hasSecurity ? ["Identify applicable compliance frameworks and map requirements to deliverables"] : []),
|
|
545
|
+
],
|
|
546
|
+
};
|
|
547
|
+
}
|
|
548
|
+
function analyzeCCO(scenario, context, depth, signals, focus) {
|
|
549
|
+
const hasCustomer = signals.has("customer");
|
|
550
|
+
const hasGrowth = signals.has("growth");
|
|
551
|
+
const hasProduct = signals.has("product");
|
|
552
|
+
const risks = pick(depth, ["Support burden spike", "Customer churn from experience disruption"], [
|
|
553
|
+
hasCustomer ? "Customer churn if the change creates friction in an already-used workflow" : "Support ticket volume spike from customers who don't understand the change",
|
|
554
|
+
"NPS and satisfaction score degradation during transition periods",
|
|
555
|
+
hasGrowth ? "New customer onboarding complexity increasing time-to-value" : "Existing customer confusion if this changes the product they bought",
|
|
556
|
+
"Customer success team capacity strain absorbing increased support demand",
|
|
557
|
+
], [
|
|
558
|
+
"Churn risk: customers who have built their workflows around the current product will resist disruption",
|
|
559
|
+
"Support surge: even positive changes generate support volume as customers adapt",
|
|
560
|
+
hasCustomer ? "Trust erosion if customers feel this was done to them rather than for them" : "Onboarding complexity increase that raises the barrier for new customers",
|
|
561
|
+
hasGrowth ? "Customer success capacity mismatch if growth outpaces support team scaling" : "Account health degradation as CSMs are distracted by reactive support instead of proactive engagement",
|
|
562
|
+
"Contract renewal risk for enterprise accounts if the change affects their use case",
|
|
563
|
+
"Community and forum sentiment risk if early adopters react negatively and amplify criticism",
|
|
564
|
+
]);
|
|
565
|
+
const opportunities = pick(depth, ["Deepen customer relationships", "Reduce churn and expand retention"], [
|
|
566
|
+
hasCustomer ? "Use the change as a proactive outreach moment to deepen customer relationships" : "Identify and solve a customer pain point that has been reducing retention",
|
|
567
|
+
"Create customer advocacy moments among early adopters who benefit most",
|
|
568
|
+
hasGrowth ? "Design an onboarding experience that accelerates time-to-value for new customers" : "Build customer feedback infrastructure that continuously surfaces issues before they become churn",
|
|
569
|
+
"Strengthen customer success playbooks with new tools or workflows",
|
|
570
|
+
], [
|
|
571
|
+
"Proactive customer communication can convert a potential disruption into a trust-building moment",
|
|
572
|
+
"Use this as an opportunity to identify and invest in the customer segments with highest lifetime value",
|
|
573
|
+
hasCustomer ? "Build a customer advisory board around this change to get early input and create advocates" : "Instrument customer health scoring to identify at-risk accounts before they churn",
|
|
574
|
+
hasGrowth ? "Design onboarding for scale: self-serve flows that reduce CSM load per customer" : "Create a structured success planning process that ties customer goals to product usage",
|
|
575
|
+
"Surface upsell and expansion opportunities uncovered by the change",
|
|
576
|
+
"Build a community platform that lets customers help each other and reduces support cost",
|
|
577
|
+
]);
|
|
578
|
+
return {
|
|
579
|
+
role: "CCO",
|
|
580
|
+
title: ROLE_META.CCO.title,
|
|
581
|
+
assessment: `Customer experience is the leading indicator that financial metrics lag. ${hasCustomer ? "Customer signals here need to be taken seriously - they are telling you something about current satisfaction and risk tolerance for change." : "Even if customers are not directly mentioned, every business decision eventually reaches the customer."} ${hasGrowth ? "Growth means new customers - and new customers need a clear, fast path to value or they churn before they see the product's full capability." : ""} The CCO view is that every internal decision is also a customer decision - the question is whether it is made consciously.${focus === "growth" ? " CCO growth lens: retention is a growth lever. Reducing churn by 5% can have more impact than 20% more acquisition spend." : ""}`,
|
|
582
|
+
risks,
|
|
583
|
+
opportunities,
|
|
584
|
+
recommendation: hasCustomer
|
|
585
|
+
? "Develop a customer communication plan before launch. Proactive communication about changes reduces support volume and churn risk by 40-60%."
|
|
586
|
+
: "Map the customer touchpoints affected by this decision and define the experience for each. Assign customer impact as a first-class success criterion.",
|
|
587
|
+
confidence: hasCustomer ? "high" : "medium",
|
|
588
|
+
priority_flags: [
|
|
589
|
+
"Define the customer communication plan before launch date",
|
|
590
|
+
...(hasCustomer ? ["Identify at-risk accounts and assign proactive outreach owners"] : []),
|
|
591
|
+
"Set support team capacity to absorb expected inquiry spike",
|
|
592
|
+
],
|
|
593
|
+
};
|
|
594
|
+
}
|
|
595
|
+
function analyzeCAIO(scenario, context, depth, signals, focus) {
|
|
596
|
+
const hasDataAI = signals.has("data_ai");
|
|
597
|
+
const hasTech = signals.has("technical");
|
|
598
|
+
const hasSecurity = signals.has("security");
|
|
599
|
+
const hasGrowth = signals.has("growth");
|
|
600
|
+
const risks = pick(depth, ["AI ethics and bias concerns", "Model reliability and hallucination risk"], [
|
|
601
|
+
hasDataAI ? "Model reliability issues (hallucination, inconsistency) in production creating trust erosion" : "AI automation displacing workflows without adequate human oversight",
|
|
602
|
+
"AI ethics and bias concerns if the model reflects or amplifies inequities in training data",
|
|
603
|
+
"Regulatory uncertainty: AI regulation is evolving rapidly and compliance requirements may change mid-implementation",
|
|
604
|
+
hasSecurity ? "AI-specific security vectors: prompt injection, data extraction, model inversion" : "Over-reliance on AI output without sufficient human-in-the-loop controls",
|
|
605
|
+
], [
|
|
606
|
+
hasDataAI ? "Model reliability in production: LLMs and ML models behave differently under edge cases than in test conditions" : "Automation fragility: AI systems that work well in demo conditions often degrade on real-world data distributions",
|
|
607
|
+
"AI ethics surface: bias, fairness, transparency, and explainability requirements vary by use case and jurisdiction",
|
|
608
|
+
"Regulatory exposure: EU AI Act, sector-specific AI rules, and evolving litigation risk create compliance uncertainty",
|
|
609
|
+
"AI dependency risk: if AI capability is core to the product and the model is third-party, the supply chain is fragile",
|
|
610
|
+
hasSecurity ? "Adversarial attack surface: prompt injection, jailbreaking, and data extraction are real and growing threats" : "Human oversight gap: automated systems without escalation paths create accountability voids",
|
|
611
|
+
"Competitive displacement: AI capability is not a static moat - the landscape shifts every 6 months",
|
|
612
|
+
]);
|
|
613
|
+
const opportunities = pick(depth, ["Automate high-volume manual processes", "Build AI-native competitive advantage"], [
|
|
614
|
+
hasDataAI ? "Use AI to automate the high-volume, low-judgment parts of this workflow at 10-100x the throughput" : "Apply AI to a currently manual decision process to improve speed and consistency",
|
|
615
|
+
"Build a proprietary AI capability that creates a competitive moat",
|
|
616
|
+
hasGrowth ? "Use AI to reduce CAC through better targeting and personalization" : "Use AI to reduce operational cost while maintaining or improving quality",
|
|
617
|
+
"Create an AI feedback loop that improves with use and compounds over time",
|
|
618
|
+
], [
|
|
619
|
+
hasDataAI ? "Build a specialized AI capability on top of proprietary data that general models cannot replicate" : "Apply AI to a problem domain where the cost-quality tradeoff vs humans is clearly favorable",
|
|
620
|
+
"Automate the high-volume, routine decisions in this domain to free human judgment for the cases that need it",
|
|
621
|
+
"Create an AI-native product experience that redefines user expectations in the category",
|
|
622
|
+
hasGrowth ? "Personalization and recommendation AI that improves conversion and retention metrics simultaneously" : "Operational AI that identifies inefficiencies and optimizations that humans miss in complex systems",
|
|
623
|
+
"Build an AI evaluation and red-teaming practice that maintains quality as models evolve",
|
|
624
|
+
"Develop AI governance frameworks that become a trust differentiator with enterprise customers",
|
|
625
|
+
]);
|
|
626
|
+
return {
|
|
627
|
+
role: "CAIO",
|
|
628
|
+
title: ROLE_META.CAIO.title,
|
|
629
|
+
assessment: `The AI lens asks two questions: where does AI create disproportionate value here, and where does it create disproportionate risk? ${hasDataAI ? "AI opportunity is real but requires clean data, clear evaluation criteria, and human oversight design - not just a model call." : "AI can likely play a role in this scenario even if it is not obviously an AI problem - the question is where automation creates leverage."} ${hasSecurity ? "AI security is a distinct discipline from traditional security - prompt injection and data extraction attacks require specific mitigations." : ""} The CAIO perspective is that AI capability is moving faster than most organizations can safely absorb - the competitive advantage goes to whoever gets the human-AI collaboration model right, not whoever deploys AI fastest.${focus === "growth" ? " AI growth lever: personalization and automation can compound growth in ways that human-only approaches cannot match at scale." : ""}`,
|
|
630
|
+
risks,
|
|
631
|
+
opportunities,
|
|
632
|
+
recommendation: hasDataAI
|
|
633
|
+
? "Define the evaluation criteria and acceptable error rate before building. For AI features, you need to know what 'good enough' looks like before you can ship responsibly."
|
|
634
|
+
: "Map the decision points in this scenario where AI could provide leverage, then prioritize by value vs risk vs implementation complexity. Start with the highest-confidence, lowest-risk application.",
|
|
635
|
+
confidence: hasDataAI ? "high" : "medium",
|
|
636
|
+
priority_flags: [
|
|
637
|
+
...(hasDataAI ? ["Define model evaluation criteria and acceptable error rates before building"] : []),
|
|
638
|
+
"Design human-in-the-loop escalation paths for AI-driven decisions",
|
|
639
|
+
...(hasSecurity ? ["Conduct AI-specific threat model for prompt injection and data extraction"] : []),
|
|
640
|
+
"Establish AI governance and monitoring from day one, not after launch",
|
|
641
|
+
],
|
|
642
|
+
};
|
|
643
|
+
}
|
|
644
|
+
// ─── Consensus synthesis ──────────────────────────────────────────────────────
|
|
645
|
+
function synthesizeConsensus(perspectives, scenario, depth) {
|
|
646
|
+
// Tally recommendations by action type
|
|
647
|
+
const recommendations = perspectives.map((p) => p.recommendation.toLowerCase());
|
|
648
|
+
const highConfidence = perspectives.filter((p) => p.confidence === "high").length;
|
|
649
|
+
const lowConfidence = perspectives.filter((p) => p.confidence === "low").length;
|
|
650
|
+
const totalConfidence = perspectives.length;
|
|
651
|
+
const cautionSignals = recommendations.filter((r) => /staged|validate|pilot|assess|review|evaluate|first|before|risk|model|test/i.test(r)).length;
|
|
652
|
+
const proceedSignals = recommendations.filter((r) => /proceed|move|forward|build|launch|implement|execute/i.test(r)).length;
|
|
653
|
+
const overallConfidence = lowConfidence >= 2 ? "low" :
|
|
654
|
+
highConfidence >= Math.ceil(totalConfidence * 0.6) ? "high" :
|
|
655
|
+
"medium";
|
|
656
|
+
// Find common priority flags
|
|
657
|
+
const allFlags = perspectives.flatMap((p) => p.priority_flags);
|
|
658
|
+
const flagCounts = {};
|
|
659
|
+
for (const f of allFlags) {
|
|
660
|
+
const key = f.toLowerCase().replace(/[^a-z ]/g, "").trim().split(" ").slice(0, 4).join(" ");
|
|
661
|
+
flagCounts[key] = (flagCounts[key] ?? 0) + 1;
|
|
662
|
+
}
|
|
663
|
+
// Common agreement points (themes appearing across multiple perspectives)
|
|
664
|
+
const agreementPoints = [];
|
|
665
|
+
const disagreementPoints = [];
|
|
666
|
+
// Check for common risk themes
|
|
667
|
+
const allRisks = perspectives.flatMap((p) => p.risks);
|
|
668
|
+
if (perspectives.some((p) => p.priority_flags.some((f) => /single.*responsible|dri|owner/i.test(f)))) {
|
|
669
|
+
agreementPoints.push("Ownership clarity is a prerequisite - multiple perspectives flag the absence of a clear DRI as a risk.");
|
|
670
|
+
}
|
|
671
|
+
if (cautionSignals >= Math.ceil(totalConfidence * 0.5)) {
|
|
672
|
+
agreementPoints.push("Majority of perspectives recommend validation or staged commitment before full resource deployment.");
|
|
673
|
+
}
|
|
674
|
+
if (allRisks.some((r) => /integrat/i.test(r)) && allRisks.filter((r) => /integrat/i.test(r)).length >= 2) {
|
|
675
|
+
agreementPoints.push("Integration complexity is flagged by multiple perspectives as an underestimated risk.");
|
|
676
|
+
}
|
|
677
|
+
if (perspectives.filter((p) => p.confidence === "high").length >= Math.ceil(totalConfidence * 0.5)) {
|
|
678
|
+
agreementPoints.push("More than half of perspectives express high confidence, indicating broad alignment that this is a viable initiative.");
|
|
679
|
+
}
|
|
680
|
+
// Tension points
|
|
681
|
+
if (proceedSignals > 0 && cautionSignals > 0) {
|
|
682
|
+
const proceedRoles = perspectives
|
|
683
|
+
.filter((p) => /proceed|move|forward|build|launch|implement|execute/i.test(p.recommendation))
|
|
684
|
+
.map((p) => p.role)
|
|
685
|
+
.join(", ");
|
|
686
|
+
const cautionRoles = perspectives
|
|
687
|
+
.filter((p) => /staged|validate|pilot|assess|review|evaluate|first|before|risk|model|test/i.test(p.recommendation))
|
|
688
|
+
.map((p) => p.role)
|
|
689
|
+
.join(", ");
|
|
690
|
+
if (proceedRoles && cautionRoles) {
|
|
691
|
+
disagreementPoints.push(`Speed vs rigor tension: ${proceedRoles} lean toward action while ${cautionRoles} recommend validation first.`);
|
|
692
|
+
}
|
|
693
|
+
}
|
|
694
|
+
// Check build vs buy tension
|
|
695
|
+
const buildSignals = perspectives.filter((p) => /internal|build|in.house/i.test(p.recommendation)).length;
|
|
696
|
+
const buySignals = perspectives.filter((p) => /vendor|buy|procure|outsource/i.test(p.recommendation)).length;
|
|
697
|
+
if (buildSignals > 0 && buySignals > 0) {
|
|
698
|
+
disagreementPoints.push("Build vs buy tension present: some perspectives favor internal development while others recommend evaluating vendor solutions.");
|
|
699
|
+
}
|
|
700
|
+
// Overall recommendation
|
|
701
|
+
let overallRec;
|
|
702
|
+
if (cautionSignals >= Math.ceil(totalConfidence * 0.6)) {
|
|
703
|
+
overallRec = "Run a time-boxed validation sprint (2-4 weeks) to de-risk the top 3 assumptions before committing full resources. Define explicit go/no-go criteria at the end of the sprint.";
|
|
704
|
+
}
|
|
705
|
+
else if (proceedSignals >= Math.ceil(totalConfidence * 0.6)) {
|
|
706
|
+
overallRec = "Proceed with full commitment. Assign a DRI, set a 90-day milestone, define success metrics, and establish a regular review cadence to catch issues early.";
|
|
707
|
+
}
|
|
708
|
+
else {
|
|
709
|
+
overallRec = "Proceed with a structured first phase: assign ownership, validate the two highest-uncertainty assumptions, and lock the business case before entering full execution mode.";
|
|
710
|
+
}
|
|
711
|
+
// Critical path
|
|
712
|
+
const criticalPath = (() => {
|
|
713
|
+
const hasPeopleFlag = perspectives.some((p) => p.priority_flags.some((f) => /hire|people|team|capacity/i.test(f)));
|
|
714
|
+
const hasSecurityFlag = perspectives.some((p) => p.priority_flags.some((f) => /security|compliance|privacy/i.test(f)));
|
|
715
|
+
const hasTechFlag = perspectives.some((p) => p.priority_flags.some((f) => /architect|spike|integrat|technical/i.test(f)));
|
|
716
|
+
const hasFinancialFlag = perspectives.some((p) => p.priority_flags.some((f) => /financial|budget|model|cost|roi/i.test(f)));
|
|
717
|
+
if (hasPeopleFlag)
|
|
718
|
+
return "People and organizational readiness - team capacity and hiring timeline is the most commonly flagged rate-limiting factor.";
|
|
719
|
+
if (hasSecurityFlag)
|
|
720
|
+
return "Security and compliance review - flagged as a blocker that cannot be parallelized with implementation.";
|
|
721
|
+
if (hasTechFlag)
|
|
722
|
+
return "Technical architecture validation - resolve the highest-uncertainty technical assumptions before committing the full team.";
|
|
723
|
+
if (hasFinancialFlag)
|
|
724
|
+
return "Financial model validation - the business case needs to be stress-tested before resources are committed.";
|
|
725
|
+
return "Decision alignment - ensure all stakeholders share the same understanding of the problem, success criteria, and constraints before execution begins.";
|
|
726
|
+
})();
|
|
727
|
+
// Watch list
|
|
728
|
+
const watchList = [
|
|
729
|
+
...new Set(perspectives
|
|
730
|
+
.flatMap((p) => p.priority_flags)
|
|
731
|
+
.filter((f) => /before|first|validate|assess|define|map|require/i.test(f))
|
|
732
|
+
.slice(0, depth === "quick" ? 3 : depth === "standard" ? 4 : 6)),
|
|
733
|
+
].slice(0, depth === "quick" ? 3 : depth === "standard" ? 4 : 6);
|
|
734
|
+
return {
|
|
735
|
+
overall_recommendation: overallRec,
|
|
736
|
+
confidence: overallConfidence,
|
|
737
|
+
agreement_points: agreementPoints.length > 0 ? agreementPoints : ["No strong consensus signals detected - perspectives are divergent. Treat this as a decision requiring careful deliberation."],
|
|
738
|
+
disagreement_points: disagreementPoints.length > 0 ? disagreementPoints : ["No significant tension points detected across perspectives."],
|
|
739
|
+
critical_path: criticalPath,
|
|
740
|
+
watch_list: watchList,
|
|
741
|
+
};
|
|
742
|
+
}
|
|
743
|
+
const ROLE_ANALYZERS = {
|
|
744
|
+
CEO: analyzeCEO,
|
|
745
|
+
COO: analyzeCOO,
|
|
746
|
+
CTO: analyzeCTO,
|
|
747
|
+
CFO: analyzeCFO,
|
|
748
|
+
CMO: analyzeCMO,
|
|
749
|
+
CIO: analyzeCIO,
|
|
750
|
+
CHRO: analyzeCHRO,
|
|
751
|
+
CDO: analyzeCDO,
|
|
752
|
+
CPO: analyzeCPO,
|
|
753
|
+
CSO: analyzeCSO,
|
|
754
|
+
CCO: analyzeCCO,
|
|
755
|
+
CAIO: analyzeCAIO,
|
|
756
|
+
};
|
|
757
|
+
const ALL_ROLES = ["CEO", "COO", "CTO", "CFO", "CMO", "CIO", "CHRO", "CDO", "CPO", "CSO", "CCO", "CAIO"];
|
|
758
|
+
const VALID_ROLES = new Set(ALL_ROLES);
|
|
759
|
+
// ─── Main export ───────────────────────────────────────────────────────────────
|
|
760
|
+
export function csuitAnalyze(scenario, options = {}) {
|
|
761
|
+
const depth = options.depth ?? "standard";
|
|
762
|
+
const context = options.context ?? "";
|
|
763
|
+
const focus = options.focus;
|
|
764
|
+
// Resolve requested roles
|
|
765
|
+
let roles;
|
|
766
|
+
if (!options.perspectives || options.perspectives.length === 0) {
|
|
767
|
+
roles = ALL_ROLES;
|
|
768
|
+
}
|
|
769
|
+
else {
|
|
770
|
+
const invalid = options.perspectives.filter((r) => !VALID_ROLES.has(r.toUpperCase()));
|
|
771
|
+
if (invalid.length > 0) {
|
|
772
|
+
throw new Error(`Invalid perspective(s): ${invalid.join(", ")}. Valid options: ${ALL_ROLES.join(", ")}`);
|
|
773
|
+
}
|
|
774
|
+
roles = options.perspectives.map((r) => r.toUpperCase());
|
|
775
|
+
}
|
|
776
|
+
// Extract signals from scenario + context
|
|
777
|
+
const signals = extractSignals(scenario + " " + context);
|
|
778
|
+
// Run each role analyzer
|
|
779
|
+
const perspectives = roles.map((role) => ROLE_ANALYZERS[role](scenario, context, depth, signals, focus));
|
|
780
|
+
// Synthesize consensus
|
|
781
|
+
const consensus = synthesizeConsensus(perspectives, scenario, depth);
|
|
782
|
+
return {
|
|
783
|
+
scenario,
|
|
784
|
+
context: context || undefined,
|
|
785
|
+
depth,
|
|
786
|
+
perspectives_analyzed: perspectives.length,
|
|
787
|
+
perspectives,
|
|
788
|
+
consensus,
|
|
789
|
+
};
|
|
790
|
+
}
|
|
791
|
+
//# sourceMappingURL=csuite-tool.js.map
|