@sonnechasser/ntrp 0.2.1 → 0.2.2

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.
@@ -11975,12 +11975,41 @@ function buildPlaybookBlock() {
11975
11975
  Learned plays (added from this team's experience and ingested case studies \u2014 recommend these when they fit):
11976
11976
  ${learned}`;
11977
11977
  }
11978
- var ANALYST_INSTINCT_BLOCK, VITAL_SIGNS_BLOCK, PLAYBOOK_BLOCK, METRICS_BLOCK, FINDINGS_SCHEMA_BLOCK;
11978
+ function buildCommandCatalogBlock() {
11979
+ const GROUP_ANALYSIS = "Analysis & data";
11980
+ const GROUP_SESSION = "Session, memory & outputs";
11981
+ const GROUP_SETTINGS = "Settings & providers";
11982
+ const groupOrder = [GROUP_ANALYSIS, GROUP_SESSION, GROUP_SETTINGS];
11983
+ const groupFor = (section) => {
11984
+ if (section === "Hidden" || section === "Getting Started") return GROUP_ANALYSIS;
11985
+ if (section === "Settings") return GROUP_SETTINGS;
11986
+ return GROUP_SESSION;
11987
+ };
11988
+ const groups = new Map(groupOrder.map((label) => [label, []]));
11989
+ for (const meta of listWorkflows(true)) {
11990
+ if (meta.name === "ask") continue;
11991
+ if (meta.section === "Admin") continue;
11992
+ groups.get(groupFor(meta.section)).push(formatCatalogLine(meta));
11993
+ }
11994
+ groups.get(GROUP_SESSION).push(
11995
+ "- /help \u2014 Show the shortcut list",
11996
+ "- /home \u2014 Show the welcome dashboard and current session status"
11997
+ );
11998
+ return groupOrder.filter((label) => groups.get(label).length > 0).map((label) => `${label}:
11999
+ ${groups.get(label).join("\n")}`).join("\n\n");
12000
+ }
12001
+ function formatCatalogLine(meta) {
12002
+ const args = meta.args?.trim() ? ` ${meta.args.trim()}` : "";
12003
+ const note = DESTRUCTIVE_COMMAND_NOTES[meta.name] ? ` (${DESTRUCTIVE_COMMAND_NOTES[meta.name]})` : "";
12004
+ return `- /${meta.name}${args} \u2014 ${meta.description}${note}`;
12005
+ }
12006
+ var ANALYST_INSTINCT_BLOCK, VITAL_SIGNS_BLOCK, PLAYBOOK_BLOCK, DESTRUCTIVE_COMMAND_NOTES, METRICS_BLOCK, FINDINGS_SCHEMA_BLOCK;
11979
12007
  var init_prompt_parts = __esm({
11980
12008
  "src/ai/prompt-parts.ts"() {
11981
12009
  "use strict";
11982
12010
  init_profile();
11983
12011
  init_playbook();
12012
+ init_registry2();
11984
12013
  ANALYST_INSTINCT_BLOCK = `A search box returns numbers; a world-class analyst returns insight. The instincts below are what separate the two. Bring them PROACTIVELY \u2014 surface the connection, the chain, and the priority without waiting to be asked, because the user often doesn't know to ask.
11985
12014
 
11986
12015
  - ROOT CAUSE OVER SYMPTOM LIST. GTM problems are rarely independent \u2014 they're usually one failure wearing several masks. When two or more vital signs are red or yellow, your first instinct is to ask "is this the same underlying problem showing up in different places?" and, when it is, name the single cause. (Classic shape: a broken lead handoff starves reps of new pipeline \u2192 they work only what they can already see \u2192 everything else ages into stale, zombie deals \u2192 the forecast inflates with deals nobody is touching \u2192 the quarter is quietly at risk. One cause, four symptoms.)
@@ -12003,6 +12032,9 @@ Restraint matters: NTRP is a stethoscope, not a surgeon. Observe, connect, and r
12003
12032
  - "Fix the Handoff Gap" (id: fix-handoff-gap) \u2014 when drop_rate is high
12004
12033
  - "Retarget Misdirected Effort" (id: retarget-effort) \u2014 when signal_to_noise is low
12005
12034
  - "Unstick the Pipeline" (id: unstick-pipeline) \u2014 when flow_rate is low`;
12035
+ DESTRUCTIVE_COMMAND_NOTES = {
12036
+ reset: "destructive \u2014 wipes all data, requires --force"
12037
+ };
12006
12038
  METRICS_BLOCK = `Revenue metrics measure GTM output \u2014 the standard SaaS metrics:
12007
12039
  - ARR: Total closed-won revenue. New ARR + Expansion ARR = growth; Churned + Contraction = leakage.
12008
12040
  - NRR (Net Revenue Retention): >100% means growing from existing customers. Best-in-class: 110%+.
@@ -14522,6 +14554,16 @@ FORMATTING (brief mode \u2014 scannable, not chunky):
14522
14554
  - No ### headings, no tables, no --- footer, no closing "want me to dig deeper?" question.
14523
14555
  - Single-point answers can stay one sentence \u2014 don't force bullets when one line is enough.
14524
14556
  `;
14557
+ const commandStyleRule = responseMode === "brief" ? '- Style in brief mode: a suggestion is at most ONE short trailing line after your answer (e.g. "`/segment compare enterprise smb` gives the full side-by-side.") \u2014 no heading, no footer.' : "- Style: weave the suggestion naturally into your close \u2014 one sentence with the exact invocation in `inline code`.";
14558
+ const commandSection = `PRESET COMMANDS (slash commands the user can type at the prompt \u2014 you may SUGGEST these; you have no ability to run them):
14559
+ ${buildCommandCatalogBlock()}
14560
+
14561
+ COMMAND SUGGESTION RULES (suggest-only):
14562
+ - Evaluate whether the user's question overlaps a preset command's capability. Answer the question yourself first, from tools and context; suggest a command only when it adds capability beyond your answer \u2014 writing files, opening a wizard, running a heavier analysis, or changing settings.
14563
+ - If the message is primarily a request to DO what a command does (e.g. "export this to my notes"), say plainly that you don't execute commands and give the exact invocation to type, e.g. \`/handoff notes\`.
14564
+ - Never claim a command was run. Never invent flags \u2014 use only the documented arguments above. At most ONE command suggestion per answer; most answers need none.
14565
+ - Only suggest a command that can work right now given the session state you know (e.g. no \`/diagnose\` or \`/export\` before data or a diagnosis exists).
14566
+ ${commandStyleRule}`;
14525
14567
  const outputRules = responseMode === "brief" ? `OUTPUT RULES:
14526
14568
  - Respond in plain text markdown (not JSON). Lead sentence + bullets when helpful \u2014 never a dense paragraph wall.
14527
14569
  - Pull numbers from the completed session analysis or conversation history \u2014 never guess.
@@ -14545,6 +14587,8 @@ ${VITAL_SIGNS_BLOCK}
14545
14587
 
14546
14588
  PLAYBOOK \u2014 recommend these plays when appropriate:
14547
14589
  ${buildPlaybookBlock()}
14590
+
14591
+ ${commandSection}
14548
14592
  ${formattingSection}
14549
14593
  ${outputRules}`;
14550
14594
  }
@@ -24482,19 +24526,6 @@ var init_progress2 = __esm({
24482
24526
  }
24483
24527
  });
24484
24528
 
24485
- // src/whimsy/time-bank-smoke.ts
24486
- init_install();
24487
- init_progress();
24488
- init_store();
24489
- init_scratch_wipe();
24490
- init_time_milestones();
24491
- init_time_perspectives();
24492
- init_time_bank();
24493
- init_perspective_rotation();
24494
- import { existsSync as existsSync23, mkdirSync as mkdirSync13, mkdtempSync, rmSync as rmSync4, writeFileSync as writeFileSync20 } from "fs";
24495
- import { join as join30 } from "path";
24496
- import { tmpdir } from "os";
24497
-
24498
24529
  // src/workflows/registry.ts
24499
24530
  function parseFrontmatter(raw) {
24500
24531
  if (!raw.startsWith("---")) return { meta: {}, body: raw };
@@ -24514,7 +24545,6 @@ function parseFrontmatter(raw) {
24514
24545
  }
24515
24546
  return { meta, body: body.trim() };
24516
24547
  }
24517
- var registry = null;
24518
24548
  function loadRegistry() {
24519
24549
  if (registry) return registry;
24520
24550
  registry = /* @__PURE__ */ new Map();
@@ -24536,6 +24566,10 @@ function loadRegistry() {
24536
24566
  function hasCommand(name) {
24537
24567
  return loadRegistry().has(name);
24538
24568
  }
24569
+ function listWorkflows(includeHidden = false) {
24570
+ const all2 = Array.from(loadRegistry().values()).map((e) => e.meta);
24571
+ return includeHidden ? all2 : all2.filter((m) => !m.hidden);
24572
+ }
24539
24573
  async function resolveHandler(name) {
24540
24574
  const entry = loadRegistry().get(name);
24541
24575
  if (!entry) return null;
@@ -24651,10 +24685,15 @@ async function importHandler(runtimePath) {
24651
24685
  return null;
24652
24686
  }
24653
24687
  }
24654
- var EMBEDDED_WORKFLOWS = [
24655
- {
24656
- name: "new",
24657
- raw: `---
24688
+ var registry, EMBEDDED_WORKFLOWS;
24689
+ var init_registry2 = __esm({
24690
+ "src/workflows/registry.ts"() {
24691
+ "use strict";
24692
+ registry = null;
24693
+ EMBEDDED_WORKFLOWS = [
24694
+ {
24695
+ name: "new",
24696
+ raw: `---
24658
24697
  name: new
24659
24698
  description: Start a new analysis \u2014 one menu picks data + first report
24660
24699
  section: Hidden
@@ -24668,10 +24707,10 @@ health, demo \u2192 metrics, your CSV, or empty. Loads data and runs the first r
24668
24707
  (formulas only \u2014 no AI unless you add \`--findings\` later). Demo metrics works
24669
24708
  without \`/onboard\`; your own CSV needs a profile for metrics calibration.
24670
24709
  After the report, **ask questions in plain English** \u2014 no slash needed.`
24671
- },
24672
- {
24673
- name: "end",
24674
- raw: `---
24710
+ },
24711
+ {
24712
+ name: "end",
24713
+ raw: `---
24675
24714
  name: end
24676
24715
  description: Close the current analysis without a handoff
24677
24716
  section: Start
@@ -24683,10 +24722,10 @@ Mark the current session as finished even when you didn't produce a report or
24683
24722
  other output. It drops off the "in progress" list, saves your transcript and
24684
24723
  dataset anchor for later, and rotates you to a fresh empty session. Use
24685
24724
  \`/handoff\` instead when you want to ship something.`
24686
- },
24687
- {
24688
- name: "session",
24689
- raw: `---
24725
+ },
24726
+ {
24727
+ name: "session",
24728
+ raw: `---
24690
24729
  name: session
24691
24730
  description: Pick up or browse your analyses
24692
24731
  section: Hidden
@@ -24700,10 +24739,10 @@ sessions with unfinished work (reached insight, never delivered) surfaced
24700
24739
  first. Pass a session id (or type the 4-char suffix after listing) to pick it
24701
24740
  back up \u2014 this rebinds its dataset and conversation so you continue exactly
24702
24741
  where you left off. \`new\` starts a fresh analysis.`
24703
- },
24704
- {
24705
- name: "handoff",
24706
- raw: `---
24742
+ },
24743
+ {
24744
+ name: "handoff",
24745
+ raw: `---
24707
24746
  name: handoff
24708
24747
  description: Turn the analysis into an output
24709
24748
  section: Start
@@ -24716,10 +24755,10 @@ receipts, or a repository package \u2014 or generate a ready-to-paste prompt for
24716
24755
  another agent to build a review deck, an Asana project, a Clay table, or an
24717
24756
  action plan from this diagnosis. Producing an output marks the session
24718
24757
  delivered so it stops showing up as unfinished work.`
24719
- },
24720
- {
24721
- name: "onboard",
24722
- raw: `---
24758
+ },
24759
+ {
24760
+ name: "onboard",
24761
+ raw: `---
24723
24762
  name: onboard
24724
24763
  description: Set up your company profile
24725
24764
  section: Settings
@@ -24731,10 +24770,10 @@ two LLM engines (Anthropic and/or OpenAI), then asks
24731
24770
  a few seed questions and uses AI to draft industry, ICP, deal size, and stack
24732
24771
  guesses. Profile is stored at \`~/.ntrp/profile.json\` and flows into every
24733
24772
  AI surface (findings, NL answers, demo generation).`
24734
- },
24735
- {
24736
- name: "sessions",
24737
- raw: `---
24773
+ },
24774
+ {
24775
+ name: "sessions",
24776
+ raw: `---
24738
24777
  name: sessions
24739
24778
  description: Browse past session history
24740
24779
  section: More
@@ -24746,10 +24785,10 @@ hidden: true
24746
24785
  List and inspect past REPL sessions. Shows session dates, AI-generated
24747
24786
  summaries, and exchange counts. Use \`show <id>\` to view the full
24748
24787
  conversation from a specific session.`
24749
- },
24750
- {
24751
- name: "setup",
24752
- raw: `---
24788
+ },
24789
+ {
24790
+ name: "setup",
24791
+ raw: `---
24753
24792
  name: setup
24754
24793
  description: Configure NTRP for headless and agent use
24755
24794
  section: Settings
@@ -24762,10 +24801,10 @@ Validate local readiness or configure NTRP non-interactively for automation.
24762
24801
  directory state. \`setup agent\` accepts a profile JSON file or direct flags \u2014
24763
24802
  \`--llm-key <key>\` auto-detects the provider from any pasted key
24764
24803
  (\`--llm-provider <id>\` to force one).`
24765
- },
24766
- {
24767
- name: "update",
24768
- raw: `---
24804
+ },
24805
+ {
24806
+ name: "update",
24807
+ raw: `---
24769
24808
  name: update
24770
24809
  description: Update NTRP to the latest version
24771
24810
  section: Settings
@@ -24773,10 +24812,10 @@ handler: ../commands/update.ts
24773
24812
  ---
24774
24813
 
24775
24814
  Update the globally installed NTRP package via npm.`
24776
- },
24777
- {
24778
- name: "resume",
24779
- raw: `---
24815
+ },
24816
+ {
24817
+ name: "resume",
24818
+ raw: `---
24780
24819
  name: resume
24781
24820
  description: Continue a previous session
24782
24821
  section: More
@@ -24788,10 +24827,10 @@ hidden: true
24788
24827
  Load a previous session's context so the AI can reference what was
24789
24828
  discussed before. Without an ID, resumes the most recent session.
24790
24829
  Use a full session ID or 4-char suffix.`
24791
- },
24792
- {
24793
- name: "name",
24794
- raw: `---
24830
+ },
24831
+ {
24832
+ name: "name",
24833
+ raw: `---
24795
24834
  name: name
24796
24835
  description: Tag this session with a label
24797
24836
  section: More
@@ -24802,10 +24841,10 @@ handler: ../commands/name.ts
24802
24841
  Give the current session a human-readable name so you can find it
24803
24842
  later. The name appears in the REPL prompt, session list, and
24804
24843
  welcome dashboard. Max 40 characters.`
24805
- },
24806
- {
24807
- name: "switch",
24808
- raw: `---
24844
+ },
24845
+ {
24846
+ name: "switch",
24847
+ raw: `---
24809
24848
  name: switch
24810
24849
  description: Jump to a named session
24811
24850
  section: More
@@ -24817,10 +24856,10 @@ hidden: true
24817
24856
  Save the current session and switch to a named one. If the name
24818
24857
  exists, loads its context and messages. If new, creates a fresh
24819
24858
  session with that name. Without arguments, lists all named sessions.`
24820
- },
24821
- {
24822
- name: "actions",
24823
- raw: `---
24859
+ },
24860
+ {
24861
+ name: "actions",
24862
+ raw: `---
24824
24863
  name: actions
24825
24864
  description: Propose, approve, and execute actions
24826
24865
  section: More
@@ -24833,10 +24872,10 @@ dry-run proposal that exercises the approval and execution lifecycle without
24833
24872
  touching external tools. Execute-class actions require local approval before
24834
24873
  they can run. Use \`/actions continue\` to advance the newest pending or
24835
24874
  approved proposal without copying a handle during the active workflow.`
24836
- },
24837
- {
24838
- name: "diagnose",
24839
- raw: `---
24875
+ },
24876
+ {
24877
+ name: "diagnose",
24878
+ raw: `---
24840
24879
  name: diagnose
24841
24880
  description: Compute vital signs and generate findings
24842
24881
  section: Hidden
@@ -24849,10 +24888,10 @@ Compute the 5 vital signs (freshness, flow rate, drop rate, signal-to-noise,
24849
24888
  thread depth) for either the full dataset or a segment. Companion to \`/metrics\`
24850
24889
  when your session primary is SaaS metrics. Use \`--deep\` to run the agentic
24851
24890
  investigation loop instead of the single-shot findings path.`
24852
- },
24853
- {
24854
- name: "metrics",
24855
- raw: `---
24891
+ },
24892
+ {
24893
+ name: "metrics",
24894
+ raw: `---
24856
24895
  name: metrics
24857
24896
  description: SaaS metrics \u2014 refresh or add the revenue view
24858
24897
  section: Hidden
@@ -24866,10 +24905,10 @@ Win Rate, Pipeline Coverage, and more. Each metric includes a confidence score
24866
24905
  and reliability gate showing what data unlocks the next tier. Use \`--findings\`
24867
24906
  for AI analysis calibrated to your company profile. Revenue ledger CSV format:
24868
24907
  account, period, mrr, event_type.`
24869
- },
24870
- {
24871
- name: "ask",
24872
- raw: `---
24908
+ },
24909
+ {
24910
+ name: "ask",
24911
+ raw: `---
24873
24912
  name: ask
24874
24913
  description: Chat with your pipeline data
24875
24914
  section: Hidden
@@ -24881,10 +24920,10 @@ handler: ../commands/ask.ts
24881
24920
  Ask a plain-English question about your GTM health and SaaS metrics. Free-form
24882
24921
  text at the REPL prompt routes to the same agent. Respects your session primary
24883
24922
  lens; can cross-reference vital signs and revenue metrics via tools.`
24884
- },
24885
- {
24886
- name: "recap",
24887
- raw: `---
24923
+ },
24924
+ {
24925
+ name: "recap",
24926
+ raw: `---
24888
24927
  name: recap
24889
24928
  description: Summarize the current session
24890
24929
  section: More
@@ -24894,10 +24933,10 @@ handler: ../commands/recap.ts
24894
24933
  Summarize the current REPL session using AI. Reads all natural-language
24895
24934
  exchanges from the session and produces a structured overview: key findings,
24896
24935
  dollar impacts, and recommended next steps.`
24897
- },
24898
- {
24899
- name: "remember",
24900
- raw: `---
24936
+ },
24937
+ {
24938
+ name: "remember",
24939
+ raw: `---
24901
24940
  name: remember
24902
24941
  description: Teach the analyst a durable fact
24903
24942
  section: More
@@ -24908,10 +24947,10 @@ handler: ../commands/remember.ts
24908
24947
  Store a durable fact, decision, or preference about your business. Stored
24909
24948
  memory flows into every future analysis so the agent gets to know your
24910
24949
  business better over time \u2014 like a consultant building up a client file.`
24911
- },
24912
- {
24913
- name: "recall",
24914
- raw: `---
24950
+ },
24951
+ {
24952
+ name: "recall",
24953
+ raw: `---
24915
24954
  name: recall
24916
24955
  description: See what the analyst remembers
24917
24956
  section: More
@@ -24923,10 +24962,10 @@ Jog the analyst's memory. With no arguments, lists the durable facts it knows
24923
24962
  and the analyses it has already run. Pass a topic to see what it remembers
24924
24963
  about that subject \u2014 pulled from facts, strategies, wins, and ingested
24925
24964
  knowledge.`
24926
- },
24927
- {
24928
- name: "rate",
24929
- raw: `---
24965
+ },
24966
+ {
24967
+ name: "rate",
24968
+ raw: `---
24930
24969
  name: rate
24931
24970
  description: Give feedback on the last answer
24932
24971
  section: More
@@ -24937,10 +24976,10 @@ handler: ../commands/rate.ts
24937
24976
  Tell the analyst how its last answer landed. \`/rate good\` reinforces the
24938
24977
  approach; \`/rate bad <what was off>\` records a correction. Feedback becomes a
24939
24978
  durable preference so the analyst gets better at working with you over time.`
24940
- },
24941
- {
24942
- name: "knowledge",
24943
- raw: `---
24979
+ },
24980
+ {
24981
+ name: "knowledge",
24982
+ raw: `---
24944
24983
  name: knowledge
24945
24984
  description: Ingest external case studies & frameworks
24946
24985
  section: More
@@ -24952,10 +24991,10 @@ Teach the analyst from work done outside the platform. \`/knowledge add <file>\`
24952
24991
  ingests a markdown, text, or PDF case study, framework, or benchmark report and
24953
24992
  indexes it for retrieval during analysis. \`/knowledge list\` shows what's
24954
24993
  indexed. Drop files into ~/.ntrp/knowledge to stage them.`
24955
- },
24956
- {
24957
- name: "ingest",
24958
- raw: `---
24994
+ },
24995
+ {
24996
+ name: "ingest",
24997
+ raw: `---
24959
24998
  name: ingest
24960
24999
  description: Import CRM CSV exports (or --demo)
24961
25000
  section: Hidden
@@ -24973,10 +25012,10 @@ your company profile. Accepts \`--scenario <name>\` to pick a scenario (else
24973
25012
  random) and \`--regen-taxonomy\` to rebuild the profile-derived market
24974
25013
  taxonomy. Rep names draw from a curated music / sports / film roster for a
24975
25014
  little demo delight; pass \`--no-whimsy\` to use generic names instead.`
24976
- },
24977
- {
24978
- name: "demo",
24979
- raw: `---
25015
+ },
25016
+ {
25017
+ name: "demo",
25018
+ raw: `---
24980
25019
  name: demo
24981
25020
  description: Generate demo scenario data
24982
25021
  section: Getting Started
@@ -24993,10 +25032,10 @@ By default, sales rep names are drawn from a curated music / sports / film
24993
25032
  roster; pass \`--no-whimsy\` for generic placeholder names.
24994
25033
 
24995
25034
  This command is hidden \u2014 prefer \`/ingest --demo\` which delegates here.`
24996
- },
24997
- {
24998
- name: "strategy",
24999
- raw: `---
25035
+ },
25036
+ {
25037
+ name: "strategy",
25038
+ raw: `---
25000
25039
  name: strategy
25001
25040
  description: Ingest and manage GTM strategies
25002
25041
  section: More
@@ -25011,10 +25050,10 @@ creates a strategy from a short pasted description.
25011
25050
  \`/strategy sync --path <folder>\` scans an Obsidian-style local library and
25012
25051
  imports supported strategy documents. Use \`/strategy sources\` to see available
25013
25052
  library connector types.`
25014
- },
25015
- {
25016
- name: "segment",
25017
- raw: `---
25053
+ },
25054
+ {
25055
+ name: "segment",
25056
+ raw: `---
25018
25057
  name: segment
25019
25058
  description: Browse and inspect segments
25020
25059
  section: More
@@ -25025,10 +25064,10 @@ handler: ../commands/segment.ts
25025
25064
  Browse, inspect, and manage data segments. With no arguments, lists all
25026
25065
  segments sorted worst-first. Subcommands: \`show <name>\`, \`compare <a> <b>\`,
25027
25066
  \`create <name> --entity <type> --filter <expr>\`, \`delete <name>\`.`
25028
- },
25029
- {
25030
- name: "report",
25031
- raw: `---
25067
+ },
25068
+ {
25069
+ name: "report",
25070
+ raw: `---
25032
25071
  name: report
25033
25072
  description: Export latest diagnosis
25034
25073
  section: More
@@ -25038,10 +25077,10 @@ handler: ../commands/report.ts
25038
25077
 
25039
25078
  Export the most recent diagnosis as terminal output, markdown, or JSON. Use
25040
25079
  \`--output <file>\` to write to disk instead of stdout.`
25041
- },
25042
- {
25043
- name: "progress",
25044
- raw: `---
25080
+ },
25081
+ {
25082
+ name: "progress",
25083
+ raw: `---
25045
25084
  name: progress
25046
25085
  description: Usage stats and milestone ladder
25047
25086
  section: Navigation
@@ -25052,10 +25091,10 @@ handler: ../commands/progress.ts
25052
25091
  Hours saved, weekly activity trend, session counts, AI token usage, and the
25053
25092
  full milestone ladder with progress bars. Use reset (type "reset" to confirm)
25054
25093
  to clear hours and milestones while keeping this install's identity.`
25055
- },
25056
- {
25057
- name: "status",
25058
- raw: `---
25094
+ },
25095
+ {
25096
+ name: "status",
25097
+ raw: `---
25059
25098
  name: status
25060
25099
  description: Show last diagnosis and entity counts
25061
25100
  section: More
@@ -25064,10 +25103,10 @@ handler: ../commands/status.ts
25064
25103
 
25065
25104
  Show what data you currently have loaded and the result of your last
25066
25105
  diagnosis, if any.`
25067
- },
25068
- {
25069
- name: "scratch",
25070
- raw: `---
25106
+ },
25107
+ {
25108
+ name: "scratch",
25109
+ raw: `---
25071
25110
  name: scratch
25072
25111
  description: Wipe config, profile, and all datasets
25073
25112
  section: Admin
@@ -25082,10 +25121,10 @@ by default. Pass \`--include-progress\` to also wipe install identity and hours.
25082
25121
  Also preserves memory, strategies, wins, knowledge, exports, and audit. Requires
25083
25122
  typing \`scratch\` in the REPL or passing \`--confirm\` one-shot. Triggers
25084
25123
  onboarding on next interactive use.`
25085
- },
25086
- {
25087
- name: "cleanup",
25088
- raw: `---
25124
+ },
25125
+ {
25126
+ name: "cleanup",
25127
+ raw: `---
25089
25128
  name: cleanup
25090
25129
  description: Close all active sessions
25091
25130
  section: Admin
@@ -25096,10 +25135,10 @@ hidden: true
25096
25135
 
25097
25136
  Mark every in-progress session as ended without deleting transcripts or dataset
25098
25137
  files. Interactive REPL only. Confirm with y/N or \`--confirm\` one-shot.`
25099
- },
25100
- {
25101
- name: "deactivate-demo",
25102
- raw: `---
25138
+ },
25139
+ {
25140
+ name: "deactivate-demo",
25141
+ raw: `---
25103
25142
  name: deactivate-demo
25104
25143
  description: Disable demo data generators
25105
25144
  section: Admin
@@ -25110,10 +25149,10 @@ hidden: true
25110
25149
 
25111
25150
  Persistently disable demo generators (\`/ingest --demo\`, \`/new --demo\`, NL
25112
25151
  "use demo data"). Re-enable with \`/config set demo-enabled true\`.`
25113
- },
25114
- {
25115
- name: "reset",
25116
- raw: `---
25152
+ },
25153
+ {
25154
+ name: "reset",
25155
+ raw: `---
25117
25156
  name: reset
25118
25157
  description: Clear all data and start fresh
25119
25158
  section: More
@@ -25123,10 +25162,10 @@ handler: ../commands/reset.ts
25123
25162
 
25124
25163
  Drop all rows from every table in the local DuckDB database. Requires
25125
25164
  \`--force\` to proceed.`
25126
- },
25127
- {
25128
- name: "playbook",
25129
- raw: `---
25165
+ },
25166
+ {
25167
+ name: "playbook",
25168
+ raw: `---
25130
25169
  name: playbook
25131
25170
  description: Show or extend recommended plays
25132
25171
  section: More
@@ -25139,10 +25178,10 @@ play-id to drill into a single play's steps and expected outcome. Run
25139
25178
  \`/playbook add\` and the analyst walks you through capturing a new play, step by
25140
25179
  step \u2014 no flags or quoting needed. Learned plays become recommendable during
25141
25180
  analysis. (Power users can still pass everything as flags in one shot.)`
25142
- },
25143
- {
25144
- name: "export",
25145
- raw: `---
25181
+ },
25182
+ {
25183
+ name: "export",
25184
+ raw: `---
25146
25185
  name: export
25147
25186
  description: Save diagnosis to Obsidian notes
25148
25187
  section: More
@@ -25152,10 +25191,10 @@ handler: ../commands/export.ts
25152
25191
 
25153
25192
  Write the most recent diagnosis to your configured notes directory as
25154
25193
  markdown, ready for Obsidian, Logseq, or any other note tool.`
25155
- },
25156
- {
25157
- name: "publish",
25158
- raw: `---
25194
+ },
25195
+ {
25196
+ name: "publish",
25197
+ raw: `---
25159
25198
  name: publish
25160
25199
  description: Preview and propose repository exports
25161
25200
  section: More
@@ -25168,10 +25207,10 @@ strategies, evidence, and action receipts. \`preview\` shows the write plan;
25168
25207
  \`propose\` creates an approval-gated action proposal. The first executable
25169
25208
  target is local markdown for Obsidian-compatible repositories. Notion,
25170
25209
  Airtable, and GitHub mappings are documented via \`/publish targets\`.`
25171
- },
25172
- {
25173
- name: "backmeup",
25174
- raw: `---
25210
+ },
25211
+ {
25212
+ name: "backmeup",
25213
+ raw: `---
25175
25214
  name: backmeup
25176
25215
  description: Export diagnosis receipts as CSV
25177
25216
  section: More
@@ -25184,10 +25223,10 @@ Slack thread, email, or slide deck. Creates a timestamped folder under
25184
25223
  ~/.ntrp/exports/ containing a cover sheet with headline numbers, a findings
25185
25224
  file, and per-vital-sign evidence CSVs showing exactly which deals, contacts,
25186
25225
  or orgs drove each score. Use --output <dir> to write somewhere else.`
25187
- },
25188
- {
25189
- name: "profile",
25190
- raw: `---
25226
+ },
25227
+ {
25228
+ name: "profile",
25229
+ raw: `---
25191
25230
  name: profile
25192
25231
  description: Set sales motion
25193
25232
  section: Settings
@@ -25197,10 +25236,10 @@ handler: ../commands/profile.ts
25197
25236
 
25198
25237
  Choose a sales motion preset (PLG, SMB Velocity, Mid-Market, Enterprise). Each
25199
25238
  preset adjusts the vital-sign thresholds to match your deal cycle.`
25200
- },
25201
- {
25202
- name: "connect",
25203
- raw: `---
25239
+ },
25240
+ {
25241
+ name: "connect",
25242
+ raw: `---
25204
25243
  name: connect
25205
25244
  description: Connect an AI provider (paste any key)
25206
25245
  section: Settings
@@ -25216,10 +25255,10 @@ Works with Anthropic, OpenAI, Google Gemini, Groq, Mistral, DeepSeek, xAI,
25216
25255
  OpenRouter, Together, and Fireworks out of the box. \`/connect ollama\` wires a
25217
25256
  local Ollama; \`/connect --base-url <url> --id <name>\` registers any other
25218
25257
  OpenAI-compatible endpoint.`
25219
- },
25220
- {
25221
- name: "config",
25222
- raw: `---
25258
+ },
25259
+ {
25260
+ name: "config",
25261
+ raw: `---
25223
25262
  name: config
25224
25263
  description: Get/set config values
25225
25264
  section: Settings
@@ -25234,10 +25273,10 @@ Manage CLI configuration stored at \`~/.ntrp/config.json\`. Useful keys:
25234
25273
 
25235
25274
  Setting a provider key opens a hidden prompt and auto-discovers that
25236
25275
  provider's models. Prefer \`/connect\` \u2014 it detects the provider for you.`
25237
- },
25238
- {
25239
- name: "provider",
25240
- raw: `---
25276
+ },
25277
+ {
25278
+ name: "provider",
25279
+ raw: `---
25241
25280
  name: provider
25242
25281
  description: Switch active LLM engine
25243
25282
  section: Settings
@@ -25249,10 +25288,10 @@ Choose which connected engine answers this session \u2014 any provider added via
25249
25288
  \`/connect\` (anthropic, openai, groq, google, ollama, custom endpoints, ...).
25250
25289
  Session-scoped by default; \`/provider save\` writes the default to config.
25251
25290
  \`/provider failover on\` enables rate-limit auto-failover.`
25252
- },
25253
- {
25254
- name: "tier",
25255
- raw: `---
25291
+ },
25292
+ {
25293
+ name: "tier",
25294
+ raw: `---
25256
25295
  name: tier
25257
25296
  description: Set inference tier (HIGH/MEDIUM/LOW)
25258
25297
  section: Settings
@@ -25263,10 +25302,10 @@ handler: ../commands/tier.ts
25263
25302
  Set quality/cost tier for this REPL session. Agentic surfaces respect your tier;
25264
25303
  some single-shot surfaces keep fixed defaults. \`/tier list\` highlights the
25265
25304
  active stack. Add \`--default\` to persist to config.`
25266
- },
25267
- {
25268
- name: "model",
25269
- raw: `---
25305
+ },
25306
+ {
25307
+ name: "model",
25308
+ raw: `---
25270
25309
  name: model
25271
25310
  description: Override the active LLM model
25272
25311
  section: Settings
@@ -25278,10 +25317,10 @@ handler: ../commands/model.ts
25278
25317
  tier assignments. \`/model refresh\` re-discovers the live list. \`/model set <id>\`
25279
25318
  pins a model on the **active engine**; cross-provider IDs are rejected \u2014
25280
25319
  switch with \`/provider\` first.`
25281
- },
25282
- {
25283
- name: "activate",
25284
- raw: `---
25320
+ },
25321
+ {
25322
+ name: "activate",
25323
+ raw: `---
25285
25324
  name: activate
25286
25325
  description: Enter license key
25287
25326
  section: Settings
@@ -25291,10 +25330,10 @@ handler: ../commands/activate.ts
25291
25330
 
25292
25331
  Activate NTRP with your license key (format: NTRP-XXXX-XXXX-XXXX). Most
25293
25332
  commands require a valid license.`
25294
- },
25295
- {
25296
- name: "upgrade",
25297
- raw: `---
25333
+ },
25334
+ {
25335
+ name: "upgrade",
25336
+ raw: `---
25298
25337
  name: upgrade
25299
25338
  description: Upgrade trial to Pro \u2014 checkout + paste key
25300
25339
  section: Settings
@@ -25303,10 +25342,10 @@ handler: ../commands/upgrade.ts
25303
25342
 
25304
25343
  Open the Pro checkout page and paste your new license key without leaving
25305
25344
  the REPL. Use during trial grace or after cutoff. Flags: --url (print checkout URL only).`
25306
- },
25307
- {
25308
- name: "checkout",
25309
- raw: `---
25345
+ },
25346
+ {
25347
+ name: "checkout",
25348
+ raw: `---
25310
25349
  name: checkout
25311
25350
  description: Open signup checkout in your browser
25312
25351
  section: Settings
@@ -25315,10 +25354,10 @@ handler: ../commands/checkout.ts
25315
25354
 
25316
25355
  Opens the Lemon Squeezy checkout page in your default browser. Use anytime
25317
25356
  you need a trial or Pro license key.`
25318
- },
25319
- {
25320
- name: "feedback",
25321
- raw: `---
25357
+ },
25358
+ {
25359
+ name: "feedback",
25360
+ raw: `---
25322
25361
  name: feedback
25323
25362
  description: Correct your profile in plain English
25324
25363
  section: Settings
@@ -25330,10 +25369,24 @@ Apply natural-language corrections to your company profile. Maps structured
25330
25369
  fields when possible (e.g. "our sales cycle is 6 months" updates
25331
25370
  sales_cycle_days) and merges remaining nuances into a custom_context
25332
25371
  paragraph that flows into all AI surfaces.`
25372
+ }
25373
+ ];
25333
25374
  }
25334
- ];
25375
+ });
25335
25376
 
25336
25377
  // src/whimsy/time-bank-smoke.ts
25378
+ init_install();
25379
+ init_progress();
25380
+ init_store();
25381
+ init_scratch_wipe();
25382
+ init_time_milestones();
25383
+ init_time_perspectives();
25384
+ init_time_bank();
25385
+ init_perspective_rotation();
25386
+ init_registry2();
25387
+ import { existsSync as existsSync23, mkdirSync as mkdirSync13, mkdtempSync, rmSync as rmSync4, writeFileSync as writeFileSync20 } from "fs";
25388
+ import { join as join30 } from "path";
25389
+ import { tmpdir } from "os";
25337
25390
  function assert(condition, message) {
25338
25391
  if (!condition) {
25339
25392
  console.error(`FAIL: ${message}`);