@sonnechasser/ntrp 1.4.6 → 1.4.8
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/index.js +454 -26
- package/dist/mcp/server.js +411 -25
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -232,6 +232,30 @@ function severityLabel(severity) {
|
|
|
232
232
|
return severity.toUpperCase();
|
|
233
233
|
}
|
|
234
234
|
}
|
|
235
|
+
function pickGoverningFinding(findings) {
|
|
236
|
+
if (findings.length === 0) return null;
|
|
237
|
+
return findings.find((f) => f.severity === "critical") ?? findings.find((f) => f.severity === "warning") ?? findings[0] ?? null;
|
|
238
|
+
}
|
|
239
|
+
function findingHeadline(findingText) {
|
|
240
|
+
const trimmed = findingText.trim();
|
|
241
|
+
if (!trimmed) return "";
|
|
242
|
+
const match = trimmed.match(/^(.+?[.!?])(?:\s|$)/);
|
|
243
|
+
return (match?.[1] ?? trimmed.split(/\n/)[0] ?? trimmed).trim();
|
|
244
|
+
}
|
|
245
|
+
function formatTheCallSection(findings) {
|
|
246
|
+
const pick3 = pickGoverningFinding(findings);
|
|
247
|
+
if (!pick3) return "";
|
|
248
|
+
const headline = findingHeadline(pick3.finding);
|
|
249
|
+
if (!headline) return "";
|
|
250
|
+
const alreadyHasDollar = /\$[\d.,]+/.test(headline);
|
|
251
|
+
const dollar = !alreadyHasDollar && pick3.dollar_value != null && pick3.dollar_value > 0 ? `**${formatDollarValue(pick3.dollar_value)}** \u2014 ` : "";
|
|
252
|
+
return [
|
|
253
|
+
"## The Call",
|
|
254
|
+
"",
|
|
255
|
+
`${dollar}${headline}`,
|
|
256
|
+
""
|
|
257
|
+
].join("\n");
|
|
258
|
+
}
|
|
235
259
|
var VITAL_SIGN_LABELS, DOLLAR_LABELS;
|
|
236
260
|
var init_formatters = __esm({
|
|
237
261
|
"src/output/formatters.ts"() {
|
|
@@ -1613,6 +1637,7 @@ function buildSessionContextDoc(file, opts = {}) {
|
|
|
1613
1637
|
lines.push(`- Exchanges: ${exchanges}`);
|
|
1614
1638
|
if (file.summary) lines.push(`- Summary: ${file.summary}`);
|
|
1615
1639
|
if (file.resumed_from) lines.push(`- Resumed from: ${file.resumed_from}`);
|
|
1640
|
+
lines.push("- Packaging: answer-first; recommendations filtered (silent idea-gate on deep/think/strategy)");
|
|
1616
1641
|
lines.push("");
|
|
1617
1642
|
lines.push("## Dataset");
|
|
1618
1643
|
lines.push("");
|
|
@@ -8682,6 +8707,8 @@ KINDS:
|
|
|
8682
8707
|
- "preference": how the user wants analysis done or framed.
|
|
8683
8708
|
- "calibration": a judgment update \u2014 an adjustment to HOW this business should be analyzed. Write it as an applicable rule, e.g. "Enterprise freshness reds here trace to rep coverage gaps, not data hygiene \u2014 cut by owner first" or "This team treats 45 quiet days as normal cadence; don't flag staleness before that." Capture corrections the user made to your reasoning as calibrations, not preferences.
|
|
8684
8709
|
|
|
8710
|
+
AFTER-ACTION LENS (silent \u2014 never name AAR to anyone): prefer items that capture BELIEF that changed, EVIDENCE that forced the change, or the NEXT BET the team should re-check. Calibrations that supersede contradictions are the highest-value distillates.
|
|
8711
|
+
|
|
8685
8712
|
SUPERSEDING (calibrations only): the current calibrations are provided with ids. If the session contradicts or refines one, return the replacement with "supersedes" set to the old id. Never emit a calibration that duplicates an existing one.
|
|
8686
8713
|
|
|
8687
8714
|
EXCLUDE:
|
|
@@ -20719,7 +20746,7 @@ function buildFindingsFindingHint(prefs) {
|
|
|
20719
20746
|
const voice2 = prefs ?? loadVoicePrefs();
|
|
20720
20747
|
const register = voice2.personality === "robotic" ? "STE-100 sentences. No contractions, slang, or filler." : voice2.personality === "composed" ? "Composed consultant sentences. Light contractions OK." : voice2.personality === "casual" ? "Casual consultant sentences. Warm, still short." : "Loose consultant sentences. Personality in the wrap, not the math.";
|
|
20721
20748
|
const roast = voice2.roast === "light" ? "Light roast: what is working, then what to improve." : voice2.roast === "medium" ? "Medium roast: name the miss. No padding." : voice2.roast === "dark" ? "Dark roast: surgical. Verdict + dollar in one breath." : "Heavy roast: maximum roast after the number, never instead of it.";
|
|
20722
|
-
return `Pyramid-shaped, 2-3 sentences: (1) HEADLINE \u2014 verdict + dollar figure in one short sentence (\u226420 words); (2)
|
|
20749
|
+
return `Pyramid-shaped, 2-3 sentences: (1) HEADLINE \u2014 verdict + dollar figure in one short sentence (\u226420 words); (2) DRIVERS \u2014 the one or two distinct, non-overlapping numbers that prove it; (3) SO-WHAT \u2014 the consequence or the action. ${register} ${roast} Keep dollar figures and play names. Do not invent numbers. An executive should be able to repeat sentence 1 from memory.`;
|
|
20723
20750
|
}
|
|
20724
20751
|
function buildFindingsSchemaBlock(prefs) {
|
|
20725
20752
|
const finding = buildFindingsFindingHint(prefs);
|
|
@@ -21401,6 +21428,21 @@ var init_tool_schemas = __esm({
|
|
|
21401
21428
|
required: ["play_id"]
|
|
21402
21429
|
}
|
|
21403
21430
|
},
|
|
21431
|
+
{
|
|
21432
|
+
name: "get_framework_detail",
|
|
21433
|
+
description: "Read a consulting/operating framework pack by id: when to use, vital links, board vs operator cut, kill rules, and full body. The system prompt lists only the catalog \u2014 call this when you need depth before recommending. Never name brand labels (Heilmeier, Minto, TOC, MEDDPICC, \u2026) to the user.",
|
|
21434
|
+
parameters: {
|
|
21435
|
+
type: "object",
|
|
21436
|
+
properties: {
|
|
21437
|
+
framework_id: {
|
|
21438
|
+
type: "string",
|
|
21439
|
+
maxLength: 40,
|
|
21440
|
+
description: "Exact id from the framework catalog, e.g. 'bottleneck', 'packaging', 'aar', 'meddpicc'."
|
|
21441
|
+
}
|
|
21442
|
+
},
|
|
21443
|
+
required: ["framework_id"]
|
|
21444
|
+
}
|
|
21445
|
+
},
|
|
21404
21446
|
{
|
|
21405
21447
|
name: "get_session_brief",
|
|
21406
21448
|
description: "Read the 1-page context brief of a PRIOR session by id or 4-char suffix: status, dataset, scope, computed scores with dollar values, headline metrics, deliverables, and conversation log. Use when the user references earlier work \u2014 'last week we found\u2026', 'compare with the previous analysis', 'what did session 9297 conclude?'. Read-only.",
|
|
@@ -21502,6 +21544,251 @@ var init_tool_arg_validate = __esm({
|
|
|
21502
21544
|
}
|
|
21503
21545
|
});
|
|
21504
21546
|
|
|
21547
|
+
// src/data/frameworks.ts
|
|
21548
|
+
var frameworks_exports = {};
|
|
21549
|
+
__export(frameworks_exports, {
|
|
21550
|
+
FRAMEWORK_PACKS: () => FRAMEWORK_PACKS,
|
|
21551
|
+
PLAY_FRAMEWORK_HOOKS: () => PLAY_FRAMEWORK_HOOKS,
|
|
21552
|
+
buildFrameworkCatalogBlock: () => buildFrameworkCatalogBlock,
|
|
21553
|
+
frameworkIdsForPlay: () => frameworkIdsForPlay,
|
|
21554
|
+
getFrameworkById: () => getFrameworkById,
|
|
21555
|
+
listFrameworkIds: () => listFrameworkIds
|
|
21556
|
+
});
|
|
21557
|
+
function listFrameworkIds() {
|
|
21558
|
+
return FRAMEWORK_PACKS.map((p) => p.id);
|
|
21559
|
+
}
|
|
21560
|
+
function getFrameworkById(id) {
|
|
21561
|
+
return FRAMEWORK_PACKS.find((p) => p.id === id);
|
|
21562
|
+
}
|
|
21563
|
+
function buildFrameworkCatalogBlock() {
|
|
21564
|
+
const lines = FRAMEWORK_PACKS.filter((p) => p.always_on_catalog).map((p) => p.catalog_line);
|
|
21565
|
+
return `FRAMEWORK TOOLKIT (silent brands \u2014 call get_framework_detail for full body; never name brands to the user):
|
|
21566
|
+
${lines.join("\n")}
|
|
21567
|
+
Optional packs via get_framework_detail: meddpicc, challenger, jtbd, porter, mckinsey_7s, ooda.`;
|
|
21568
|
+
}
|
|
21569
|
+
function frameworkIdsForPlay(playId) {
|
|
21570
|
+
return PLAY_FRAMEWORK_HOOKS[playId] ?? [];
|
|
21571
|
+
}
|
|
21572
|
+
var PLAY_FRAMEWORK_HOOKS, SILENT, FRAMEWORK_PACKS;
|
|
21573
|
+
var init_frameworks = __esm({
|
|
21574
|
+
"src/data/frameworks.ts"() {
|
|
21575
|
+
"use strict";
|
|
21576
|
+
PLAY_FRAMEWORK_HOOKS = {
|
|
21577
|
+
"clean-dead-pipeline": ["bottleneck", "heilmeier", "aar"],
|
|
21578
|
+
"unstick-pipeline": ["bottleneck", "okr_measurability", "owner_shape"],
|
|
21579
|
+
"fix-handoff-gap": ["bottleneck", "owner_shape", "aar"],
|
|
21580
|
+
"retarget-effort": ["bottleneck", "gtm_engineering"],
|
|
21581
|
+
"multi-thread-deals": ["owner_shape", "heilmeier"]
|
|
21582
|
+
};
|
|
21583
|
+
SILENT = "Never name this framework (or DARPA, McKinsey, Goldratt, etc.) in customer-visible text. Apply the moves; keep the brand silent.";
|
|
21584
|
+
FRAMEWORK_PACKS = [
|
|
21585
|
+
{
|
|
21586
|
+
id: "bottleneck",
|
|
21587
|
+
catalog_line: "- bottleneck \u2014 name the constraint vital/stage before prescribing; do not fix non-constraints",
|
|
21588
|
+
internal_name: "Theory of Constraints / bottleneck",
|
|
21589
|
+
always_on_catalog: true,
|
|
21590
|
+
vital_links: ["freshness", "flow_rate", "drop_rate", "signal_to_noise", "thread_depth"],
|
|
21591
|
+
board_cut: "One constraint is gating the dollar outcome. Fixing anything else is theater.",
|
|
21592
|
+
operator_cut: "Locate the gating vital (layer order) or the stage where deals die; put the first play there.",
|
|
21593
|
+
when_to_use: "Before recommending a play or sequencing workstreams.",
|
|
21594
|
+
kill_rules: [
|
|
21595
|
+
"If the recommendation does not move the constraint, demote or drop it.",
|
|
21596
|
+
"Do not prescribe parallel fixes that starve the constraint of capacity."
|
|
21597
|
+
],
|
|
21598
|
+
silent_brand_rule: SILENT,
|
|
21599
|
+
body: `BOTTLENECK (constraint first):
|
|
21600
|
+
- Respect layer gating: freshness trust \u2192 flow/drop movement \u2192 signal efficiency \u2192 thread resilience.
|
|
21601
|
+
- Name the single constraint vital or pipeline stage with its score and dollar label.
|
|
21602
|
+
- Prescribe against the constraint first. Non-constraint work is optional polish.
|
|
21603
|
+
- If two problems compete, pick the one that unblocks the other (dependency), not the louder scorecard row.`
|
|
21604
|
+
},
|
|
21605
|
+
{
|
|
21606
|
+
id: "packaging",
|
|
21607
|
+
catalog_line: "- packaging \u2014 answer first, then situation/complication that make it true, then so-what",
|
|
21608
|
+
internal_name: "Minto pyramid + SCQA sibling",
|
|
21609
|
+
always_on_catalog: true,
|
|
21610
|
+
vital_links: [],
|
|
21611
|
+
board_cut: "Open with the call and the dollar. Context is support, not the lead.",
|
|
21612
|
+
operator_cut: "Headline \u226420 words \u2192 2\u20133 non-overlapping drivers \u2192 owner-shaped so-what.",
|
|
21613
|
+
when_to_use: "Every executive-facing answer, finding, recap Story, summary_30k.",
|
|
21614
|
+
kill_rules: ["Never open with methodology or a full scorecard.", "Merge overlapping drivers."],
|
|
21615
|
+
silent_brand_rule: SILENT,
|
|
21616
|
+
body: `PACKAGING (answer-first):
|
|
21617
|
+
- Governing thought first (verdict + dollars).
|
|
21618
|
+
- Then the situation and complication that make the call true (support, not opener).
|
|
21619
|
+
- Then drivers (distinct, non-overlapping) and so-what / ask.
|
|
21620
|
+
- Brief: one headline + \u22642 drivers + one so-what.`
|
|
21621
|
+
},
|
|
21622
|
+
{
|
|
21623
|
+
id: "aar",
|
|
21624
|
+
catalog_line: "- after-action \u2014 what we believed, what changed, next bet",
|
|
21625
|
+
internal_name: "After Action Review",
|
|
21626
|
+
always_on_catalog: true,
|
|
21627
|
+
vital_links: [],
|
|
21628
|
+
board_cut: "What we thought would move, what the instruments showed, what we bet next.",
|
|
21629
|
+
operator_cut: "Belief \u2192 evidence from vitals/metrics \u2192 keep, kill, or re-sequence the play.",
|
|
21630
|
+
when_to_use: "Strategy review, session distill calibrations, win/miss logging.",
|
|
21631
|
+
kill_rules: ["Do not log vanity narrative without a measured instrument.", "Calibrations supersede; do not pile contradictions."],
|
|
21632
|
+
silent_brand_rule: SILENT,
|
|
21633
|
+
body: `AFTER-ACTION:
|
|
21634
|
+
- BELIEF: what we expected to move (metric + range + check date).
|
|
21635
|
+
- EVIDENCE: what the instruments actually showed (baseline \u2192 reading).
|
|
21636
|
+
- LEARNING: keep, kill, or re-sequence \u2014 write as a calibration when judgment changed.
|
|
21637
|
+
- NEXT BET: the single next exam, not a new multi-week program.`
|
|
21638
|
+
},
|
|
21639
|
+
{
|
|
21640
|
+
id: "owner_shape",
|
|
21641
|
+
catalog_line: "- owner-shape \u2014 function-shaped owner and decision rights; not named people",
|
|
21642
|
+
internal_name: "RACI-lite",
|
|
21643
|
+
always_on_catalog: true,
|
|
21644
|
+
vital_links: [],
|
|
21645
|
+
board_cut: "Every ask names who decides and who executes by function.",
|
|
21646
|
+
operator_cut: "RevOps / AE lead / CS lead / Marketing ops \u2014 R does, A decides; avoid named individuals in plans.",
|
|
21647
|
+
when_to_use: "Workstream titles, handoff plans, play prescriptions.",
|
|
21648
|
+
kill_rules: ["No orphan actions without an accountable function.", "Do not invent headcount or reorgs."],
|
|
21649
|
+
silent_brand_rule: SILENT,
|
|
21650
|
+
body: `OWNER-SHAPE:
|
|
21651
|
+
- Name the function (RevOps, sales manager, CS lead, marketing ops) \u2014 not a person's name from the CRM.
|
|
21652
|
+
- Accountable decides; Responsible executes. Consulted optional; Inform via existing channels.
|
|
21653
|
+
- First action must be startable by that function within 48 hours with no new tooling.`
|
|
21654
|
+
},
|
|
21655
|
+
{
|
|
21656
|
+
id: "okr_measurability",
|
|
21657
|
+
catalog_line: "- exams \u2014 mid-term and final checks as dated key results with instruments",
|
|
21658
|
+
internal_name: "OKR / measurability dialect",
|
|
21659
|
+
always_on_catalog: true,
|
|
21660
|
+
vital_links: ["freshness", "flow_rate", "drop_rate", "signal_to_noise", "thread_depth"],
|
|
21661
|
+
board_cut: "Objective + dated key results the board can re-read next quarter.",
|
|
21662
|
+
operator_cut: "Baseline, target range, check date, measured_by instrument \u2014 or demote to assumption.",
|
|
21663
|
+
when_to_use: "Strategist outcomes, Heilmeier exams, milestones.",
|
|
21664
|
+
kill_rules: ["No 'improve' without a number.", "No exam faster than sales-cycle physics."],
|
|
21665
|
+
silent_brand_rule: SILENT,
|
|
21666
|
+
body: `EXAMS (objective + key results):
|
|
21667
|
+
- Objective = precise end state in one line.
|
|
21668
|
+
- Key results = mid-term check + final exam: metric, baseline, target RANGE, check date, instrument.
|
|
21669
|
+
- If unmeasurable with current data, exclude from targets and record as an assumption.`
|
|
21670
|
+
},
|
|
21671
|
+
{
|
|
21672
|
+
id: "heilmeier",
|
|
21673
|
+
catalog_line: "- idea-gate \u2014 newness, stake, and exams must pass before a recommendation ships",
|
|
21674
|
+
internal_name: "Heilmeier catechism",
|
|
21675
|
+
always_on_catalog: true,
|
|
21676
|
+
vital_links: [],
|
|
21677
|
+
board_cut: "Only recommendations with stake and exams reach the room.",
|
|
21678
|
+
operator_cut: "Kill restatements; demote unmeasurable ideas.",
|
|
21679
|
+
when_to_use: "Deep recommend, think before draft_strategy, strategist Stage C.",
|
|
21680
|
+
kill_rules: ["Fail newness, stake, or exams \u2192 do not recommend."],
|
|
21681
|
+
silent_brand_rule: SILENT,
|
|
21682
|
+
body: `IDEA GATE: end state, status quo + limit, newness, stake + cost of inaction, risks/payoffs, effort, time physics, mid+final exams. Kill on newness/stake/exams failure.`
|
|
21683
|
+
},
|
|
21684
|
+
{
|
|
21685
|
+
id: "minto",
|
|
21686
|
+
catalog_line: "- pyramid \u2014 headline, drivers, so-what for recall",
|
|
21687
|
+
internal_name: "Minto Pyramid Principle",
|
|
21688
|
+
always_on_catalog: true,
|
|
21689
|
+
vital_links: [],
|
|
21690
|
+
board_cut: "Repeatable headline + one number an hour later.",
|
|
21691
|
+
operator_cut: "Same shape for findings and deep answers.",
|
|
21692
|
+
when_to_use: "All packaged analyst prose.",
|
|
21693
|
+
kill_rules: ["Methodology-first openers die."],
|
|
21694
|
+
silent_brand_rule: SILENT,
|
|
21695
|
+
body: `PYRAMID: HEADLINE FIRST \u2192 DRIVERS (non-overlapping) \u2192 SO-WHAT. Recall test. Altitude control.`
|
|
21696
|
+
},
|
|
21697
|
+
{
|
|
21698
|
+
id: "gtm_engineering",
|
|
21699
|
+
catalog_line: "- systems \u2014 data foundation \u2192 modeling \u2192 activation; mechanism per fix",
|
|
21700
|
+
internal_name: "GTM engineering",
|
|
21701
|
+
always_on_catalog: true,
|
|
21702
|
+
vital_links: ["signal_to_noise", "drop_rate", "freshness"],
|
|
21703
|
+
board_cut: "Durable systems, not heroics.",
|
|
21704
|
+
operator_cut: "Pair every cleanup with a mechanism and an instrument.",
|
|
21705
|
+
when_to_use: "When recommending action on tool-capable surfaces.",
|
|
21706
|
+
kill_rules: ["Skipping the rung below will not hold."],
|
|
21707
|
+
silent_brand_rule: SILENT,
|
|
21708
|
+
body: `GTM SYSTEMS: three rungs (foundation \u2192 modeling \u2192 activation); signals over lists; CRM is cheapest pipeline; every fix gets a mechanism; instrument what you change.`
|
|
21709
|
+
},
|
|
21710
|
+
{
|
|
21711
|
+
id: "meddpicc",
|
|
21712
|
+
catalog_line: "- deal-qualification pack (optional) \u2014 use when threading or late-stage risk needs a qualification lens",
|
|
21713
|
+
internal_name: "MEDDPICC",
|
|
21714
|
+
always_on_catalog: false,
|
|
21715
|
+
vital_links: ["thread_depth", "flow_rate"],
|
|
21716
|
+
board_cut: "Late-stage risk is usually missing economic buyer or decision process \u2014 not more activity.",
|
|
21717
|
+
operator_cut: "Map Metrics, Economic buyer, Decision criteria/process, Paper process, Identify pain, Champion, Competition \u2014 as observation, not CRM surgery.",
|
|
21718
|
+
when_to_use: "Thread-depth or stuck late-stage deals when the user asks how to qualify.",
|
|
21719
|
+
kill_rules: ["Do not rewrite the CRM; observe and recommend contacts/process gaps."],
|
|
21720
|
+
silent_brand_rule: SILENT,
|
|
21721
|
+
body: `DEAL QUALIFICATION LENS: use when single-threaded or stuck late-stage deals need a checklist. Prefer introducing a second contact and clarifying decision process over more outbound volume.`
|
|
21722
|
+
},
|
|
21723
|
+
{
|
|
21724
|
+
id: "challenger",
|
|
21725
|
+
catalog_line: "- teach-tailor-take pack (optional) \u2014 pressure-test weak narratives in think",
|
|
21726
|
+
internal_name: "Challenger Sale",
|
|
21727
|
+
always_on_catalog: false,
|
|
21728
|
+
vital_links: ["signal_to_noise"],
|
|
21729
|
+
board_cut: "Insight that reframes the problem beats more activity.",
|
|
21730
|
+
operator_cut: "In think: teach with evidence, tailor to this pipeline, take control of next step \u2014 still stethoscope.",
|
|
21731
|
+
when_to_use: "Think channel when the user is soft on a weak story.",
|
|
21732
|
+
kill_rules: ["Do not turn into a pitch script or CRM sequence builder."],
|
|
21733
|
+
silent_brand_rule: SILENT,
|
|
21734
|
+
body: `TEACH-TAILOR-TAKE: reframe with verified numbers; tailor to segment/motion; land one owner-shaped next step.`
|
|
21735
|
+
},
|
|
21736
|
+
{
|
|
21737
|
+
id: "jtbd",
|
|
21738
|
+
catalog_line: "- job-of-the-metric pack (optional) \u2014 what job this number does for this board",
|
|
21739
|
+
internal_name: "Jobs to be Done",
|
|
21740
|
+
always_on_catalog: false,
|
|
21741
|
+
vital_links: [],
|
|
21742
|
+
board_cut: "Each metric has a job in a decision \u2014 name the job or drop the chart.",
|
|
21743
|
+
operator_cut: "When explaining ARR/NRR/vitals: what decision does this number unlock?",
|
|
21744
|
+
when_to_use: "Metric definitions / board deck framing.",
|
|
21745
|
+
kill_rules: ["Ornamental metrics without a decision job die."],
|
|
21746
|
+
silent_brand_rule: SILENT,
|
|
21747
|
+
body: `JOB OF THE METRIC: for each number, name the decision it serves. If none, cut it from the board package.`
|
|
21748
|
+
},
|
|
21749
|
+
{
|
|
21750
|
+
id: "porter",
|
|
21751
|
+
catalog_line: "- industry-structure pack (optional, weak vital fit) \u2014 only if the user asks competitive structure",
|
|
21752
|
+
internal_name: "Porter Five Forces",
|
|
21753
|
+
always_on_catalog: false,
|
|
21754
|
+
vital_links: [],
|
|
21755
|
+
board_cut: "Industry structure is context, not a substitute for pipeline dollars.",
|
|
21756
|
+
operator_cut: "Do not let industry essays displace vital-sign evidence.",
|
|
21757
|
+
when_to_use: "Only when the user explicitly asks for competitive structure.",
|
|
21758
|
+
kill_rules: ["Never use as a substitute for gating vital diagnosis."],
|
|
21759
|
+
silent_brand_rule: SILENT,
|
|
21760
|
+
body: `INDUSTRY STRUCTURE: optional context. Prefer vital signs and dollars for recommendations.`
|
|
21761
|
+
},
|
|
21762
|
+
{
|
|
21763
|
+
id: "mckinsey_7s",
|
|
21764
|
+
catalog_line: "- org-alignment pack (optional, weak vital fit) \u2014 only if the user asks org design",
|
|
21765
|
+
internal_name: "McKinsey 7S",
|
|
21766
|
+
always_on_catalog: false,
|
|
21767
|
+
vital_links: [],
|
|
21768
|
+
board_cut: "Org redesign is out of stethoscope scope.",
|
|
21769
|
+
operator_cut: "Refuse surgery; observe handoff/ownership symptoms via vitals.",
|
|
21770
|
+
when_to_use: "Only if asked; redirect to owner-shape + bottleneck.",
|
|
21771
|
+
kill_rules: ["No reorg prescriptions."],
|
|
21772
|
+
silent_brand_rule: SILENT,
|
|
21773
|
+
body: `ORG ALIGNMENT: out of scope for CRM surgery. Point to function-shaped owners and the constraint vital instead.`
|
|
21774
|
+
},
|
|
21775
|
+
{
|
|
21776
|
+
id: "ooda",
|
|
21777
|
+
catalog_line: "- observe-orient loop pack (optional) \u2014 overlaps gating; use sparingly",
|
|
21778
|
+
internal_name: "OODA",
|
|
21779
|
+
always_on_catalog: false,
|
|
21780
|
+
vital_links: [],
|
|
21781
|
+
board_cut: "Prefer layer gating and hypothesis-first grounding.",
|
|
21782
|
+
operator_cut: "Already covered by Stage A + bottleneck \u2014 do not duplicate jargon.",
|
|
21783
|
+
when_to_use: "Rarely; prefer existing grounding.",
|
|
21784
|
+
kill_rules: ["Do not invent a parallel loop vocabulary for the user."],
|
|
21785
|
+
silent_brand_rule: SILENT,
|
|
21786
|
+
body: `OBSERVE-ORIENT: prefer NTRP layer gating and Stage A hypothesis-first over a separate combat loop.`
|
|
21787
|
+
}
|
|
21788
|
+
];
|
|
21789
|
+
}
|
|
21790
|
+
});
|
|
21791
|
+
|
|
21505
21792
|
// src/conversation/agent-context.ts
|
|
21506
21793
|
var agent_context_exports = {};
|
|
21507
21794
|
__export(agent_context_exports, {
|
|
@@ -21915,10 +22202,10 @@ function wrapForTarget(target, analysisBlock, conversationBlock, openQuestions,
|
|
|
21915
22202
|
const contextLabel = handoffInstructionPrefix(ctx.analysis.primary);
|
|
21916
22203
|
const forWhom = audiencePhrase(ctx.scope?.audience);
|
|
21917
22204
|
const instructions = {
|
|
21918
|
-
deck: `produce an executive review deck outline for ${company}, framed for ${forWhom}.
|
|
21919
|
-
asana: `produce an Asana project plan with sections and tasks tied to findings for ${forWhom}. Prioritize by dollar impact. Reference metric definitions when a task owner needs to know what "good" looks like.`,
|
|
22205
|
+
deck: `produce an executive review deck outline for ${company}, framed for ${forWhom}. Pyramid structure: (1) HEADLINE \u2014 the governing number and verdict in one line; (2) DRIVERS \u2014 2\u20133 distinct, non-overlapping risks or causes with dollar impact (not a full scorecard); (3) SO-WHAT \u2014 recommended plays with function-shaped owners (RevOps / sales manager / CS \u2014 not personal names); (4) ASKS / decisions the room must make. Optionally one pipeline-health slide after the headline if it supports the call. Use the Metric definitions appendix so every slide can briefly remind the room what the number means for this audience.`,
|
|
22206
|
+
asana: `produce an Asana project plan with sections and tasks tied to findings for ${forWhom}. Prioritize by dollar impact. Assign by function (not personal names). Reference metric definitions when a task owner needs to know what "good" looks like.`,
|
|
21920
22207
|
clay: `produce a Clay table specification to operationalize the highest-impact finding for ${forWhom}.`,
|
|
21921
|
-
plan: `produce a prioritized action plan for ${forWhom} with problem, play, first 3 steps, owner, and leading indicator
|
|
22208
|
+
plan: `produce a prioritized action plan for ${forWhom}, answer-first: open with the governing call (highest-dollar problem / constraint), then items each with problem, play, first 3 steps, function-shaped owner, and leading indicator. Ground indicators in the Metric definitions appendix. End with the sharpest asks / decisions.`
|
|
21922
22209
|
};
|
|
21923
22210
|
const parts = [
|
|
21924
22211
|
`# NTRP handoff \u2192 ${target}`,
|
|
@@ -22280,6 +22567,7 @@ async function handleGetPlayDetail(input) {
|
|
|
22280
22567
|
}
|
|
22281
22568
|
} catch {
|
|
22282
22569
|
}
|
|
22570
|
+
const { frameworkIdsForPlay: frameworkIdsForPlay2 } = await Promise.resolve().then(() => (init_frameworks(), frameworks_exports));
|
|
22283
22571
|
const detail = {
|
|
22284
22572
|
play_id: play.id,
|
|
22285
22573
|
play_name: play.name,
|
|
@@ -22291,7 +22579,8 @@ async function handleGetPlayDetail(input) {
|
|
|
22291
22579
|
tools_that_help: play.tools_that_help,
|
|
22292
22580
|
expected_outcome: play.expected_outcome,
|
|
22293
22581
|
source: play.source ?? "seed",
|
|
22294
|
-
local_track_record: trackRecord
|
|
22582
|
+
local_track_record: trackRecord,
|
|
22583
|
+
framework_ids: frameworkIdsForPlay2(play.id)
|
|
22295
22584
|
};
|
|
22296
22585
|
if (play.source === "learned") {
|
|
22297
22586
|
detail.security_notice = UNTRUSTED_CONTENT_NOTICE;
|
|
@@ -22302,6 +22591,30 @@ async function handleGetPlayDetail(input) {
|
|
|
22302
22591
|
}
|
|
22303
22592
|
return detail;
|
|
22304
22593
|
}
|
|
22594
|
+
async function handleGetFrameworkDetail(input) {
|
|
22595
|
+
const frameworkId = typeof input.framework_id === "string" ? input.framework_id.trim() : "";
|
|
22596
|
+
const { getFrameworkById: getFrameworkById2, listFrameworkIds: listFrameworkIds2 } = await Promise.resolve().then(() => (init_frameworks(), frameworks_exports));
|
|
22597
|
+
const pack = frameworkId ? getFrameworkById2(frameworkId) : void 0;
|
|
22598
|
+
if (!pack) {
|
|
22599
|
+
return {
|
|
22600
|
+
error: `Unknown framework id '${frameworkId}'.`,
|
|
22601
|
+
valid_framework_ids: listFrameworkIds2()
|
|
22602
|
+
};
|
|
22603
|
+
}
|
|
22604
|
+
return {
|
|
22605
|
+
framework_id: pack.id,
|
|
22606
|
+
catalog_line: pack.catalog_line,
|
|
22607
|
+
always_on_catalog: pack.always_on_catalog,
|
|
22608
|
+
vital_links: pack.vital_links,
|
|
22609
|
+
board_cut: pack.board_cut,
|
|
22610
|
+
operator_cut: pack.operator_cut,
|
|
22611
|
+
when_to_use: pack.when_to_use,
|
|
22612
|
+
kill_rules: pack.kill_rules,
|
|
22613
|
+
silent_brand_rule: pack.silent_brand_rule,
|
|
22614
|
+
body: pack.body,
|
|
22615
|
+
notice: "Apply the moves in body/board_cut/operator_cut. Never name internal brand labels to the user."
|
|
22616
|
+
};
|
|
22617
|
+
}
|
|
22305
22618
|
async function handleGetRevenueMetrics(_input, ctx) {
|
|
22306
22619
|
if (!ctx.metrics || ctx.metrics.length === 0) {
|
|
22307
22620
|
const { computeFullMetrics: computeFullMetrics2 } = await Promise.resolve().then(() => (init_compute(), compute_exports));
|
|
@@ -22596,6 +22909,7 @@ var init_tool_handlers = __esm({
|
|
|
22596
22909
|
query_segment_comparison: handleQuerySegmentComparison,
|
|
22597
22910
|
query_entity_counts: (input, _) => handleQueryEntityCounts(input),
|
|
22598
22911
|
get_play_detail: (input, _) => handleGetPlayDetail(input),
|
|
22912
|
+
get_framework_detail: (input, _) => handleGetFrameworkDetail(input),
|
|
22599
22913
|
get_session_brief: (input, _) => handleGetSessionBrief(input),
|
|
22600
22914
|
get_revenue_metrics: handleGetRevenueMetrics,
|
|
22601
22915
|
get_revenue_metrics_timeseries: (input, _) => handleGetRevenueMetricsTimeseries(input),
|
|
@@ -22825,6 +23139,7 @@ ${opts.conversationBlock}
|
|
|
22825
23139
|
const socraticCraft = `HOW YOU THINK WITH THE USER (socratic partner \u2014 not a search box, not a strategist):
|
|
22826
23140
|
- Pre-explore funnel gates are handled by the CLI; you speak in the think channel after analysis.
|
|
22827
23141
|
- You are a thinking partner. Prefer sharp questions that unlock the user's idea over dumping answers.
|
|
23142
|
+
- Probing turns: lead with the sharpest question that unlocks the next insight. Concluding turns: use pyramid (headline \u2192 drivers \u2192 so-what) \u2014 answer first, then structure.
|
|
22828
23143
|
- Protect imagination: give "what if" space before the smell-test \u2014 do not kill creativity in the first sentence.
|
|
22829
23144
|
- Steelman the user's position before you attack it; then deliver one hard pushback grounded in evidence when possible.
|
|
22830
23145
|
- Ground claims about THIS pipeline in tool results. Label speculation explicitly ("hypothesis:", "speculation:").
|
|
@@ -22835,7 +23150,7 @@ ${opts.conversationBlock}
|
|
|
22835
23150
|
- You have continuity via prior think-channel messages. Never repeat an angle already covered unless asked.`;
|
|
22836
23151
|
const jobSection = `YOUR JOB (THINK CHANNEL \u2014 always deep):
|
|
22837
23152
|
- Decide whether you need tools, a direct answer, or both. Do not re-call a tool whose result you already have.
|
|
22838
|
-
-
|
|
23153
|
+
- Probing: lead with the question that matters most. Concluding: lead with the answer (headline), then drivers and so-what.
|
|
22839
23154
|
- When you use numbers, include dollar values where available and lead with financial impact.
|
|
22840
23155
|
- Descriptive exploration stays in this channel; plan-of-attack questions hand off via draft_strategy.
|
|
22841
23156
|
- After a successful draft_strategy tool result: reply with at most 1\u20132 sentences introducing the handoff. Do not write the plan.`;
|
|
@@ -22873,6 +23188,15 @@ ${EXECUTION_BIAS_BLOCK}
|
|
|
22873
23188
|
GTM ENGINEERING (how recommendations become systems):
|
|
22874
23189
|
${GTM_ENGINEERING_BLOCK}
|
|
22875
23190
|
|
|
23191
|
+
IDEA GATE (when recommending a play or before draft_strategy \u2014 silent; probing/imagination turns skip this until you conclude):
|
|
23192
|
+
${HEILMEIER_GATE}
|
|
23193
|
+
|
|
23194
|
+
BOTTLENECK (when concluding or recommending \u2014 silent):
|
|
23195
|
+
${BOTTLENECK_GATE}
|
|
23196
|
+
|
|
23197
|
+
OWNER SHAPE (when recommending \u2014 silent):
|
|
23198
|
+
${OWNER_SHAPE_BLOCK}
|
|
23199
|
+
|
|
22876
23200
|
OUTPUT DOCTRINE (how answers are structured for recall):
|
|
22877
23201
|
${PYRAMID_OUTPUT_BLOCK}
|
|
22878
23202
|
|
|
@@ -22887,6 +23211,8 @@ ${VITAL_SIGNS_BLOCK}
|
|
|
22887
23211
|
PLAYBOOK \u2014 name a play when it helps the user act (not a full program):
|
|
22888
23212
|
${buildPlaybookBlock()}
|
|
22889
23213
|
|
|
23214
|
+
${buildFrameworkCatalogBlock()}
|
|
23215
|
+
|
|
22890
23216
|
${commandSection}
|
|
22891
23217
|
${formattingSection}
|
|
22892
23218
|
OUTPUT RULES:
|
|
@@ -22915,6 +23241,7 @@ var init_think_prompt = __esm({
|
|
|
22915
23241
|
"src/ai/think-prompt.ts"() {
|
|
22916
23242
|
"use strict";
|
|
22917
23243
|
init_prompt_parts();
|
|
23244
|
+
init_frameworks();
|
|
22918
23245
|
init_prompt();
|
|
22919
23246
|
}
|
|
22920
23247
|
});
|
|
@@ -22945,6 +23272,7 @@ var init_ghost_hints = __esm({
|
|
|
22945
23272
|
],
|
|
22946
23273
|
explore: [
|
|
22947
23274
|
'try "what is the most expensive problem?"',
|
|
23275
|
+
'try "which constraint is gating the dollars?"',
|
|
22948
23276
|
'try "how should we fix this?"',
|
|
22949
23277
|
'try "which segment is weakest?"',
|
|
22950
23278
|
'try "what is ARR?"',
|
|
@@ -23035,9 +23363,28 @@ function buildSituationalAwarenessBlock(ctx, opts = {}) {
|
|
|
23035
23363
|
if (examples.length > 0) {
|
|
23036
23364
|
lines.push(`User may try: ${examples.join(" \xB7 ")}`);
|
|
23037
23365
|
}
|
|
23038
|
-
|
|
23039
|
-
|
|
23040
|
-
|
|
23366
|
+
if (channel === "think") {
|
|
23367
|
+
lines.push(
|
|
23368
|
+
"Doctrine: probing leads with the sharpest question (idea-gate off until you conclude); concluding/recommend turns \u2014 silent idea-gate then bottleneck then pyramid packaging; never name frameworks to the user"
|
|
23369
|
+
);
|
|
23370
|
+
} else if (responseMode === "brief") {
|
|
23371
|
+
lines.push(
|
|
23372
|
+
"Doctrine: brief packaging \u2014 headline \u226420 words, \u22642 drivers, one so-what; idea-gate off; never name frameworks to the user; do not restate The Call/scorecard \u2014 advance"
|
|
23373
|
+
);
|
|
23374
|
+
} else {
|
|
23375
|
+
lines.push(
|
|
23376
|
+
"Doctrine: deep/recommend \u2014 silent idea-gate then bottleneck then owner-shape then pyramid packaging; call get_framework_detail for toolkit depth; never name frameworks to the user"
|
|
23377
|
+
);
|
|
23378
|
+
}
|
|
23379
|
+
if (analysisReady) {
|
|
23380
|
+
lines.push(
|
|
23381
|
+
"Your job in this harness: after formula compute, lead with the most expensive or actionable implication \u2014 connect dollars, name the constraint, do not restate scorecards or The Call the user already saw"
|
|
23382
|
+
);
|
|
23383
|
+
} else {
|
|
23384
|
+
lines.push(
|
|
23385
|
+
"Your job in this harness: help the user through the funnel; CLI owns pre-explore gates"
|
|
23386
|
+
);
|
|
23387
|
+
}
|
|
23041
23388
|
lines.push(
|
|
23042
23389
|
"Pre-explore funnel gates are handled by the CLI; you speak in explore/think/strategist unless tools explicitly allow a restart"
|
|
23043
23390
|
);
|
|
@@ -23050,10 +23397,12 @@ function buildSituationalRuntimeFacts(ctx, opts = {}) {
|
|
|
23050
23397
|
return {
|
|
23051
23398
|
phase,
|
|
23052
23399
|
mode: responseMode,
|
|
23400
|
+
channel,
|
|
23053
23401
|
lens: ctx.scope?.primary_lens,
|
|
23054
23402
|
stage: ctx.stage,
|
|
23055
23403
|
can_compute: ctx.gapAudit?.can_compute === void 0 ? void 0 : String(ctx.gapAudit.can_compute),
|
|
23056
|
-
engine: canUseReplAi(ctx) ? "connected" : "none"
|
|
23404
|
+
engine: canUseReplAi(ctx) ? "connected" : "none",
|
|
23405
|
+
idea_gate: channel === "think" || responseMode === "deep" ? "on" : "off"
|
|
23057
23406
|
};
|
|
23058
23407
|
}
|
|
23059
23408
|
function getConversationPhaseBlock(ctx, opts = {}) {
|
|
@@ -23273,12 +23622,24 @@ ${commandStyleRule}`;
|
|
|
23273
23622
|
- Respond in plain text (not JSON). You do NOT need to emit the findings schema \u2014 only emit structured findings if the user explicitly asks for them.
|
|
23274
23623
|
- Include specific numbers from tool results, never guess.
|
|
23275
23624
|
- When you have enough information, answer directly. Don't call tools you don't need.`;
|
|
23276
|
-
const executionBiasSection = responseMode === "brief" ?
|
|
23625
|
+
const executionBiasSection = responseMode === "brief" ? `OUTPUT DOCTRINE (brief \u2014 one headline + \u22642 drivers + one so-what; situation/complication only as support after the headline):
|
|
23626
|
+
${PYRAMID_OUTPUT_BLOCK}
|
|
23627
|
+
|
|
23628
|
+
` : `EXECUTION BIAS (how you work):
|
|
23277
23629
|
${EXECUTION_BIAS_BLOCK}
|
|
23278
23630
|
|
|
23279
23631
|
GTM ENGINEERING (how your recommendations become systems):
|
|
23280
23632
|
${GTM_ENGINEERING_BLOCK}
|
|
23281
23633
|
|
|
23634
|
+
IDEA GATE (when recommending action \u2014 silent):
|
|
23635
|
+
${HEILMEIER_GATE}
|
|
23636
|
+
|
|
23637
|
+
BOTTLENECK (constraint first \u2014 silent):
|
|
23638
|
+
${BOTTLENECK_GATE}
|
|
23639
|
+
|
|
23640
|
+
OWNER SHAPE (when recommending action \u2014 silent):
|
|
23641
|
+
${OWNER_SHAPE_BLOCK}
|
|
23642
|
+
|
|
23282
23643
|
OUTPUT DOCTRINE (how answers are structured for recall):
|
|
23283
23644
|
${PYRAMID_OUTPUT_BLOCK}
|
|
23284
23645
|
|
|
@@ -23294,6 +23655,8 @@ ${VITAL_SIGNS_BLOCK}
|
|
|
23294
23655
|
PLAYBOOK \u2014 recommend these plays when appropriate:
|
|
23295
23656
|
${buildPlaybookBlock()}
|
|
23296
23657
|
|
|
23658
|
+
${buildFrameworkCatalogBlock()}
|
|
23659
|
+
|
|
23297
23660
|
${commandSection}`;
|
|
23298
23661
|
const stable = `You are a world-class GTM operating partner \u2014 the kind of analyst a CEO keeps on speed dial. You are exceptionally well-read, rigorous, and commercially sharp, and you have tools to query a local database of this company's CRM and pipeline data. The user is having an ongoing, free-form conversation with you about their go-to-market health and SaaS metrics.
|
|
23299
23662
|
|
|
@@ -23542,6 +23905,7 @@ var init_agentic_loop = __esm({
|
|
|
23542
23905
|
init_thread();
|
|
23543
23906
|
init_untrusted();
|
|
23544
23907
|
init_prompt_parts();
|
|
23908
|
+
init_frameworks();
|
|
23545
23909
|
init_think_prompt();
|
|
23546
23910
|
init_prompt();
|
|
23547
23911
|
init_context2();
|
|
@@ -25940,6 +26304,11 @@ function generateMarkdownReport(data) {
|
|
|
25940
26304
|
lines.push("");
|
|
25941
26305
|
lines.push(`*Generated: ${data.generatedAt}*`);
|
|
25942
26306
|
lines.push("");
|
|
26307
|
+
const theCall = formatTheCallSection(data.findings);
|
|
26308
|
+
if (theCall) {
|
|
26309
|
+
lines.push(theCall.trimEnd());
|
|
26310
|
+
lines.push("");
|
|
26311
|
+
}
|
|
25943
26312
|
lines.push("## Overall Health");
|
|
25944
26313
|
lines.push("");
|
|
25945
26314
|
lines.push(`${statusEmoji(data.health.overall_status)} **Score: ${formatScore(data.health.overall_score)} / 100** (${data.health.overall_status})`);
|
|
@@ -26373,6 +26742,11 @@ function exportToNotes(data) {
|
|
|
26373
26742
|
const body = [];
|
|
26374
26743
|
body.push("# GTM Health Diagnosis");
|
|
26375
26744
|
body.push("");
|
|
26745
|
+
const theCall = formatTheCallSection(findings);
|
|
26746
|
+
if (theCall) {
|
|
26747
|
+
body.push(theCall.trimEnd());
|
|
26748
|
+
body.push("");
|
|
26749
|
+
}
|
|
26376
26750
|
body.push(`**Overall Score:** ${aggregate.overall_score}/100 (${aggregate.overall_status})`);
|
|
26377
26751
|
body.push(`**Gating Vital Sign:** ${VITAL_SIGN_LABELS[aggregate.gating_vital_sign]}`);
|
|
26378
26752
|
body.push(`**Date:** ${now2.toISOString().split("T")[0]} ${timeStr.replace(/(\d{2})(\d{2})/, "$1:$2")}`);
|
|
@@ -28436,10 +28810,16 @@ ${companyContextSection4()}${operatorSection4()}HOW YOU THINK (the strategist me
|
|
|
28436
28810
|
8. RESPECT CAPACITY. Total effort must fit the team that actually exists. A brilliant plan the team cannot staff is a bad plan.
|
|
28437
28811
|
|
|
28438
28812
|
ALTITUDE CONTRACT (the plan must work at every altitude a client reads it at):
|
|
28439
|
-
- 30,000 FT: summary_30k is
|
|
28440
|
-
- 10,000 FT: each workstream's title + problem line is a delegation unit \u2014 a one-liner an owner could receive in Slack and know what they own, why it's theirs, and what number they move.
|
|
28813
|
+
- 30,000 FT: summary_30k is answer-first \u2014 open with the governing thought (the answer) and what leadership should expect by when, then the situation and complication that make it true as support. A board member reads only this; it must survive being forwarded unedited.
|
|
28814
|
+
- 10,000 FT: each workstream's title + problem line is a delegation unit \u2014 a one-liner an owner could receive in Slack and know what they own, why it's theirs, and what number they move. Use function-shaped owners (see OWNER SHAPE).
|
|
28441
28815
|
- GROUND LEVEL: actions are Monday-morning prescriptive. You have built this before \u2014 read the linked play's full detail with get_play_detail and prescribe its known-good sequence adapted to THIS company's numbers and constraints. The first action of every workstream must be startable within 48 hours with no new tooling.
|
|
28442
28816
|
|
|
28817
|
+
OUTPUT DOCTRINE (narrative fields \u2014 summary_30k and workstream problem lines \u2014 follow pyramid recall):
|
|
28818
|
+
${PYRAMID_OUTPUT_BLOCK}
|
|
28819
|
+
|
|
28820
|
+
OWNER SHAPE (workstreams and actions \u2014 silent):
|
|
28821
|
+
${OWNER_SHAPE_BLOCK}
|
|
28822
|
+
|
|
28443
28823
|
${buildUserVisibleProseBlock()}
|
|
28444
28824
|
|
|
28445
28825
|
GTM ENGINEERING (plans install systems, not heroics):
|
|
@@ -28454,7 +28834,10 @@ ${METRICS_BLOCK}
|
|
|
28454
28834
|
PLAYBOOK (every workstream must link to at least one play by exact id):
|
|
28455
28835
|
${buildPlaybookBlock()}
|
|
28456
28836
|
|
|
28837
|
+
${buildFrameworkCatalogBlock()}
|
|
28838
|
+
|
|
28457
28839
|
MEASURABILITY CONTRACT (non-negotiable \u2014 this is what separates you from a slide deck):
|
|
28840
|
+
- Treat the objective as the end state; treat expected outcomes and leading indicators as key results (mid-term and final exams).
|
|
28458
28841
|
- Every expected outcome and leading indicator needs: a metric, the current baseline copied from your verified grounding work, a target RANGE, a check date, and the named instrument that will measure it.
|
|
28459
28842
|
- Banned words for outcomes: "improve", "better", "significantly", "optimize", "increase" without a number. If you cannot quantify it, it is not an outcome \u2014 demote it to an assumption or replace it with its best measurable proxy.
|
|
28460
28843
|
- Every workstream needs at least one dated milestone with a verification method that names a number and threshold.
|
|
@@ -28473,9 +28856,13 @@ function buildGroundingMessage(input) {
|
|
|
28473
28856
|
|
|
28474
28857
|
Establish verified reality before any planning. Work hypothesis-first, like an engagement manager on day one: form your top candidate explanations for what stands between today and the objective, then use tools to confirm or kill each one \u2014 don't boil the ocean.
|
|
28475
28858
|
1. Current state: which vital signs / metrics are worst, what are the exact scores and dollar values, which segments concentrate the problem?
|
|
28476
|
-
2.
|
|
28477
|
-
3. What
|
|
28478
|
-
|
|
28859
|
+
2. CONSTRAINT: name the single gating vital (layer order) or stage where deals die \u2014 with score and dollar label. This is the bottleneck the plan must move first.
|
|
28860
|
+
3. What is already in flight (active strategies below, if any), what has worked before (wins), and what the local play track record says.
|
|
28861
|
+
4. What are the binding constraints: data gaps that limit measurability, sales-cycle length that bounds verification speed, capacity signals?
|
|
28862
|
+
Rank the problems you verify by dollars at stake \xD7 confidence in the read \xD7 speed to impact \u2014 that ranking becomes the spine of the plan. Non-constraint problems wait.
|
|
28863
|
+
|
|
28864
|
+
BOTTLENECK (silent):
|
|
28865
|
+
${BOTTLENECK_GATE}`);
|
|
28479
28866
|
sections.push(`CURRENT HEALTH SNAPSHOT (verified \u2014 you may cite these numbers as baselines):
|
|
28480
28867
|
${input.healthSnapshot}`);
|
|
28481
28868
|
if (input.gapAuditBlock) {
|
|
@@ -28522,6 +28909,10 @@ function buildStressTestMessage() {
|
|
|
28522
28909
|
6. EXPECTATION HONESTY: are target ranges defensible from the baseline and effort, or heroic? Widen ranges or lower confidence rather than promising what the data does not support. Where the local play track record shows a play has hit or missed here before, weight confidence accordingly.
|
|
28523
28910
|
7. CONTINGENCY QUALITY: is each trigger observable on a specific date, and is each fallback a real pre-decision (alternate play, descope, escalate) rather than "monitor closely"?
|
|
28524
28911
|
8. ALTITUDE CHECK: does summary_30k survive being forwarded to a board member unedited? Is each workstream title + problem a self-contained delegation one-liner? Is every first action startable within 48 hours?
|
|
28912
|
+
9. HEILMEIER GATE (silent \u2014 never name this to the user). Run every workstream through this filter. Failures: cut the workstream, demote it to assumptions, or rewrite until it passes \u2014 then emit final JSON.
|
|
28913
|
+
${HEILMEIER_GATE}
|
|
28914
|
+
10. AFTER-ACTION PREP (silent). Ensure each workstream's exams can support a later belief\u2192evidence\u2192next-bet review. Fold gaps into assumptions or contingencies.
|
|
28915
|
+
${AAR_BLOCK}
|
|
28525
28916
|
|
|
28526
28917
|
Then respond with the FINAL revised plan as strict JSON in the same schema \u2014 no markdown fences, no prose. Fold what you learned into constraints, assumptions, risks, and confidence. This version is the one that gets saved and reviewed against, so make every number one you are willing to be checked on.`;
|
|
28527
28918
|
}
|
|
@@ -28530,6 +28921,7 @@ var init_strategist_prompt = __esm({
|
|
|
28530
28921
|
"src/ai/strategist-prompt.ts"() {
|
|
28531
28922
|
"use strict";
|
|
28532
28923
|
init_prompt_parts();
|
|
28924
|
+
init_frameworks();
|
|
28533
28925
|
init_prompt();
|
|
28534
28926
|
STRATEGIST_PLAN_SCHEMA_BLOCK = `{
|
|
28535
28927
|
"title": "Short plan name, e.g. 'Q4 Pipeline Recovery'",
|
|
@@ -30237,6 +30629,11 @@ function renderReport(report) {
|
|
|
30237
30629
|
`${strategy.slug} \xB7 baseline batch ${shortBatch(report.baseline_batch_id)} \u2192 latest ${shortBatch(report.latest_batch_id)}`
|
|
30238
30630
|
)
|
|
30239
30631
|
);
|
|
30632
|
+
console.log(
|
|
30633
|
+
" " + chalk38.dim(
|
|
30634
|
+
"Read as belief \u2192 evidence \u2192 next bet: what we expected, what instruments showed, what to keep/kill/re-sequence."
|
|
30635
|
+
)
|
|
30636
|
+
);
|
|
30240
30637
|
if (report.single_batch) {
|
|
30241
30638
|
console.log(
|
|
30242
30639
|
" " + chalk38.yellow("Only one compute batch exists \u2014 ingest fresh data and re-run for a real before/after.")
|
|
@@ -33182,11 +33579,14 @@ function buildRecapSystemPrompt(companyBlock) {
|
|
|
33182
33579
|
"",
|
|
33183
33580
|
companyBlock ? `## Company Context
|
|
33184
33581
|
${companyBlock}` : "",
|
|
33582
|
+
"",
|
|
33583
|
+
"OUTPUT DOCTRINE (how the recap is structured for recall):",
|
|
33584
|
+
PYRAMID_OUTPUT_BLOCK,
|
|
33185
33585
|
"",
|
|
33186
33586
|
"Produce a concise session recap in markdown, pyramid-shaped:",
|
|
33187
|
-
"1. **The Story** \u2014
|
|
33188
|
-
"2. **Key Findings** \u2014 3-5 bullets
|
|
33189
|
-
"3. **Next Steps** \u2014 2-3 actions, each with an owner-shaped verb and, where a play applies, the play named.",
|
|
33587
|
+
"1. **The Story** \u2014 answer-first: open with the resolution (what leadership should take away), then the situation and complication that make it true. One or two sentences. This is the line the client repeats tomorrow.",
|
|
33588
|
+
"2. **Key Findings** \u2014 3-5 bullets as drivers: each headline-first with its number and dollar value; distinct and non-overlapping; no bullet without a figure unless none exists.",
|
|
33589
|
+
"3. **Next Steps** \u2014 2-3 so-what actions, each with an owner-shaped verb and, where a play applies, the play named.",
|
|
33190
33590
|
"4. **Open Loops** \u2014 anything left unresolved or promised for next time (omit the section if none).",
|
|
33191
33591
|
"",
|
|
33192
33592
|
"Keep the total output under 300 words.",
|
|
@@ -36512,7 +36912,8 @@ handler: ../commands/knowledge.ts
|
|
|
36512
36912
|
|
|
36513
36913
|
Teach the analyst from work done outside the platform.
|
|
36514
36914
|
Type \`/knowledge add <file>\` to ingest a markdown, text, or PDF case study, framework, or benchmark report.
|
|
36515
|
-
NTRP indexes it for retrieval during analysis
|
|
36915
|
+
NTRP indexes it for retrieval during analysis (your own consulting packs welcome \u2014 built-in toolkit is silent and lives behind get_framework_detail).
|
|
36916
|
+
Type \`/knowledge list\` to show what is indexed.
|
|
36516
36917
|
Drop files into ~/.ntrp/knowledge to stage them.`
|
|
36517
36918
|
},
|
|
36518
36919
|
{
|
|
@@ -37048,7 +37449,7 @@ function formatCatalogLine(meta) {
|
|
|
37048
37449
|
const note = DESTRUCTIVE_COMMAND_NOTES[meta.name] ? ` (${DESTRUCTIVE_COMMAND_NOTES[meta.name]})` : "";
|
|
37049
37450
|
return `- /${meta.name}${args} \u2014 ${meta.description}${note}`;
|
|
37050
37451
|
}
|
|
37051
|
-
var ANALYST_FILE_NAME, ANALYST_FILE_MAX_CHARS, EXECUTION_BIAS_BLOCK, ANALYST_INSTINCT_BLOCK, SAFETY_BLOCK, VITAL_SIGNS_BLOCK, PLAYBOOK_BLOCK, DESTRUCTIVE_COMMAND_NOTES, METRICS_BLOCK, GTM_ENGINEERING_BLOCK, PYRAMID_OUTPUT_BLOCK;
|
|
37452
|
+
var ANALYST_FILE_NAME, ANALYST_FILE_MAX_CHARS, EXECUTION_BIAS_BLOCK, ANALYST_INSTINCT_BLOCK, SAFETY_BLOCK, VITAL_SIGNS_BLOCK, PLAYBOOK_BLOCK, DESTRUCTIVE_COMMAND_NOTES, METRICS_BLOCK, GTM_ENGINEERING_BLOCK, HEILMEIER_GATE, BOTTLENECK_GATE, OWNER_SHAPE_BLOCK, AAR_BLOCK, PYRAMID_OUTPUT_BLOCK;
|
|
37052
37453
|
var init_prompt_parts = __esm({
|
|
37053
37454
|
"src/ai/prompt-parts.ts"() {
|
|
37054
37455
|
"use strict";
|
|
@@ -37127,12 +37528,39 @@ Instrument trust: every metric here carries confidence and reliability_gate fiel
|
|
|
37127
37528
|
- EVERY FIX GETS A MECHANISM. One-time cleanups decay in a quarter. Pair each cleanup with the mechanism that keeps it fixed: a routing rule, an SLA with a report behind it, an enrichment waterfall, a signal-triggered task, an alert in the channel reps already work in.
|
|
37128
37529
|
- INSTRUMENT WHAT YOU CHANGE. A system you can't measure is a system you can't defend at the next QBR. Name the metric each mechanism should move and where it will be read.
|
|
37129
37530
|
Restraint: you diagnose and prescribe the system; you do not build it here. Name the mechanism class, not a vendor shopping list.`;
|
|
37531
|
+
HEILMEIER_GATE = `Before you recommend an action, play, or workstream \u2014 run this gate. Failures are silent: kill, demote to an assumption, or ask one sharper question. Never say Heilmeier, DARPA, or catechism to the user.
|
|
37532
|
+
- END STATE. Name the precise outcome in one line (the objective). Vague goals die here.
|
|
37533
|
+
- STATUS QUO. How is it done today, and what is the hard limit of that approach?
|
|
37534
|
+
- NEWNESS. What is new in this approach, and why might it work when the status quo fails? If nothing is new, kill it as a restatement.
|
|
37535
|
+
- STAKE. Who cares? If it works, what difference does it make \u2014 dollars recovered or a decision unlocked? Name the cost of doing nothing. No stake \u2192 do not recommend.
|
|
37536
|
+
- RISKS AND PAYOFFS. State the main downside and the upside in the same breath.
|
|
37537
|
+
- EFFORT. Rough cost in team hours or capacity. If it cannot fit the team that exists, cut or re-sequence \u2014 do not soft-pedal.
|
|
37538
|
+
- TIME. Bound by sales-cycle and metric-update physics. Dates faster than evidence can appear are invalid.
|
|
37539
|
+
- EXAMS (key results). Name a mid-term check and a final exam: dated, measurable, with baseline + target RANGE + an instrument that exists. These are the objective's key results. No exams \u2192 demote to assumption or drop.
|
|
37540
|
+
- KILL RULE. If newness, stake, or exams fail: do not recommend. Demote, drop, or ask one sharper question. Surviving ideas then get pyramid packaging.`;
|
|
37541
|
+
BOTTLENECK_GATE = `Before you prescribe a fix \u2014 name the constraint. Never say Theory of Constraints, TOC, or Goldratt to the user.
|
|
37542
|
+
- CONSTRAINT FIRST. Identify the single gating vital (layer order: freshness \u2192 flow_rate/drop_rate \u2192 signal_to_noise \u2192 thread_depth) or the pipeline stage where deals die \u2014 with score and dollar label.
|
|
37543
|
+
- PRESCRIBE THE CONSTRAINT. The first play or workstream must move that constraint. Non-constraint work is optional polish.
|
|
37544
|
+
- DEPENDENCY OVER NOISE. If two problems compete, pick the one that unblocks the other.
|
|
37545
|
+
- KILL RULE. If the recommendation does not move the named constraint, demote or drop it.`;
|
|
37546
|
+
OWNER_SHAPE_BLOCK = `When you recommend action \u2014 shape the owner. Never say RACI to the user.
|
|
37547
|
+
- FUNCTION NOT PERSON. Name RevOps, sales manager, CS lead, marketing ops, or AE lead \u2014 not a CRM contact's personal name.
|
|
37548
|
+
- ACCOUNTABLE DECIDES; RESPONSIBLE EXECUTES. One accountable function per ask.
|
|
37549
|
+
- 48-HOUR START. The first action must be startable by that function within 48 hours with no new tooling.
|
|
37550
|
+
- NO REORG. Do not invent headcount or redesign the company.`;
|
|
37551
|
+
AAR_BLOCK = `When reviewing outcomes or distilling learning \u2014 run after-action. Never say AAR or after-action review to the user.
|
|
37552
|
+
- BELIEF. What we expected to move (metric + range + check date).
|
|
37553
|
+
- EVIDENCE. What the instruments showed (baseline \u2192 reading).
|
|
37554
|
+
- LEARNING. Keep, kill, or re-sequence. Write judgment changes as calibrations that supersede contradictions.
|
|
37555
|
+
- NEXT BET. One next exam \u2014 not a new multi-week program.`;
|
|
37130
37556
|
PYRAMID_OUTPUT_BLOCK = `Structure everything the way a client remembers it \u2014 pyramid, answer first:
|
|
37131
|
-
- HEADLINE FIRST. Open with the verdict and the number in one sentence (\
|
|
37132
|
-
-
|
|
37557
|
+
- HEADLINE FIRST. Open with the verdict and the number in one sentence (\u226420 words): what is true and what it costs. Never open with methodology or context.
|
|
37558
|
+
- SITUATION AS SUPPORT. After the headline, the situation and complication that make the call true may follow as support \u2014 never as the opener. Do not name SCQA to the user.
|
|
37559
|
+
- THEN THE DRIVERS. Support the headline with 2-3 drivers that are distinct, non-overlapping, and together explain the headline \u2014 each with its own number. If two points share a cause, merge them.
|
|
37133
37560
|
- THEN THE SO-WHAT. Close with what it means for the decision at hand: the action, the owner-shaped next step, or the sharpest next cut.
|
|
37134
37561
|
- THE RECALL TEST. A busy executive should be able to repeat your headline and one number to their CEO an hour later. If they couldn't, tighten it.
|
|
37135
|
-
- ALTITUDE CONTROL. Answer at the altitude asked: a high-level question gets the 30,000-ft story (one narrative sentence, three numbers max) with an offer to descend; a "how do we fix it" / plan-of-attack question prefers draft_strategy (or, if answering one play inline: one play + mechanism + what to verify \u2014 observe and recommend, never invent a multi-week Phase 1/2/3 program)
|
|
37562
|
+
- ALTITUDE CONTROL. Answer at the altitude asked: a high-level question gets the 30,000-ft story (one narrative sentence, three numbers max) with an offer to descend; a "how do we fix it" / plan-of-attack question prefers draft_strategy (or, if answering one play inline: one play + mechanism + what to verify \u2014 observe and recommend, never invent a multi-week Phase 1/2/3 program).
|
|
37563
|
+
- BRIEF MODE. When brevity is required: one headline + \u22642 drivers + one so-what. Still answer-first; never open with a scorecard.`;
|
|
37136
37564
|
}
|
|
37137
37565
|
});
|
|
37138
37566
|
|
|
@@ -37141,7 +37569,7 @@ function buildMetricsPlaybookBlock() {
|
|
|
37141
37569
|
const plays = getMetricsPlays();
|
|
37142
37570
|
return plays.map((p) => `- "${p.name}" (id: ${p.id}) \u2014 when ${p.trigger_condition}: ${p.why}`).join("\n");
|
|
37143
37571
|
}
|
|
37144
|
-
function
|
|
37572
|
+
function buildMetricsFindingsSystemPrompt() {
|
|
37145
37573
|
const profile = loadProfile();
|
|
37146
37574
|
const profileBlock = buildCompanyProfileBlock();
|
|
37147
37575
|
const motionLabel = motionBenchmarkLabel(profile?.sales_motion);
|
|
@@ -37220,7 +37648,7 @@ async function generateMetricsFindings(input, ctx) {
|
|
|
37220
37648
|
const { response, meta } = await completeWithFailover(
|
|
37221
37649
|
{
|
|
37222
37650
|
surface: "metrics_findings",
|
|
37223
|
-
system:
|
|
37651
|
+
system: buildMetricsFindingsSystemPrompt(),
|
|
37224
37652
|
messages: [{ role: "user", content: userMessage }],
|
|
37225
37653
|
max_tokens: 4096
|
|
37226
37654
|
},
|