@sonnechasser/ntrp 1.4.7 → 1.4.9
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 +521 -43
- package/dist/mcp/server.js +406 -32
- package/package.json +1 -1
package/dist/mcp/server.js
CHANGED
|
@@ -1297,6 +1297,7 @@ function buildSessionContextDoc(file, opts = {}) {
|
|
|
1297
1297
|
lines.push(`- Exchanges: ${exchanges}`);
|
|
1298
1298
|
if (file.summary) lines.push(`- Summary: ${file.summary}`);
|
|
1299
1299
|
if (file.resumed_from) lines.push(`- Resumed from: ${file.resumed_from}`);
|
|
1300
|
+
lines.push("- Packaging: answer-first; recommendations filtered (silent idea-gate on deep/think/strategy)");
|
|
1300
1301
|
lines.push("");
|
|
1301
1302
|
lines.push("## Dataset");
|
|
1302
1303
|
lines.push("");
|
|
@@ -8039,6 +8040,8 @@ KINDS:
|
|
|
8039
8040
|
- "preference": how the user wants analysis done or framed.
|
|
8040
8041
|
- "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.
|
|
8041
8042
|
|
|
8043
|
+
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.
|
|
8044
|
+
|
|
8042
8045
|
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.
|
|
8043
8046
|
|
|
8044
8047
|
EXCLUDE:
|
|
@@ -10194,7 +10197,8 @@ handler: ../commands/knowledge.ts
|
|
|
10194
10197
|
|
|
10195
10198
|
Teach the analyst from work done outside the platform.
|
|
10196
10199
|
Type \`/knowledge add <file>\` to ingest a markdown, text, or PDF case study, framework, or benchmark report.
|
|
10197
|
-
NTRP indexes it for retrieval during analysis
|
|
10200
|
+
NTRP indexes it for retrieval during analysis (your own consulting packs welcome \u2014 built-in toolkit is silent and lives behind get_framework_detail).
|
|
10201
|
+
Type \`/knowledge list\` to show what is indexed.
|
|
10198
10202
|
Drop files into ~/.ntrp/knowledge to stage them.`
|
|
10199
10203
|
},
|
|
10200
10204
|
{
|
|
@@ -10313,6 +10317,7 @@ CLI slide deck: SaaS refresher, five vital signs (definition, formula, visual, d
|
|
|
10313
10317
|
Bare \`/deepdive\` runs the full onboarding tour. Type \`/deepdive guide\` to jump to how to use NTRP (includes teaching the inbox once).
|
|
10314
10318
|
Type \`/deepdive handoff\` for the ship-to-AI slide. Type \`/deepdive <metric>\` to jump to one metric card.
|
|
10315
10319
|
Type \`/deepdive list\` to print the catalog. Works without an AI key. Re-run anytime from the homescreen.
|
|
10320
|
+
During the tour: Enter advances, \`b\` / \`back\` goes to the previous slide, \`q\` quits. After the tour, the same \`b\` / \`back\` word steps back one confirm gate in the REPL (scope, data, strategy) \u2014 it does not unload data or undo compute.
|
|
10316
10321
|
Live values overlay when an analysis exists.`
|
|
10317
10322
|
},
|
|
10318
10323
|
{
|
|
@@ -10327,7 +10332,7 @@ handler: ../commands/thinkwithme.ts
|
|
|
10327
10332
|
|
|
10328
10333
|
Open a dedicated \`think \u203A\` channel to explore ideas, challenge assumptions, and pull evidence from your data.
|
|
10329
10334
|
Bare \`/thinkwithme\` enters the channel. Type \`/thinkwithme <topic>\` to seed the first turn.
|
|
10330
|
-
Requires an analysis and an AI key (\`/connect\`). Type \`done\` or \`
|
|
10335
|
+
Requires an analysis and an AI key (\`/connect\`). Type \`done\`, \`cancel\`, or \`b\` / \`back\` to return to \u203A.
|
|
10331
10336
|
When you are ready to commit to a plan, say so or the partner can hand off to \`/strategy\`.`
|
|
10332
10337
|
},
|
|
10333
10338
|
{
|
|
@@ -10730,7 +10735,7 @@ function formatCatalogLine(meta) {
|
|
|
10730
10735
|
const note = DESTRUCTIVE_COMMAND_NOTES[meta.name] ? ` (${DESTRUCTIVE_COMMAND_NOTES[meta.name]})` : "";
|
|
10731
10736
|
return `- /${meta.name}${args} \u2014 ${meta.description}${note}`;
|
|
10732
10737
|
}
|
|
10733
|
-
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, PYRAMID_OUTPUT_BLOCK;
|
|
10738
|
+
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;
|
|
10734
10739
|
var init_prompt_parts = __esm({
|
|
10735
10740
|
"src/ai/prompt-parts.ts"() {
|
|
10736
10741
|
"use strict";
|
|
@@ -10810,17 +10815,33 @@ Instrument trust: every metric here carries confidence and reliability_gate fiel
|
|
|
10810
10815
|
- 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.
|
|
10811
10816
|
Restraint: you diagnose and prescribe the system; you do not build it here. Name the mechanism class, not a vendor shopping list.`;
|
|
10812
10817
|
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.
|
|
10813
|
-
- END STATE. Name the precise outcome in one line. Vague goals die here.
|
|
10818
|
+
- END STATE. Name the precise outcome in one line (the objective). Vague goals die here.
|
|
10814
10819
|
- STATUS QUO. How is it done today, and what is the hard limit of that approach?
|
|
10815
10820
|
- 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.
|
|
10816
10821
|
- 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.
|
|
10817
10822
|
- RISKS AND PAYOFFS. State the main downside and the upside in the same breath.
|
|
10818
10823
|
- 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.
|
|
10819
10824
|
- TIME. Bound by sales-cycle and metric-update physics. Dates faster than evidence can appear are invalid.
|
|
10820
|
-
- EXAMS. Name a mid-term check and a final exam: dated, measurable, with an instrument that exists. No exams \u2192 demote to assumption or drop.
|
|
10825
|
+
- 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.
|
|
10821
10826
|
- KILL RULE. If newness, stake, or exams fail: do not recommend. Demote, drop, or ask one sharper question. Surviving ideas then get pyramid packaging.`;
|
|
10827
|
+
BOTTLENECK_GATE = `Before you prescribe a fix \u2014 name the constraint. Never say Theory of Constraints, TOC, or Goldratt to the user.
|
|
10828
|
+
- 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.
|
|
10829
|
+
- PRESCRIBE THE CONSTRAINT. The first play or workstream must move that constraint. Non-constraint work is optional polish.
|
|
10830
|
+
- DEPENDENCY OVER NOISE. If two problems compete, pick the one that unblocks the other.
|
|
10831
|
+
- KILL RULE. If the recommendation does not move the named constraint, demote or drop it.`;
|
|
10832
|
+
OWNER_SHAPE_BLOCK = `When you recommend action \u2014 shape the owner. Never say RACI to the user.
|
|
10833
|
+
- FUNCTION NOT PERSON. Name RevOps, sales manager, CS lead, marketing ops, or AE lead \u2014 not a CRM contact's personal name.
|
|
10834
|
+
- ACCOUNTABLE DECIDES; RESPONSIBLE EXECUTES. One accountable function per ask.
|
|
10835
|
+
- 48-HOUR START. The first action must be startable by that function within 48 hours with no new tooling.
|
|
10836
|
+
- NO REORG. Do not invent headcount or redesign the company.`;
|
|
10837
|
+
AAR_BLOCK = `When reviewing outcomes or distilling learning \u2014 run after-action. Never say AAR or after-action review to the user.
|
|
10838
|
+
- BELIEF. What we expected to move (metric + range + check date).
|
|
10839
|
+
- EVIDENCE. What the instruments showed (baseline \u2192 reading).
|
|
10840
|
+
- LEARNING. Keep, kill, or re-sequence. Write judgment changes as calibrations that supersede contradictions.
|
|
10841
|
+
- NEXT BET. One next exam \u2014 not a new multi-week program.`;
|
|
10822
10842
|
PYRAMID_OUTPUT_BLOCK = `Structure everything the way a client remembers it \u2014 pyramid, answer first:
|
|
10823
10843
|
- 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.
|
|
10844
|
+
- 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.
|
|
10824
10845
|
- 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.
|
|
10825
10846
|
- 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.
|
|
10826
10847
|
- 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.
|
|
@@ -11595,6 +11616,21 @@ var init_tool_schemas = __esm({
|
|
|
11595
11616
|
required: ["play_id"]
|
|
11596
11617
|
}
|
|
11597
11618
|
},
|
|
11619
|
+
{
|
|
11620
|
+
name: "get_framework_detail",
|
|
11621
|
+
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.",
|
|
11622
|
+
parameters: {
|
|
11623
|
+
type: "object",
|
|
11624
|
+
properties: {
|
|
11625
|
+
framework_id: {
|
|
11626
|
+
type: "string",
|
|
11627
|
+
maxLength: 40,
|
|
11628
|
+
description: "Exact id from the framework catalog, e.g. 'bottleneck', 'packaging', 'aar', 'meddpicc'."
|
|
11629
|
+
}
|
|
11630
|
+
},
|
|
11631
|
+
required: ["framework_id"]
|
|
11632
|
+
}
|
|
11633
|
+
},
|
|
11598
11634
|
{
|
|
11599
11635
|
name: "get_session_brief",
|
|
11600
11636
|
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.",
|
|
@@ -11696,6 +11732,251 @@ var init_tool_arg_validate = __esm({
|
|
|
11696
11732
|
}
|
|
11697
11733
|
});
|
|
11698
11734
|
|
|
11735
|
+
// src/data/frameworks.ts
|
|
11736
|
+
var frameworks_exports = {};
|
|
11737
|
+
__export(frameworks_exports, {
|
|
11738
|
+
FRAMEWORK_PACKS: () => FRAMEWORK_PACKS,
|
|
11739
|
+
PLAY_FRAMEWORK_HOOKS: () => PLAY_FRAMEWORK_HOOKS,
|
|
11740
|
+
buildFrameworkCatalogBlock: () => buildFrameworkCatalogBlock,
|
|
11741
|
+
frameworkIdsForPlay: () => frameworkIdsForPlay,
|
|
11742
|
+
getFrameworkById: () => getFrameworkById,
|
|
11743
|
+
listFrameworkIds: () => listFrameworkIds
|
|
11744
|
+
});
|
|
11745
|
+
function listFrameworkIds() {
|
|
11746
|
+
return FRAMEWORK_PACKS.map((p) => p.id);
|
|
11747
|
+
}
|
|
11748
|
+
function getFrameworkById(id) {
|
|
11749
|
+
return FRAMEWORK_PACKS.find((p) => p.id === id);
|
|
11750
|
+
}
|
|
11751
|
+
function buildFrameworkCatalogBlock() {
|
|
11752
|
+
const lines = FRAMEWORK_PACKS.filter((p) => p.always_on_catalog).map((p) => p.catalog_line);
|
|
11753
|
+
return `FRAMEWORK TOOLKIT (silent brands \u2014 call get_framework_detail for full body; never name brands to the user):
|
|
11754
|
+
${lines.join("\n")}
|
|
11755
|
+
Optional packs via get_framework_detail: meddpicc, challenger, jtbd, porter, mckinsey_7s, ooda.`;
|
|
11756
|
+
}
|
|
11757
|
+
function frameworkIdsForPlay(playId) {
|
|
11758
|
+
return PLAY_FRAMEWORK_HOOKS[playId] ?? [];
|
|
11759
|
+
}
|
|
11760
|
+
var PLAY_FRAMEWORK_HOOKS, SILENT, FRAMEWORK_PACKS;
|
|
11761
|
+
var init_frameworks = __esm({
|
|
11762
|
+
"src/data/frameworks.ts"() {
|
|
11763
|
+
"use strict";
|
|
11764
|
+
PLAY_FRAMEWORK_HOOKS = {
|
|
11765
|
+
"clean-dead-pipeline": ["bottleneck", "heilmeier", "aar"],
|
|
11766
|
+
"unstick-pipeline": ["bottleneck", "okr_measurability", "owner_shape"],
|
|
11767
|
+
"fix-handoff-gap": ["bottleneck", "owner_shape", "aar"],
|
|
11768
|
+
"retarget-effort": ["bottleneck", "gtm_engineering"],
|
|
11769
|
+
"multi-thread-deals": ["owner_shape", "heilmeier"]
|
|
11770
|
+
};
|
|
11771
|
+
SILENT = "Never name this framework (or DARPA, McKinsey, Goldratt, etc.) in customer-visible text. Apply the moves; keep the brand silent.";
|
|
11772
|
+
FRAMEWORK_PACKS = [
|
|
11773
|
+
{
|
|
11774
|
+
id: "bottleneck",
|
|
11775
|
+
catalog_line: "- bottleneck \u2014 name the constraint vital/stage before prescribing; do not fix non-constraints",
|
|
11776
|
+
internal_name: "Theory of Constraints / bottleneck",
|
|
11777
|
+
always_on_catalog: true,
|
|
11778
|
+
vital_links: ["freshness", "flow_rate", "drop_rate", "signal_to_noise", "thread_depth"],
|
|
11779
|
+
board_cut: "One constraint is gating the dollar outcome. Fixing anything else is theater.",
|
|
11780
|
+
operator_cut: "Locate the gating vital (layer order) or the stage where deals die; put the first play there.",
|
|
11781
|
+
when_to_use: "Before recommending a play or sequencing workstreams.",
|
|
11782
|
+
kill_rules: [
|
|
11783
|
+
"If the recommendation does not move the constraint, demote or drop it.",
|
|
11784
|
+
"Do not prescribe parallel fixes that starve the constraint of capacity."
|
|
11785
|
+
],
|
|
11786
|
+
silent_brand_rule: SILENT,
|
|
11787
|
+
body: `BOTTLENECK (constraint first):
|
|
11788
|
+
- Respect layer gating: freshness trust \u2192 flow/drop movement \u2192 signal efficiency \u2192 thread resilience.
|
|
11789
|
+
- Name the single constraint vital or pipeline stage with its score and dollar label.
|
|
11790
|
+
- Prescribe against the constraint first. Non-constraint work is optional polish.
|
|
11791
|
+
- If two problems compete, pick the one that unblocks the other (dependency), not the louder scorecard row.`
|
|
11792
|
+
},
|
|
11793
|
+
{
|
|
11794
|
+
id: "packaging",
|
|
11795
|
+
catalog_line: "- packaging \u2014 answer first, then situation/complication that make it true, then so-what",
|
|
11796
|
+
internal_name: "Minto pyramid + SCQA sibling",
|
|
11797
|
+
always_on_catalog: true,
|
|
11798
|
+
vital_links: [],
|
|
11799
|
+
board_cut: "Open with the call and the dollar. Context is support, not the lead.",
|
|
11800
|
+
operator_cut: "Headline \u226420 words \u2192 2\u20133 non-overlapping drivers \u2192 owner-shaped so-what.",
|
|
11801
|
+
when_to_use: "Every executive-facing answer, finding, recap Story, summary_30k.",
|
|
11802
|
+
kill_rules: ["Never open with methodology or a full scorecard.", "Merge overlapping drivers."],
|
|
11803
|
+
silent_brand_rule: SILENT,
|
|
11804
|
+
body: `PACKAGING (answer-first):
|
|
11805
|
+
- Governing thought first (verdict + dollars).
|
|
11806
|
+
- Then the situation and complication that make the call true (support, not opener).
|
|
11807
|
+
- Then drivers (distinct, non-overlapping) and so-what / ask.
|
|
11808
|
+
- Brief: one headline + \u22642 drivers + one so-what.`
|
|
11809
|
+
},
|
|
11810
|
+
{
|
|
11811
|
+
id: "aar",
|
|
11812
|
+
catalog_line: "- after-action \u2014 what we believed, what changed, next bet",
|
|
11813
|
+
internal_name: "After Action Review",
|
|
11814
|
+
always_on_catalog: true,
|
|
11815
|
+
vital_links: [],
|
|
11816
|
+
board_cut: "What we thought would move, what the instruments showed, what we bet next.",
|
|
11817
|
+
operator_cut: "Belief \u2192 evidence from vitals/metrics \u2192 keep, kill, or re-sequence the play.",
|
|
11818
|
+
when_to_use: "Strategy review, session distill calibrations, win/miss logging.",
|
|
11819
|
+
kill_rules: ["Do not log vanity narrative without a measured instrument.", "Calibrations supersede; do not pile contradictions."],
|
|
11820
|
+
silent_brand_rule: SILENT,
|
|
11821
|
+
body: `AFTER-ACTION:
|
|
11822
|
+
- BELIEF: what we expected to move (metric + range + check date).
|
|
11823
|
+
- EVIDENCE: what the instruments actually showed (baseline \u2192 reading).
|
|
11824
|
+
- LEARNING: keep, kill, or re-sequence \u2014 write as a calibration when judgment changed.
|
|
11825
|
+
- NEXT BET: the single next exam, not a new multi-week program.`
|
|
11826
|
+
},
|
|
11827
|
+
{
|
|
11828
|
+
id: "owner_shape",
|
|
11829
|
+
catalog_line: "- owner-shape \u2014 function-shaped owner and decision rights; not named people",
|
|
11830
|
+
internal_name: "RACI-lite",
|
|
11831
|
+
always_on_catalog: true,
|
|
11832
|
+
vital_links: [],
|
|
11833
|
+
board_cut: "Every ask names who decides and who executes by function.",
|
|
11834
|
+
operator_cut: "RevOps / AE lead / CS lead / Marketing ops \u2014 R does, A decides; avoid named individuals in plans.",
|
|
11835
|
+
when_to_use: "Workstream titles, handoff plans, play prescriptions.",
|
|
11836
|
+
kill_rules: ["No orphan actions without an accountable function.", "Do not invent headcount or reorgs."],
|
|
11837
|
+
silent_brand_rule: SILENT,
|
|
11838
|
+
body: `OWNER-SHAPE:
|
|
11839
|
+
- Name the function (RevOps, sales manager, CS lead, marketing ops) \u2014 not a person's name from the CRM.
|
|
11840
|
+
- Accountable decides; Responsible executes. Consulted optional; Inform via existing channels.
|
|
11841
|
+
- First action must be startable by that function within 48 hours with no new tooling.`
|
|
11842
|
+
},
|
|
11843
|
+
{
|
|
11844
|
+
id: "okr_measurability",
|
|
11845
|
+
catalog_line: "- exams \u2014 mid-term and final checks as dated key results with instruments",
|
|
11846
|
+
internal_name: "OKR / measurability dialect",
|
|
11847
|
+
always_on_catalog: true,
|
|
11848
|
+
vital_links: ["freshness", "flow_rate", "drop_rate", "signal_to_noise", "thread_depth"],
|
|
11849
|
+
board_cut: "Objective + dated key results the board can re-read next quarter.",
|
|
11850
|
+
operator_cut: "Baseline, target range, check date, measured_by instrument \u2014 or demote to assumption.",
|
|
11851
|
+
when_to_use: "Strategist outcomes, Heilmeier exams, milestones.",
|
|
11852
|
+
kill_rules: ["No 'improve' without a number.", "No exam faster than sales-cycle physics."],
|
|
11853
|
+
silent_brand_rule: SILENT,
|
|
11854
|
+
body: `EXAMS (objective + key results):
|
|
11855
|
+
- Objective = precise end state in one line.
|
|
11856
|
+
- Key results = mid-term check + final exam: metric, baseline, target RANGE, check date, instrument.
|
|
11857
|
+
- If unmeasurable with current data, exclude from targets and record as an assumption.`
|
|
11858
|
+
},
|
|
11859
|
+
{
|
|
11860
|
+
id: "heilmeier",
|
|
11861
|
+
catalog_line: "- idea-gate \u2014 newness, stake, and exams must pass before a recommendation ships",
|
|
11862
|
+
internal_name: "Heilmeier catechism",
|
|
11863
|
+
always_on_catalog: true,
|
|
11864
|
+
vital_links: [],
|
|
11865
|
+
board_cut: "Only recommendations with stake and exams reach the room.",
|
|
11866
|
+
operator_cut: "Kill restatements; demote unmeasurable ideas.",
|
|
11867
|
+
when_to_use: "Deep recommend, think before draft_strategy, strategist Stage C.",
|
|
11868
|
+
kill_rules: ["Fail newness, stake, or exams \u2192 do not recommend."],
|
|
11869
|
+
silent_brand_rule: SILENT,
|
|
11870
|
+
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.`
|
|
11871
|
+
},
|
|
11872
|
+
{
|
|
11873
|
+
id: "minto",
|
|
11874
|
+
catalog_line: "- pyramid \u2014 headline, drivers, so-what for recall",
|
|
11875
|
+
internal_name: "Minto Pyramid Principle",
|
|
11876
|
+
always_on_catalog: true,
|
|
11877
|
+
vital_links: [],
|
|
11878
|
+
board_cut: "Repeatable headline + one number an hour later.",
|
|
11879
|
+
operator_cut: "Same shape for findings and deep answers.",
|
|
11880
|
+
when_to_use: "All packaged analyst prose.",
|
|
11881
|
+
kill_rules: ["Methodology-first openers die."],
|
|
11882
|
+
silent_brand_rule: SILENT,
|
|
11883
|
+
body: `PYRAMID: HEADLINE FIRST \u2192 DRIVERS (non-overlapping) \u2192 SO-WHAT. Recall test. Altitude control.`
|
|
11884
|
+
},
|
|
11885
|
+
{
|
|
11886
|
+
id: "gtm_engineering",
|
|
11887
|
+
catalog_line: "- systems \u2014 data foundation \u2192 modeling \u2192 activation; mechanism per fix",
|
|
11888
|
+
internal_name: "GTM engineering",
|
|
11889
|
+
always_on_catalog: true,
|
|
11890
|
+
vital_links: ["signal_to_noise", "drop_rate", "freshness"],
|
|
11891
|
+
board_cut: "Durable systems, not heroics.",
|
|
11892
|
+
operator_cut: "Pair every cleanup with a mechanism and an instrument.",
|
|
11893
|
+
when_to_use: "When recommending action on tool-capable surfaces.",
|
|
11894
|
+
kill_rules: ["Skipping the rung below will not hold."],
|
|
11895
|
+
silent_brand_rule: SILENT,
|
|
11896
|
+
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.`
|
|
11897
|
+
},
|
|
11898
|
+
{
|
|
11899
|
+
id: "meddpicc",
|
|
11900
|
+
catalog_line: "- deal-qualification pack (optional) \u2014 use when threading or late-stage risk needs a qualification lens",
|
|
11901
|
+
internal_name: "MEDDPICC",
|
|
11902
|
+
always_on_catalog: false,
|
|
11903
|
+
vital_links: ["thread_depth", "flow_rate"],
|
|
11904
|
+
board_cut: "Late-stage risk is usually missing economic buyer or decision process \u2014 not more activity.",
|
|
11905
|
+
operator_cut: "Map Metrics, Economic buyer, Decision criteria/process, Paper process, Identify pain, Champion, Competition \u2014 as observation, not CRM surgery.",
|
|
11906
|
+
when_to_use: "Thread-depth or stuck late-stage deals when the user asks how to qualify.",
|
|
11907
|
+
kill_rules: ["Do not rewrite the CRM; observe and recommend contacts/process gaps."],
|
|
11908
|
+
silent_brand_rule: SILENT,
|
|
11909
|
+
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.`
|
|
11910
|
+
},
|
|
11911
|
+
{
|
|
11912
|
+
id: "challenger",
|
|
11913
|
+
catalog_line: "- teach-tailor-take pack (optional) \u2014 pressure-test weak narratives in think",
|
|
11914
|
+
internal_name: "Challenger Sale",
|
|
11915
|
+
always_on_catalog: false,
|
|
11916
|
+
vital_links: ["signal_to_noise"],
|
|
11917
|
+
board_cut: "Insight that reframes the problem beats more activity.",
|
|
11918
|
+
operator_cut: "In think: teach with evidence, tailor to this pipeline, take control of next step \u2014 still stethoscope.",
|
|
11919
|
+
when_to_use: "Think channel when the user is soft on a weak story.",
|
|
11920
|
+
kill_rules: ["Do not turn into a pitch script or CRM sequence builder."],
|
|
11921
|
+
silent_brand_rule: SILENT,
|
|
11922
|
+
body: `TEACH-TAILOR-TAKE: reframe with verified numbers; tailor to segment/motion; land one owner-shaped next step.`
|
|
11923
|
+
},
|
|
11924
|
+
{
|
|
11925
|
+
id: "jtbd",
|
|
11926
|
+
catalog_line: "- job-of-the-metric pack (optional) \u2014 what job this number does for this board",
|
|
11927
|
+
internal_name: "Jobs to be Done",
|
|
11928
|
+
always_on_catalog: false,
|
|
11929
|
+
vital_links: [],
|
|
11930
|
+
board_cut: "Each metric has a job in a decision \u2014 name the job or drop the chart.",
|
|
11931
|
+
operator_cut: "When explaining ARR/NRR/vitals: what decision does this number unlock?",
|
|
11932
|
+
when_to_use: "Metric definitions / board deck framing.",
|
|
11933
|
+
kill_rules: ["Ornamental metrics without a decision job die."],
|
|
11934
|
+
silent_brand_rule: SILENT,
|
|
11935
|
+
body: `JOB OF THE METRIC: for each number, name the decision it serves. If none, cut it from the board package.`
|
|
11936
|
+
},
|
|
11937
|
+
{
|
|
11938
|
+
id: "porter",
|
|
11939
|
+
catalog_line: "- industry-structure pack (optional, weak vital fit) \u2014 only if the user asks competitive structure",
|
|
11940
|
+
internal_name: "Porter Five Forces",
|
|
11941
|
+
always_on_catalog: false,
|
|
11942
|
+
vital_links: [],
|
|
11943
|
+
board_cut: "Industry structure is context, not a substitute for pipeline dollars.",
|
|
11944
|
+
operator_cut: "Do not let industry essays displace vital-sign evidence.",
|
|
11945
|
+
when_to_use: "Only when the user explicitly asks for competitive structure.",
|
|
11946
|
+
kill_rules: ["Never use as a substitute for gating vital diagnosis."],
|
|
11947
|
+
silent_brand_rule: SILENT,
|
|
11948
|
+
body: `INDUSTRY STRUCTURE: optional context. Prefer vital signs and dollars for recommendations.`
|
|
11949
|
+
},
|
|
11950
|
+
{
|
|
11951
|
+
id: "mckinsey_7s",
|
|
11952
|
+
catalog_line: "- org-alignment pack (optional, weak vital fit) \u2014 only if the user asks org design",
|
|
11953
|
+
internal_name: "McKinsey 7S",
|
|
11954
|
+
always_on_catalog: false,
|
|
11955
|
+
vital_links: [],
|
|
11956
|
+
board_cut: "Org redesign is out of stethoscope scope.",
|
|
11957
|
+
operator_cut: "Refuse surgery; observe handoff/ownership symptoms via vitals.",
|
|
11958
|
+
when_to_use: "Only if asked; redirect to owner-shape + bottleneck.",
|
|
11959
|
+
kill_rules: ["No reorg prescriptions."],
|
|
11960
|
+
silent_brand_rule: SILENT,
|
|
11961
|
+
body: `ORG ALIGNMENT: out of scope for CRM surgery. Point to function-shaped owners and the constraint vital instead.`
|
|
11962
|
+
},
|
|
11963
|
+
{
|
|
11964
|
+
id: "ooda",
|
|
11965
|
+
catalog_line: "- observe-orient loop pack (optional) \u2014 overlaps gating; use sparingly",
|
|
11966
|
+
internal_name: "OODA",
|
|
11967
|
+
always_on_catalog: false,
|
|
11968
|
+
vital_links: [],
|
|
11969
|
+
board_cut: "Prefer layer gating and hypothesis-first grounding.",
|
|
11970
|
+
operator_cut: "Already covered by Stage A + bottleneck \u2014 do not duplicate jargon.",
|
|
11971
|
+
when_to_use: "Rarely; prefer existing grounding.",
|
|
11972
|
+
kill_rules: ["Do not invent a parallel loop vocabulary for the user."],
|
|
11973
|
+
silent_brand_rule: SILENT,
|
|
11974
|
+
body: `OBSERVE-ORIENT: prefer NTRP layer gating and Stage A hypothesis-first over a separate combat loop.`
|
|
11975
|
+
}
|
|
11976
|
+
];
|
|
11977
|
+
}
|
|
11978
|
+
});
|
|
11979
|
+
|
|
11699
11980
|
// src/baselines/metrics-benchmarks.ts
|
|
11700
11981
|
function resolveMetricBenchmarks(motion) {
|
|
11701
11982
|
return METRICS_BENCHMARKS[motion ?? "mid_market"];
|
|
@@ -12962,10 +13243,12 @@ var init_agent_context = __esm({
|
|
|
12962
13243
|
var scope_exports = {};
|
|
12963
13244
|
__export(scope_exports, {
|
|
12964
13245
|
confirmScope: () => confirmScope,
|
|
13246
|
+
isBackInput: () => isBackInput,
|
|
12965
13247
|
isScopeAdjustInput: () => isScopeAdjustInput,
|
|
12966
13248
|
isScopeConfirmInput: () => isScopeConfirmInput,
|
|
12967
13249
|
isSkipClarifier: () => isSkipClarifier,
|
|
12968
|
-
proposeScopeFromIntent: () => proposeScopeFromIntent
|
|
13250
|
+
proposeScopeFromIntent: () => proposeScopeFromIntent,
|
|
13251
|
+
unconfirmScope: () => unconfirmScope
|
|
12969
13252
|
});
|
|
12970
13253
|
function proposeScopeFromIntent(input) {
|
|
12971
13254
|
const text = input.trim();
|
|
@@ -13010,12 +13293,20 @@ function confirmScope(ctx) {
|
|
|
13010
13293
|
if (ctx.scope.primary_lens === "revenue_metrics" || ctx.scope.primary_lens === "gtm_health") {
|
|
13011
13294
|
}
|
|
13012
13295
|
}
|
|
13296
|
+
function unconfirmScope(ctx) {
|
|
13297
|
+
if (!ctx.scope?.confirmed_at) return;
|
|
13298
|
+
const { confirmed_at: _dropped, ...rest } = ctx.scope;
|
|
13299
|
+
ctx.scope = rest;
|
|
13300
|
+
}
|
|
13013
13301
|
function isScopeConfirmInput(input) {
|
|
13014
13302
|
return /^(yes|y|yeah|yep|correct|looks good|that'?s right|confirm|ok|okay|go)$/i.test(input.trim());
|
|
13015
13303
|
}
|
|
13016
13304
|
function isScopeAdjustInput(input) {
|
|
13017
13305
|
return /^(adjust|change|refine|edit|no|nope)$/i.test(input.trim());
|
|
13018
13306
|
}
|
|
13307
|
+
function isBackInput(input) {
|
|
13308
|
+
return /^(b|back|prev)\s*[.!]?\s*$/i.test(input.trim());
|
|
13309
|
+
}
|
|
13019
13310
|
function isSkipClarifier(input) {
|
|
13020
13311
|
return /^skip$/i.test(input.trim());
|
|
13021
13312
|
}
|
|
@@ -13966,7 +14257,8 @@ function buildConversationPrompt(ctx) {
|
|
|
13966
14257
|
const enterHint2 = action ? chalk8.dim(` \xB7 \u23CE ${action.hint}`) : "";
|
|
13967
14258
|
return accentPromptHead(phase, sessionName) + chalk8.dim(stack) + enterHint2 + " ";
|
|
13968
14259
|
}
|
|
13969
|
-
const
|
|
14260
|
+
const modalBack = phase === "scope" || phase === "awaiting_data" || phase === "strategize" ? " \xB7 b back" : "";
|
|
14261
|
+
const enterHint = action ? chalk8.dim(`\u23CE ${action.hint}${modalBack} `) : "";
|
|
13970
14262
|
return accentPromptHead(phase, sessionName) + enterHint;
|
|
13971
14263
|
}
|
|
13972
14264
|
var PROMPT_LABELS;
|
|
@@ -17012,10 +17304,10 @@ function wrapForTarget(target, analysisBlock, conversationBlock, openQuestions,
|
|
|
17012
17304
|
const contextLabel = handoffInstructionPrefix(ctx.analysis.primary);
|
|
17013
17305
|
const forWhom = audiencePhrase(ctx.scope?.audience);
|
|
17014
17306
|
const instructions = {
|
|
17015
|
-
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; (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.`,
|
|
17016
|
-
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.`,
|
|
17307
|
+
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.`,
|
|
17308
|
+
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.`,
|
|
17017
17309
|
clay: `produce a Clay table specification to operationalize the highest-impact finding for ${forWhom}.`,
|
|
17018
|
-
plan: `produce a prioritized action plan for ${forWhom}, answer-first: open with the governing call (highest-dollar problem), then items each with problem, play, first 3 steps, owner, and leading indicator. Ground indicators in the Metric definitions appendix. End with the sharpest asks / decisions.`
|
|
17310
|
+
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.`
|
|
17019
17311
|
};
|
|
17020
17312
|
const parts = [
|
|
17021
17313
|
`# NTRP handoff \u2192 ${target}`,
|
|
@@ -17410,13 +17702,16 @@ ${companyContextSection2()}${operatorSection2()}HOW YOU THINK (the strategist me
|
|
|
17410
17702
|
8. RESPECT CAPACITY. Total effort must fit the team that actually exists. A brilliant plan the team cannot staff is a bad plan.
|
|
17411
17703
|
|
|
17412
17704
|
ALTITUDE CONTRACT (the plan must work at every altitude a client reads it at):
|
|
17413
|
-
- 30,000 FT: summary_30k is answer-first \u2014 open with the governing thought and what leadership should expect by when, then the situation and complication that make it true. A board member reads only this; it must survive being forwarded unedited.
|
|
17414
|
-
- 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.
|
|
17705
|
+
- 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.
|
|
17706
|
+
- 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).
|
|
17415
17707
|
- 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.
|
|
17416
17708
|
|
|
17417
17709
|
OUTPUT DOCTRINE (narrative fields \u2014 summary_30k and workstream problem lines \u2014 follow pyramid recall):
|
|
17418
17710
|
${PYRAMID_OUTPUT_BLOCK}
|
|
17419
17711
|
|
|
17712
|
+
OWNER SHAPE (workstreams and actions \u2014 silent):
|
|
17713
|
+
${OWNER_SHAPE_BLOCK}
|
|
17714
|
+
|
|
17420
17715
|
${buildUserVisibleProseBlock()}
|
|
17421
17716
|
|
|
17422
17717
|
GTM ENGINEERING (plans install systems, not heroics):
|
|
@@ -17431,7 +17726,10 @@ ${METRICS_BLOCK}
|
|
|
17431
17726
|
PLAYBOOK (every workstream must link to at least one play by exact id):
|
|
17432
17727
|
${buildPlaybookBlock()}
|
|
17433
17728
|
|
|
17729
|
+
${buildFrameworkCatalogBlock()}
|
|
17730
|
+
|
|
17434
17731
|
MEASURABILITY CONTRACT (non-negotiable \u2014 this is what separates you from a slide deck):
|
|
17732
|
+
- Treat the objective as the end state; treat expected outcomes and leading indicators as key results (mid-term and final exams).
|
|
17435
17733
|
- 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.
|
|
17436
17734
|
- 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.
|
|
17437
17735
|
- Every workstream needs at least one dated milestone with a verification method that names a number and threshold.
|
|
@@ -17450,9 +17748,13 @@ function buildGroundingMessage(input) {
|
|
|
17450
17748
|
|
|
17451
17749
|
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.
|
|
17452
17750
|
1. Current state: which vital signs / metrics are worst, what are the exact scores and dollar values, which segments concentrate the problem?
|
|
17453
|
-
2.
|
|
17454
|
-
3. What
|
|
17455
|
-
|
|
17751
|
+
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.
|
|
17752
|
+
3. What is already in flight (active strategies below, if any), what has worked before (wins), and what the local play track record says.
|
|
17753
|
+
4. What are the binding constraints: data gaps that limit measurability, sales-cycle length that bounds verification speed, capacity signals?
|
|
17754
|
+
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.
|
|
17755
|
+
|
|
17756
|
+
BOTTLENECK (silent):
|
|
17757
|
+
${BOTTLENECK_GATE}`);
|
|
17456
17758
|
sections.push(`CURRENT HEALTH SNAPSHOT (verified \u2014 you may cite these numbers as baselines):
|
|
17457
17759
|
${input.healthSnapshot}`);
|
|
17458
17760
|
if (input.gapAuditBlock) {
|
|
@@ -17501,6 +17803,8 @@ function buildStressTestMessage() {
|
|
|
17501
17803
|
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?
|
|
17502
17804
|
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.
|
|
17503
17805
|
${HEILMEIER_GATE}
|
|
17806
|
+
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.
|
|
17807
|
+
${AAR_BLOCK}
|
|
17504
17808
|
|
|
17505
17809
|
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.`;
|
|
17506
17810
|
}
|
|
@@ -17509,6 +17813,7 @@ var init_strategist_prompt = __esm({
|
|
|
17509
17813
|
"src/ai/strategist-prompt.ts"() {
|
|
17510
17814
|
"use strict";
|
|
17511
17815
|
init_prompt_parts();
|
|
17816
|
+
init_frameworks();
|
|
17512
17817
|
init_prompt();
|
|
17513
17818
|
STRATEGIST_PLAN_SCHEMA_BLOCK = `{
|
|
17514
17819
|
"title": "Short plan name, e.g. 'Q4 Pipeline Recovery'",
|
|
@@ -18544,7 +18849,7 @@ async function handleStrategizeFlow(input, ctx) {
|
|
|
18544
18849
|
" " + chalk17.dim("That looks like a question. A strategy objective is waiting.")
|
|
18545
18850
|
);
|
|
18546
18851
|
console.log(
|
|
18547
|
-
" " + chalk17.dim("Type ") + chalk17.cyan("yes") + chalk17.dim(" to make the plan. Type ") + chalk17.cyan("adjust") + chalk17.dim(" to change the objective. Type ") + chalk17.cyan("cancel") + chalk17.dim(" to answer questions first.")
|
|
18852
|
+
" " + chalk17.dim("Type ") + chalk17.cyan("yes") + chalk17.dim(" to make the plan. Type ") + chalk17.cyan("b") + chalk17.dim(" / ") + chalk17.cyan("adjust") + chalk17.dim(" to change the objective. Type ") + chalk17.cyan("cancel") + chalk17.dim(" to answer questions first.")
|
|
18548
18853
|
);
|
|
18549
18854
|
console.log();
|
|
18550
18855
|
return "Awaiting confirm";
|
|
@@ -18557,7 +18862,7 @@ async function handleStrategizeFlow(input, ctx) {
|
|
|
18557
18862
|
}
|
|
18558
18863
|
console.log();
|
|
18559
18864
|
console.log(
|
|
18560
|
-
" " + chalk17.dim("Type ") + chalk17.cyan("yes") + chalk17.dim(" to make the plan. Type ") + chalk17.cyan("adjust") + chalk17.dim(" to change the objective. Type ") + chalk17.cyan("cancel") + chalk17.dim(" to stop.")
|
|
18865
|
+
" " + chalk17.dim("Type ") + chalk17.cyan("yes") + chalk17.dim(" to make the plan. Type ") + chalk17.cyan("b") + chalk17.dim(" / ") + chalk17.cyan("adjust") + chalk17.dim(" to change the objective. Type ") + chalk17.cyan("cancel") + chalk17.dim(" to stop.")
|
|
18561
18866
|
);
|
|
18562
18867
|
console.log();
|
|
18563
18868
|
return "Awaiting confirm";
|
|
@@ -18734,7 +19039,7 @@ function printObjectiveCard(ctx, objective, proposed) {
|
|
|
18734
19039
|
);
|
|
18735
19040
|
console.log();
|
|
18736
19041
|
console.log(
|
|
18737
|
-
" " + chalk17.dim("Confirm? ") + chalk17.cyan("\u23CE yes") + chalk17.dim(" \xB7 ") + chalk17.cyan("adjust") + chalk17.dim(" \xB7 ") + chalk17.cyan("cancel")
|
|
19042
|
+
" " + chalk17.dim("Confirm? ") + chalk17.cyan("\u23CE yes") + chalk17.dim(" \xB7 ") + chalk17.cyan("b back") + chalk17.dim(" \xB7 ") + chalk17.cyan("adjust") + chalk17.dim(" \xB7 ") + chalk17.cyan("cancel")
|
|
18738
19043
|
);
|
|
18739
19044
|
console.log();
|
|
18740
19045
|
}
|
|
@@ -18849,6 +19154,7 @@ var init_ghost_hints = __esm({
|
|
|
18849
19154
|
],
|
|
18850
19155
|
explore: [
|
|
18851
19156
|
'try "what is the most expensive problem?"',
|
|
19157
|
+
'try "which constraint is gating the dollars?"',
|
|
18852
19158
|
'try "how should we fix this?"',
|
|
18853
19159
|
'try "which segment is weakest?"',
|
|
18854
19160
|
'try "what is ARR?"',
|
|
@@ -18876,7 +19182,7 @@ function buildSituationalAwarenessBlock(ctx, opts = {}) {
|
|
|
18876
19182
|
`Phase: ${phase} (${formatPhaseLabel(phase)}) \u2014 ${PHASE_MEANING[phase]}`
|
|
18877
19183
|
];
|
|
18878
19184
|
if (channel === "think") {
|
|
18879
|
-
lines.push("Channel: think \u2014 socratic partner; type done/cancel returns to \u203A");
|
|
19185
|
+
lines.push("Channel: think \u2014 socratic partner; type done/cancel/b back returns to \u203A");
|
|
18880
19186
|
lines.push("Response mode: deep (tools on)");
|
|
18881
19187
|
} else if (channel === "strategist") {
|
|
18882
19188
|
lines.push("Channel: strategist \u2014 measurable plan engine owns sequencing");
|
|
@@ -18920,11 +19226,13 @@ function buildSituationalAwarenessBlock(ctx, opts = {}) {
|
|
|
18920
19226
|
} else if (phase === "awaiting_data") {
|
|
18921
19227
|
lines.push("Already done: scope confirmed; analysis not ready");
|
|
18922
19228
|
lines.push(
|
|
18923
|
-
'Available now: tell the user to paste a CSV path, type "use demo data",
|
|
19229
|
+
'Available now: tell the user to paste a CSV path, type "use demo data", \u23CE go ahead when can_compute, or b/back to rewind the focus card \u2014 you cannot open files'
|
|
18924
19230
|
);
|
|
18925
19231
|
} else if (phase === "scope") {
|
|
18926
19232
|
lines.push("Already done: intent proposed; waiting on confirm");
|
|
18927
|
-
lines.push(
|
|
19233
|
+
lines.push(
|
|
19234
|
+
"Available now: wait for CLI confirm (\u23CE yes) or b/back/adjust \u2014 do not invent a different question"
|
|
19235
|
+
);
|
|
18928
19236
|
} else if (phase === "orient") {
|
|
18929
19237
|
lines.push("Already done: nothing locked yet");
|
|
18930
19238
|
lines.push("Available now: help the user name a focus; CLI will propose scope from their words");
|
|
@@ -18939,9 +19247,28 @@ function buildSituationalAwarenessBlock(ctx, opts = {}) {
|
|
|
18939
19247
|
if (examples.length > 0) {
|
|
18940
19248
|
lines.push(`User may try: ${examples.join(" \xB7 ")}`);
|
|
18941
19249
|
}
|
|
18942
|
-
|
|
18943
|
-
|
|
18944
|
-
|
|
19250
|
+
if (channel === "think") {
|
|
19251
|
+
lines.push(
|
|
19252
|
+
"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"
|
|
19253
|
+
);
|
|
19254
|
+
} else if (responseMode === "brief") {
|
|
19255
|
+
lines.push(
|
|
19256
|
+
"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"
|
|
19257
|
+
);
|
|
19258
|
+
} else {
|
|
19259
|
+
lines.push(
|
|
19260
|
+
"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"
|
|
19261
|
+
);
|
|
19262
|
+
}
|
|
19263
|
+
if (analysisReady) {
|
|
19264
|
+
lines.push(
|
|
19265
|
+
"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"
|
|
19266
|
+
);
|
|
19267
|
+
} else {
|
|
19268
|
+
lines.push(
|
|
19269
|
+
"Your job in this harness: help the user through the funnel; CLI owns pre-explore gates"
|
|
19270
|
+
);
|
|
19271
|
+
}
|
|
18945
19272
|
lines.push(
|
|
18946
19273
|
"Pre-explore funnel gates are handled by the CLI; you speak in explore/think/strategist unless tools explicitly allow a restart"
|
|
18947
19274
|
);
|
|
@@ -18954,10 +19281,12 @@ function buildSituationalRuntimeFacts(ctx, opts = {}) {
|
|
|
18954
19281
|
return {
|
|
18955
19282
|
phase,
|
|
18956
19283
|
mode: responseMode,
|
|
19284
|
+
channel,
|
|
18957
19285
|
lens: ctx.scope?.primary_lens,
|
|
18958
19286
|
stage: ctx.stage,
|
|
18959
19287
|
can_compute: ctx.gapAudit?.can_compute === void 0 ? void 0 : String(ctx.gapAudit.can_compute),
|
|
18960
|
-
engine: canUseReplAi(ctx) ? "connected" : "none"
|
|
19288
|
+
engine: canUseReplAi(ctx) ? "connected" : "none",
|
|
19289
|
+
idea_gate: channel === "think" || responseMode === "deep" ? "on" : "off"
|
|
18961
19290
|
};
|
|
18962
19291
|
}
|
|
18963
19292
|
function getConversationPhaseBlock(ctx, opts = {}) {
|
|
@@ -18976,13 +19305,13 @@ var init_situation = __esm({
|
|
|
18976
19305
|
FUNNEL_SPINE = "Funnel: orient \u2192 scope \u2192 data \u2192 compute \u2192 explore | side doors: think, strategy, ship";
|
|
18977
19306
|
PHASE_MEANING = {
|
|
18978
19307
|
orient: "setup \u2014 open chat; user has not locked a scope yet",
|
|
18979
|
-
scope: "scope confirm \u2014 CLI owns yes/adjust; do not re-propose unless asked",
|
|
18980
|
-
awaiting_data: "data gate \u2014 load CSV/demo or compute; CLI owns the gate",
|
|
19308
|
+
scope: "scope confirm \u2014 CLI owns yes / b back / adjust; do not re-propose unless asked",
|
|
19309
|
+
awaiting_data: "data gate \u2014 load CSV/demo or compute; b/back rewinds to scope confirm (does not unload data); CLI owns the gate",
|
|
18981
19310
|
compute: "compute in progress \u2014 wait",
|
|
18982
19311
|
explore: "analysis complete \u2014 free-form Q&A on this session's artifact",
|
|
18983
|
-
think: "socratic think channel \u2014 return to \u203A via done/cancel",
|
|
18984
|
-
strategize: "strategist flow \u2014 objective confirm or plan drafting",
|
|
18985
|
-
deliver: "ship/handoff wizard \u2014 CLI owns write confirms"
|
|
19312
|
+
think: "socratic think channel \u2014 return to \u203A via done/cancel/b back",
|
|
19313
|
+
strategize: "strategist flow \u2014 objective confirm (yes / b back / adjust) or plan drafting",
|
|
19314
|
+
deliver: "ship/handoff wizard \u2014 CLI owns write confirms; b/back or cancel leaves the draft"
|
|
18986
19315
|
};
|
|
18987
19316
|
}
|
|
18988
19317
|
});
|
|
@@ -25280,6 +25609,7 @@ async function handleGetPlayDetail(input) {
|
|
|
25280
25609
|
}
|
|
25281
25610
|
} catch {
|
|
25282
25611
|
}
|
|
25612
|
+
const { frameworkIdsForPlay: frameworkIdsForPlay2 } = await Promise.resolve().then(() => (init_frameworks(), frameworks_exports));
|
|
25283
25613
|
const detail = {
|
|
25284
25614
|
play_id: play.id,
|
|
25285
25615
|
play_name: play.name,
|
|
@@ -25291,7 +25621,8 @@ async function handleGetPlayDetail(input) {
|
|
|
25291
25621
|
tools_that_help: play.tools_that_help,
|
|
25292
25622
|
expected_outcome: play.expected_outcome,
|
|
25293
25623
|
source: play.source ?? "seed",
|
|
25294
|
-
local_track_record: trackRecord
|
|
25624
|
+
local_track_record: trackRecord,
|
|
25625
|
+
framework_ids: frameworkIdsForPlay2(play.id)
|
|
25295
25626
|
};
|
|
25296
25627
|
if (play.source === "learned") {
|
|
25297
25628
|
detail.security_notice = UNTRUSTED_CONTENT_NOTICE;
|
|
@@ -25302,6 +25633,30 @@ async function handleGetPlayDetail(input) {
|
|
|
25302
25633
|
}
|
|
25303
25634
|
return detail;
|
|
25304
25635
|
}
|
|
25636
|
+
async function handleGetFrameworkDetail(input) {
|
|
25637
|
+
const frameworkId = typeof input.framework_id === "string" ? input.framework_id.trim() : "";
|
|
25638
|
+
const { getFrameworkById: getFrameworkById2, listFrameworkIds: listFrameworkIds2 } = await Promise.resolve().then(() => (init_frameworks(), frameworks_exports));
|
|
25639
|
+
const pack = frameworkId ? getFrameworkById2(frameworkId) : void 0;
|
|
25640
|
+
if (!pack) {
|
|
25641
|
+
return {
|
|
25642
|
+
error: `Unknown framework id '${frameworkId}'.`,
|
|
25643
|
+
valid_framework_ids: listFrameworkIds2()
|
|
25644
|
+
};
|
|
25645
|
+
}
|
|
25646
|
+
return {
|
|
25647
|
+
framework_id: pack.id,
|
|
25648
|
+
catalog_line: pack.catalog_line,
|
|
25649
|
+
always_on_catalog: pack.always_on_catalog,
|
|
25650
|
+
vital_links: pack.vital_links,
|
|
25651
|
+
board_cut: pack.board_cut,
|
|
25652
|
+
operator_cut: pack.operator_cut,
|
|
25653
|
+
when_to_use: pack.when_to_use,
|
|
25654
|
+
kill_rules: pack.kill_rules,
|
|
25655
|
+
silent_brand_rule: pack.silent_brand_rule,
|
|
25656
|
+
body: pack.body,
|
|
25657
|
+
notice: "Apply the moves in body/board_cut/operator_cut. Never name internal brand labels to the user."
|
|
25658
|
+
};
|
|
25659
|
+
}
|
|
25305
25660
|
async function handleGetRevenueMetrics(_input, ctx) {
|
|
25306
25661
|
if (!ctx.metrics || ctx.metrics.length === 0) {
|
|
25307
25662
|
const { computeFullMetrics: computeFullMetrics2 } = await Promise.resolve().then(() => (init_compute(), compute_exports));
|
|
@@ -25596,6 +25951,7 @@ var init_tool_handlers = __esm({
|
|
|
25596
25951
|
query_segment_comparison: handleQuerySegmentComparison,
|
|
25597
25952
|
query_entity_counts: (input, _) => handleQueryEntityCounts(input),
|
|
25598
25953
|
get_play_detail: (input, _) => handleGetPlayDetail(input),
|
|
25954
|
+
get_framework_detail: (input, _) => handleGetFrameworkDetail(input),
|
|
25599
25955
|
get_session_brief: (input, _) => handleGetSessionBrief(input),
|
|
25600
25956
|
get_revenue_metrics: handleGetRevenueMetrics,
|
|
25601
25957
|
get_revenue_metrics_timeseries: (input, _) => handleGetRevenueMetricsTimeseries(input),
|
|
@@ -25733,6 +26089,12 @@ ${GTM_ENGINEERING_BLOCK}
|
|
|
25733
26089
|
IDEA GATE (when recommending a play or before draft_strategy \u2014 silent; probing/imagination turns skip this until you conclude):
|
|
25734
26090
|
${HEILMEIER_GATE}
|
|
25735
26091
|
|
|
26092
|
+
BOTTLENECK (when concluding or recommending \u2014 silent):
|
|
26093
|
+
${BOTTLENECK_GATE}
|
|
26094
|
+
|
|
26095
|
+
OWNER SHAPE (when recommending \u2014 silent):
|
|
26096
|
+
${OWNER_SHAPE_BLOCK}
|
|
26097
|
+
|
|
25736
26098
|
OUTPUT DOCTRINE (how answers are structured for recall):
|
|
25737
26099
|
${PYRAMID_OUTPUT_BLOCK}
|
|
25738
26100
|
|
|
@@ -25747,6 +26109,8 @@ ${VITAL_SIGNS_BLOCK}
|
|
|
25747
26109
|
PLAYBOOK \u2014 name a play when it helps the user act (not a full program):
|
|
25748
26110
|
${buildPlaybookBlock()}
|
|
25749
26111
|
|
|
26112
|
+
${buildFrameworkCatalogBlock()}
|
|
26113
|
+
|
|
25750
26114
|
${commandSection}
|
|
25751
26115
|
${formattingSection}
|
|
25752
26116
|
OUTPUT RULES:
|
|
@@ -25775,6 +26139,7 @@ var init_think_prompt = __esm({
|
|
|
25775
26139
|
"src/ai/think-prompt.ts"() {
|
|
25776
26140
|
"use strict";
|
|
25777
26141
|
init_prompt_parts();
|
|
26142
|
+
init_frameworks();
|
|
25778
26143
|
init_prompt();
|
|
25779
26144
|
}
|
|
25780
26145
|
});
|
|
@@ -25969,7 +26334,7 @@ ${commandStyleRule}`;
|
|
|
25969
26334
|
- 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.
|
|
25970
26335
|
- Include specific numbers from tool results, never guess.
|
|
25971
26336
|
- When you have enough information, answer directly. Don't call tools you don't need.`;
|
|
25972
|
-
const executionBiasSection = responseMode === "brief" ? `OUTPUT DOCTRINE (brief \u2014 one headline + \u22642 drivers + one so-what):
|
|
26337
|
+
const executionBiasSection = responseMode === "brief" ? `OUTPUT DOCTRINE (brief \u2014 one headline + \u22642 drivers + one so-what; situation/complication only as support after the headline):
|
|
25973
26338
|
${PYRAMID_OUTPUT_BLOCK}
|
|
25974
26339
|
|
|
25975
26340
|
` : `EXECUTION BIAS (how you work):
|
|
@@ -25981,6 +26346,12 @@ ${GTM_ENGINEERING_BLOCK}
|
|
|
25981
26346
|
IDEA GATE (when recommending action \u2014 silent):
|
|
25982
26347
|
${HEILMEIER_GATE}
|
|
25983
26348
|
|
|
26349
|
+
BOTTLENECK (constraint first \u2014 silent):
|
|
26350
|
+
${BOTTLENECK_GATE}
|
|
26351
|
+
|
|
26352
|
+
OWNER SHAPE (when recommending action \u2014 silent):
|
|
26353
|
+
${OWNER_SHAPE_BLOCK}
|
|
26354
|
+
|
|
25984
26355
|
OUTPUT DOCTRINE (how answers are structured for recall):
|
|
25985
26356
|
${PYRAMID_OUTPUT_BLOCK}
|
|
25986
26357
|
|
|
@@ -25996,6 +26367,8 @@ ${VITAL_SIGNS_BLOCK}
|
|
|
25996
26367
|
PLAYBOOK \u2014 recommend these plays when appropriate:
|
|
25997
26368
|
${buildPlaybookBlock()}
|
|
25998
26369
|
|
|
26370
|
+
${buildFrameworkCatalogBlock()}
|
|
26371
|
+
|
|
25999
26372
|
${commandSection}`;
|
|
26000
26373
|
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.
|
|
26001
26374
|
|
|
@@ -26244,6 +26617,7 @@ var init_agentic_loop = __esm({
|
|
|
26244
26617
|
init_thread();
|
|
26245
26618
|
init_untrusted();
|
|
26246
26619
|
init_prompt_parts();
|
|
26620
|
+
init_frameworks();
|
|
26247
26621
|
init_think_prompt();
|
|
26248
26622
|
init_prompt();
|
|
26249
26623
|
init_context2();
|