@lssm/module.lifecycle-core 0.3.0 → 1.41.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/README.md +5 -0
  2. package/dist/collectors/signal-collector.js +1 -2
  3. package/dist/data/milestones-catalog.js +1 -2
  4. package/dist/data/stage-weights.js +1 -2
  5. package/dist/orchestrator/lifecycle-orchestrator.js +1 -2
  6. package/dist/planning/milestone-planner.js +1 -2
  7. package/dist/scoring/stage-scorer.js +1 -2
  8. package/package.json +11 -7
  9. package/dist/adapters/analytics-adapter.d.ts +0 -14
  10. package/dist/adapters/analytics-adapter.d.ts.map +0 -1
  11. package/dist/adapters/intent-adapter.d.ts +0 -12
  12. package/dist/adapters/intent-adapter.d.ts.map +0 -1
  13. package/dist/adapters/questionnaire-adapter.d.ts +0 -14
  14. package/dist/adapters/questionnaire-adapter.d.ts.map +0 -1
  15. package/dist/collectors/signal-collector.d.ts +0 -25
  16. package/dist/collectors/signal-collector.d.ts.map +0 -1
  17. package/dist/collectors/signal-collector.js.map +0 -1
  18. package/dist/data/milestones-catalog.js.map +0 -1
  19. package/dist/data/stage-weights.js.map +0 -1
  20. package/dist/index.d.ts +0 -8
  21. package/dist/libs/lifecycle/dist/index.js +0 -1
  22. package/dist/libs/lifecycle/dist/types/axes.js +0 -2
  23. package/dist/libs/lifecycle/dist/types/axes.js.map +0 -1
  24. package/dist/libs/lifecycle/dist/types/milestones.js +0 -1
  25. package/dist/libs/lifecycle/dist/types/signals.js +0 -1
  26. package/dist/libs/lifecycle/dist/types/stages.js +0 -2
  27. package/dist/libs/lifecycle/dist/types/stages.js.map +0 -1
  28. package/dist/libs/lifecycle/dist/utils/formatters.js +0 -1
  29. package/dist/orchestrator/lifecycle-orchestrator.d.ts +0 -22
  30. package/dist/orchestrator/lifecycle-orchestrator.d.ts.map +0 -1
  31. package/dist/orchestrator/lifecycle-orchestrator.js.map +0 -1
  32. package/dist/planning/milestone-planner.d.ts +0 -11
  33. package/dist/planning/milestone-planner.d.ts.map +0 -1
  34. package/dist/planning/milestone-planner.js.map +0 -1
  35. package/dist/scoring/stage-scorer.d.ts +0 -27
  36. package/dist/scoring/stage-scorer.d.ts.map +0 -1
  37. package/dist/scoring/stage-scorer.js.map +0 -1
package/README.md CHANGED
@@ -56,4 +56,9 @@ Adapters are interfaces—you can implement them inside bundles, Studio services
56
56
 
57
57
 
58
58
 
59
+
60
+
61
+
62
+
63
+
59
64
 
@@ -1,2 +1 @@
1
- import{e,n as t,t as n}from"../libs/lifecycle/dist/types/axes.js";import"../libs/lifecycle/dist/index.js";const r={product:e.Sketch,company:n.Solo,capital:t.Bootstrapped};var i=class{options;constructor(e){this.options=e}async collect(e={}){let t={...r,...e.axes??{}},n=[],i=[...e.signals??[]],s={...e.questionnaireAnswers??{}};if(e.metrics&&n.push(e.metrics),this.options.analyticsAdapter){let e=await this.options.analyticsAdapter.fetch();e.axes&&Object.assign(t,e.axes),e.metrics&&n.push(e.metrics),e.signals&&i.push(...e.signals)}if(this.options.questionnaireAdapter){let e=await this.options.questionnaireAdapter.fetch();e.axes&&Object.assign(t,e.axes),e.signals&&i.push(...e.signals),Object.assign(s,e.answers)}if(this.options.intentAdapter){let e=await this.options.intentAdapter.fetch();e.signals&&i.push(...e.signals)}return{axes:t,metrics:a(n),signals:o(i),questionnaireAnswers:Object.keys(s).length?s:void 0}}};const a=e=>e.reduce((e,t)=>(Object.entries(t??{}).forEach(([t,n])=>{n!=null&&(e[t]=n)}),e),{}),o=e=>{let t=new Set;return e.filter(e=>e.id?t.has(e.id)?!1:(t.add(e.id),!0):!0)};export{i as StageSignalCollector};
2
- //# sourceMappingURL=signal-collector.js.map
1
+ import{CapitalPhase as e,CompanyPhase as t,ProductPhase as n}from"@lssm/lib.lifecycle";const r={product:n.Sketch,company:t.Solo,capital:e.Bootstrapped};var i=class{options;constructor(e){this.options=e}async collect(e={}){let t={...r,...e.axes??{}},n=[],i=[...e.signals??[]],s={...e.questionnaireAnswers??{}};if(e.metrics&&n.push(e.metrics),this.options.analyticsAdapter){let e=await this.options.analyticsAdapter.fetch();e.axes&&Object.assign(t,e.axes),e.metrics&&n.push(e.metrics),e.signals&&i.push(...e.signals)}if(this.options.questionnaireAdapter){let e=await this.options.questionnaireAdapter.fetch();e.axes&&Object.assign(t,e.axes),e.signals&&i.push(...e.signals),Object.assign(s,e.answers)}if(this.options.intentAdapter){let e=await this.options.intentAdapter.fetch();e.signals&&i.push(...e.signals)}return{axes:t,metrics:a(n),signals:o(i),questionnaireAnswers:Object.keys(s).length?s:void 0}}};const a=e=>e.reduce((e,t)=>(Object.entries(t??{}).forEach(([t,n])=>{n!=null&&(e[t]=n)}),e),{}),o=e=>{let t=new Set;return e.filter(e=>e.id?t.has(e.id)?!1:(t.add(e.id),!0):!0)};export{i as StageSignalCollector};
@@ -1,2 +1 @@
1
- var e=[{id:`stage0-problem-statement`,stage:0,category:`product`,title:`Write the pain statement`,description:`Capture the clearest description of the top problem in the customer’s own words.`,priority:1,actionItems:[`Interview at least 5 ideal customers`,`Synthesize quotes into a one-page brief`]},{id:`stage1-prototype-loop`,stage:1,category:`product`,title:`Prototype feedback loop`,description:`Ship a clickable prototype and gather 3 rounds of feedback.`,priority:2,actionItems:[`Create a low-fidelity prototype`,`Schedule standing feedback calls`]},{id:`stage2-activation`,stage:2,category:`operations`,title:`Activation checklist`,description:`Define the minimum steps required for a new user to succeed.`,priority:1,actionItems:[`Document onboarding flow`,`Instrument activation analytics`]},{id:`stage3-retention-narrative`,stage:3,category:`product`,title:`Retention narrative`,description:`Create the before/after story that proves why users stay.`,priority:2,actionItems:[`Interview 3 retained users`,`Publish a one-pager with concrete metrics`]},{id:`stage4-growth-loop`,stage:4,category:`growth`,title:`Install a growth loop`,description:`Stand up a repeatable acquisition → activation → referral motion.`,priority:1,actionItems:[`Define loop metrics`,`Assign owners for each stage`,`Review weekly`]},{id:`stage5-platform-blueprint`,stage:5,category:`product`,title:`Platform blueprint`,description:`Align on APIs, integrations, and governance for partners.`,priority:2,actionItems:[`Create integration scoring rubric`,`Publish partner onboarding checklist`]},{id:`stage6-renewal-ops`,stage:6,category:`operations`,title:`Renewal operating rhythm`,description:`Decide whether to optimize, reinvest, or sunset each major surface.`,priority:1,actionItems:[`Hold quarterly renewal review`,`Document reinvestment bets`]}];export{e as default};
2
- //# sourceMappingURL=milestones-catalog.js.map
1
+ var e=[{id:`stage0-problem-statement`,stage:0,category:`product`,title:`Write the pain statement`,description:`Capture the clearest description of the top problem in the customer’s own words.`,priority:1,actionItems:[`Interview at least 5 ideal customers`,`Synthesize quotes into a one-page brief`]},{id:`stage1-prototype-loop`,stage:1,category:`product`,title:`Prototype feedback loop`,description:`Ship a clickable prototype and gather 3 rounds of feedback.`,priority:2,actionItems:[`Create a low-fidelity prototype`,`Schedule standing feedback calls`]},{id:`stage2-activation`,stage:2,category:`operations`,title:`Activation checklist`,description:`Define the minimum steps required for a new user to succeed.`,priority:1,actionItems:[`Document onboarding flow`,`Instrument activation analytics`]},{id:`stage3-retention-narrative`,stage:3,category:`product`,title:`Retention narrative`,description:`Create the before/after story that proves why users stay.`,priority:2,actionItems:[`Interview 3 retained users`,`Publish a one-pager with concrete metrics`]},{id:`stage4-growth-loop`,stage:4,category:`growth`,title:`Install a growth loop`,description:`Stand up a repeatable acquisition → activation → referral motion.`,priority:1,actionItems:[`Define loop metrics`,`Assign owners for each stage`,`Review weekly`]},{id:`stage5-platform-blueprint`,stage:5,category:`product`,title:`Platform blueprint`,description:`Align on APIs, integrations, and governance for partners.`,priority:2,actionItems:[`Create integration scoring rubric`,`Publish partner onboarding checklist`]},{id:`stage6-renewal-ops`,stage:6,category:`operations`,title:`Renewal operating rhythm`,description:`Decide whether to optimize, reinvest, or sunset each major surface.`,priority:1,actionItems:[`Hold quarterly renewal review`,`Document reinvestment bets`]}];export{e as default};
@@ -1,2 +1 @@
1
- var e={Exploration:{base:.35,metrics:{activeUsers:{weight:-.3,direction:`lte`,threshold:5},customerCount:{weight:-.2,direction:`lte`,threshold:3},teamSize:{weight:-.1,direction:`lte`,threshold:3}},signalKinds:{qualitative:.4,metric:.1}},ProblemSolutionFit:{base:.4,metrics:{activeUsers:{weight:.2,direction:`gte`,threshold:5},customerCount:{weight:.2,direction:`gte`,threshold:3}},signalKinds:{qualitative:.3,event:.1}},MvpEarlyTraction:{base:.45,metrics:{activeUsers:{weight:.25,direction:`gte`,threshold:25},weeklyActiveUsers:{weight:.25,direction:`gte`,threshold:20},retentionRate:{weight:.2,direction:`gte`,threshold:.25}},signalKinds:{metric:.15,event:.1}},ProductMarketFit:{base:.5,metrics:{retentionRate:{weight:.35,direction:`gte`,threshold:.45},monthlyRecurringRevenue:{weight:.25,direction:`gte`,threshold:1e4},customerCount:{weight:.2,direction:`gte`,threshold:30}},signalKinds:{metric:.15,event:.1}},GrowthScaleUp:{base:.55,metrics:{retentionRate:{weight:.2,direction:`gte`,threshold:.55},monthlyRecurringRevenue:{weight:.3,direction:`gte`,threshold:5e4},teamSize:{weight:.15,direction:`gte`,threshold:15}},signalKinds:{event:.2,metric:.15}},ExpansionPlatform:{base:.6,metrics:{monthlyRecurringRevenue:{weight:.35,direction:`gte`,threshold:15e4},customerCount:{weight:.2,direction:`gte`,threshold:100},teamSize:{weight:.15,direction:`gte`,threshold:40}},signalKinds:{event:.2,milestone:.1}},MaturityRenewal:{base:.6,metrics:{monthlyRecurringRevenue:{weight:.25,direction:`gte`,threshold:25e4},teamSize:{weight:.15,direction:`gte`,threshold:80},burnMultiple:{weight:.2,direction:`lte`,threshold:1.5}},signalKinds:{event:.2,milestone:.15}}};export{e as default};
2
- //# sourceMappingURL=stage-weights.js.map
1
+ var e={Exploration:{base:.35,metrics:{activeUsers:{weight:-.3,direction:`lte`,threshold:5},customerCount:{weight:-.2,direction:`lte`,threshold:3},teamSize:{weight:-.1,direction:`lte`,threshold:3}},signalKinds:{qualitative:.4,metric:.1}},ProblemSolutionFit:{base:.4,metrics:{activeUsers:{weight:.2,direction:`gte`,threshold:5},customerCount:{weight:.2,direction:`gte`,threshold:3}},signalKinds:{qualitative:.3,event:.1}},MvpEarlyTraction:{base:.45,metrics:{activeUsers:{weight:.25,direction:`gte`,threshold:25},weeklyActiveUsers:{weight:.25,direction:`gte`,threshold:20},retentionRate:{weight:.2,direction:`gte`,threshold:.25}},signalKinds:{metric:.15,event:.1}},ProductMarketFit:{base:.5,metrics:{retentionRate:{weight:.35,direction:`gte`,threshold:.45},monthlyRecurringRevenue:{weight:.25,direction:`gte`,threshold:1e4},customerCount:{weight:.2,direction:`gte`,threshold:30}},signalKinds:{metric:.15,event:.1}},GrowthScaleUp:{base:.55,metrics:{retentionRate:{weight:.2,direction:`gte`,threshold:.55},monthlyRecurringRevenue:{weight:.3,direction:`gte`,threshold:5e4},teamSize:{weight:.15,direction:`gte`,threshold:15}},signalKinds:{event:.2,metric:.15}},ExpansionPlatform:{base:.6,metrics:{monthlyRecurringRevenue:{weight:.35,direction:`gte`,threshold:15e4},customerCount:{weight:.2,direction:`gte`,threshold:100},teamSize:{weight:.15,direction:`gte`,threshold:40}},signalKinds:{event:.2,milestone:.1}},MaturityRenewal:{base:.6,metrics:{monthlyRecurringRevenue:{weight:.25,direction:`gte`,threshold:25e4},teamSize:{weight:.15,direction:`gte`,threshold:80},burnMultiple:{weight:.2,direction:`lte`,threshold:1.5}},signalKinds:{event:.2,milestone:.15}}};export{e as default};
@@ -1,2 +1 @@
1
- import{e,n as t}from"../libs/lifecycle/dist/types/stages.js";import"../libs/lifecycle/dist/index.js";import"../collectors/signal-collector.js";import"../scoring/stage-scorer.js";var n=class{collector;scorer;planner;constructor(e){this.collector=e.collector,this.scorer=e.scorer,this.planner=e.milestonePlanner}async run(e){let n=await this.collector.collect(e),a=this.scorer.score({metrics:n.metrics,signals:n.signals}),o=a[0]??r(),s=t[o.stage];return{stage:o.stage,confidence:o.confidence,axes:n.axes,signals:n.signals,metrics:i(n.metrics),gaps:s.focusAreas.slice(0,3),focusAreas:s.focusAreas,scorecard:a,generatedAt:new Date().toISOString()}}getUpcomingMilestones(e,t=[],n=5){return this.planner?this.planner.getUpcoming(e,t,n):[]}};const r=()=>({stage:e.Exploration,score:.3,confidence:.3,supportingSignals:[]}),i=e=>Object.entries(e??{}).reduce((e,[t,n])=>(typeof n==`number`&&(e[t]=n),e),{});export{n as LifecycleOrchestrator};
2
- //# sourceMappingURL=lifecycle-orchestrator.js.map
1
+ import"../collectors/signal-collector.js";import"../scoring/stage-scorer.js";import{LIFECYCLE_STAGE_META as e,LifecycleStage as t}from"@lssm/lib.lifecycle";var n=class{collector;scorer;planner;constructor(e){this.collector=e.collector,this.scorer=e.scorer,this.planner=e.milestonePlanner}async run(t){let n=await this.collector.collect(t),a=this.scorer.score({metrics:n.metrics,signals:n.signals}),o=a[0]??r(),s=e[o.stage];return{stage:o.stage,confidence:o.confidence,axes:n.axes,signals:n.signals,metrics:i(n.metrics),gaps:s.focusAreas.slice(0,3),focusAreas:s.focusAreas,scorecard:a,generatedAt:new Date().toISOString()}}getUpcomingMilestones(e,t=[],n=5){return this.planner?this.planner.getUpcoming(e,t,n):[]}};const r=()=>({stage:t.Exploration,score:.3,confidence:.3,supportingSignals:[]}),i=e=>Object.entries(e??{}).reduce((e,[t,n])=>(typeof n==`number`&&(e[t]=n),e),{});export{n as LifecycleOrchestrator};
@@ -1,2 +1 @@
1
- import e from"../data/milestones-catalog.js";var t=class{milestones;constructor(t){this.milestones=t??e}getUpcoming(e,t=[],n=5){let r=new Set(t);return this.milestones.filter(t=>t.stage===e&&!r.has(t.id)).sort((e,t)=>e.priority-t.priority).slice(0,n)}};export{t as LifecycleMilestonePlanner};
2
- //# sourceMappingURL=milestone-planner.js.map
1
+ import e from"../data/milestones-catalog.js";var t=class{milestones;constructor(t){this.milestones=t??e}getUpcoming(e,t=[],n=5){let r=new Set(t);return this.milestones.filter(t=>t.stage===e&&!r.has(t.id)).sort((e,t)=>e.priority-t.priority).slice(0,n)}};export{t as LifecycleMilestonePlanner};
@@ -1,2 +1 @@
1
- import{e,n as t}from"../libs/lifecycle/dist/types/stages.js";import"../libs/lifecycle/dist/index.js";import n from"../data/stage-weights.js";const r=n;var i=class{weights;constructor(e=r){this.weights=e}score(t){let n=s(t.signals);return Object.values(e).filter(c).map(r=>{let i=e[r],s=this.weights[i]??{base:.5},c=s.base??.5,l=0,u=Object.keys(s.metrics??{}).length+Object.keys(s.signalKinds??{}).length||1,d=[];s.metrics&&Object.entries(s.metrics).forEach(([e,n])=>{let r=t.metrics[e];r!=null&&(a(r,n)?(c+=n.weight,l+=1,d.push(`metric:${e}`)):c+=n.weight*.25)}),s.signalKinds&&Object.entries(s.signalKinds).forEach(([e,t])=>{(n[e]??0)>0&&typeof t==`number`&&(c+=t,l+=1,d.push(`signal:${e}`))}),c=o(c,0,1.25);let f=o(l/u,.1,1);return{stage:r,score:c,confidence:f,supportingSignals:d}}).sort((e,t)=>t.score===e.score?t.confidence-e.confidence:t.score-e.score)}};const a=(e,t)=>(t.direction??`gte`)===`gte`?e>=t.threshold:e<=t.threshold,o=(e,t,n)=>Math.min(Math.max(e,t),n),s=e=>e.reduce((e,t)=>{let n=t.kind??`unknown`;return e[n]=(e[n]??0)+(t.weight??1),e},{}),c=e=>typeof e==`number`&&e in t;export{i as StageScorer};
2
- //# sourceMappingURL=stage-scorer.js.map
1
+ import e from"../data/stage-weights.js";import{LIFECYCLE_STAGE_META as t,LifecycleStage as n}from"@lssm/lib.lifecycle";const r=e;var i=class{weights;constructor(e=r){this.weights=e}score(e){let t=s(e.signals);return Object.values(n).filter(c).map(r=>{let i=n[r],s=this.weights[i]??{base:.5},c=s.base??.5,l=0,u=Object.keys(s.metrics??{}).length+Object.keys(s.signalKinds??{}).length||1,d=[];s.metrics&&Object.entries(s.metrics).forEach(([t,n])=>{let r=e.metrics[t];r!=null&&(a(r,n)?(c+=n.weight,l+=1,d.push(`metric:${t}`)):c+=n.weight*.25)}),s.signalKinds&&Object.entries(s.signalKinds).forEach(([e,n])=>{(t[e]??0)>0&&typeof n==`number`&&(c+=n,l+=1,d.push(`signal:${e}`))}),c=o(c,0,1.25);let f=o(l/u,.1,1);return{stage:r,score:c,confidence:f,supportingSignals:d}}).sort((e,t)=>t.score===e.score?t.confidence-e.confidence:t.score-e.score)}};const a=(e,t)=>(t.direction??`gte`)===`gte`?e>=t.threshold:e<=t.threshold,o=(e,t,n)=>Math.min(Math.max(e,t),n),s=e=>e.reduce((e,t)=>{let n=t.kind??`unknown`;return e[n]=(e[n]??0)+(t.weight??1),e},{}),c=e=>typeof e==`number`&&e in t;export{i as StageScorer};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lssm/module.lifecycle-core",
3
- "version": "0.3.0",
3
+ "version": "1.41.0",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",
@@ -23,19 +23,23 @@
23
23
  "test": "bun run"
24
24
  },
25
25
  "dependencies": {
26
- "@lssm/lib.lifecycle": "0.3.0"
26
+ "@lssm/lib.lifecycle": "workspace:*"
27
27
  },
28
28
  "devDependencies": {
29
- "@lssm/tool.tsdown": "0.12.0",
30
- "@lssm/tool.typescript": "0.11.0",
31
- "tsdown": "^0.16.6",
29
+ "@lssm/tool.tsdown": "workspace:*",
30
+ "@lssm/tool.typescript": "workspace:*",
31
+ "tsdown": "^0.17.4",
32
32
  "typescript": "^5.9.3"
33
33
  },
34
34
  "exports": {
35
- ".": "./dist/index.js",
35
+ ".": "./src/index.ts",
36
36
  "./*": "./*"
37
37
  },
38
38
  "publishConfig": {
39
- "access": "public"
39
+ "access": "public",
40
+ "exports": {
41
+ ".": "./dist/index.js",
42
+ "./*": "./*"
43
+ }
40
44
  }
41
45
  }
@@ -1,14 +0,0 @@
1
- import { LifecycleAxes, LifecycleMetricSnapshot, LifecycleSignal } from "@lssm/lib.lifecycle";
2
-
3
- //#region src/adapters/analytics-adapter.d.ts
4
- interface AnalyticsAdapterResult {
5
- metrics?: LifecycleMetricSnapshot;
6
- signals?: LifecycleSignal[];
7
- axes?: Partial<LifecycleAxes>;
8
- }
9
- interface AnalyticsAdapter {
10
- fetch(): Promise<AnalyticsAdapterResult>;
11
- }
12
- //#endregion
13
- export { AnalyticsAdapter, AnalyticsAdapterResult };
14
- //# sourceMappingURL=analytics-adapter.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"analytics-adapter.d.ts","names":[],"sources":["../../src/adapters/analytics-adapter.ts"],"sourcesContent":[],"mappings":";;;UAMiB,sBAAA;YACL;EADK,OAAA,CAAA,EAEL,eAF2B,EAAA;EAC3B,IAAA,CAAA,EAEH,OAFG,CAEK,aAFL,CAAA;;AAEK,UAGA,gBAAA,CAHA;EAAR,KAAA,EAAA,EAIE,OAJF,CAIU,sBAJV,CAAA"}
@@ -1,12 +0,0 @@
1
- import { LifecycleSignal } from "@lssm/lib.lifecycle";
2
-
3
- //#region src/adapters/intent-adapter.d.ts
4
- interface IntentAdapterResult {
5
- signals?: LifecycleSignal[];
6
- }
7
- interface IntentAdapter {
8
- fetch(): Promise<IntentAdapterResult>;
9
- }
10
- //#endregion
11
- export { IntentAdapter, IntentAdapterResult };
12
- //# sourceMappingURL=intent-adapter.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"intent-adapter.d.ts","names":[],"sources":["../../src/adapters/intent-adapter.ts"],"sourcesContent":[],"mappings":";;;UAEiB,mBAAA;YACL;AADZ;AAIiB,UAAA,aAAA,CACE;WAAR,QAAQ"}
@@ -1,14 +0,0 @@
1
- import { LifecycleAxes, LifecycleSignal } from "@lssm/lib.lifecycle";
2
-
3
- //#region src/adapters/questionnaire-adapter.d.ts
4
- interface QuestionnaireAdapterResult {
5
- axes?: Partial<LifecycleAxes>;
6
- signals?: LifecycleSignal[];
7
- answers?: Record<string, unknown>;
8
- }
9
- interface QuestionnaireAdapter {
10
- fetch(): Promise<QuestionnaireAdapterResult>;
11
- }
12
- //#endregion
13
- export { QuestionnaireAdapter, QuestionnaireAdapterResult };
14
- //# sourceMappingURL=questionnaire-adapter.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"questionnaire-adapter.d.ts","names":[],"sources":["../../src/adapters/questionnaire-adapter.ts"],"sourcesContent":[],"mappings":";;;UAEiB,0BAAA;SACR,QAAQ;EADA,OAAA,CAAA,EAEL,eAFK,EAAA;EACA,OAAA,CAAA,EAEL,MAFK,CAAA,MAAA,EAAA,OAAA,CAAA;;AACL,UAIK,oBAAA,CAJL;EACA,KAAA,EAAA,EAID,OAJC,CAIO,0BAJP,CAAA"}
@@ -1,25 +0,0 @@
1
- import { AnalyticsAdapter } from "../adapters/analytics-adapter.js";
2
- import { QuestionnaireAdapter } from "../adapters/questionnaire-adapter.js";
3
- import { IntentAdapter } from "../adapters/intent-adapter.js";
4
- import { LifecycleAssessmentInput, LifecycleAxes, LifecycleMetricSnapshot, LifecycleSignal } from "@lssm/lib.lifecycle";
5
-
6
- //#region src/collectors/signal-collector.d.ts
7
- interface StageSignalCollectorOptions {
8
- analyticsAdapter?: AnalyticsAdapter;
9
- questionnaireAdapter?: QuestionnaireAdapter;
10
- intentAdapter?: IntentAdapter;
11
- }
12
- interface StageSignalCollectorResult {
13
- axes: LifecycleAxes;
14
- metrics: LifecycleMetricSnapshot;
15
- signals: LifecycleSignal[];
16
- questionnaireAnswers?: Record<string, unknown>;
17
- }
18
- declare class StageSignalCollector {
19
- private readonly options;
20
- constructor(options: StageSignalCollectorOptions);
21
- collect(input?: LifecycleAssessmentInput): Promise<StageSignalCollectorResult>;
22
- }
23
- //#endregion
24
- export { StageSignalCollector, StageSignalCollectorOptions, StageSignalCollectorResult };
25
- //# sourceMappingURL=signal-collector.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"signal-collector.d.ts","names":[],"sources":["../../src/collectors/signal-collector.ts"],"sourcesContent":[],"mappings":";;;;;;UAiBiB,2BAAA;qBACI;EADJ,oBAAA,CAAA,EAEQ,oBAFmB;EACvB,aAAA,CAAA,EAEH,aAFG;;AAEH,UAGD,0BAAA,CAHC;EAAa,IAAA,EAIvB,aAJuB;EAGd,OAAA,EAEN,uBAFgC;EACnC,OAAA,EAEG,eAFH,EAAA;EACG,oBAAA,CAAA,EAEc,MAFd,CAAA,MAAA,EAAA,OAAA,CAAA;;AAEc,cAGZ,oBAAA,CAHY;EAAM,iBAAA,OAAA;EAGlB,WAAA,CAAA,OAAA,EAGU,2BAHU;EAGV,OAAA,CAAA,KAAA,CAAA,EAKZ,wBALY,CAAA,EAMlB,OANkB,CAMV,0BANU,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"signal-collector.js","names":["DEFAULT_AXES: LifecycleAxes","ProductPhase","CompanyPhase","CapitalPhase","axes: LifecycleAxes","metricsSnapshots: LifecycleMetricSnapshot[]","aggregatedSignals: LifecycleSignal[]","questionnaireAnswers: Record<string, unknown>"],"sources":["../../src/collectors/signal-collector.ts"],"sourcesContent":["import type {\n LifecycleAssessmentInput,\n LifecycleAxes,\n LifecycleMetricSnapshot,\n LifecycleSignal,\n} from '@lssm/lib.lifecycle';\nimport { CapitalPhase, CompanyPhase, ProductPhase } from '@lssm/lib.lifecycle';\nimport type { AnalyticsAdapter } from '../adapters/analytics-adapter';\nimport type { QuestionnaireAdapter } from '../adapters/questionnaire-adapter';\nimport type { IntentAdapter } from '../adapters/intent-adapter';\n\nconst DEFAULT_AXES: LifecycleAxes = {\n product: ProductPhase.Sketch,\n company: CompanyPhase.Solo,\n capital: CapitalPhase.Bootstrapped,\n};\n\nexport interface StageSignalCollectorOptions {\n analyticsAdapter?: AnalyticsAdapter;\n questionnaireAdapter?: QuestionnaireAdapter;\n intentAdapter?: IntentAdapter;\n}\n\nexport interface StageSignalCollectorResult {\n axes: LifecycleAxes;\n metrics: LifecycleMetricSnapshot;\n signals: LifecycleSignal[];\n questionnaireAnswers?: Record<string, unknown>;\n}\n\nexport class StageSignalCollector {\n private readonly options: StageSignalCollectorOptions;\n\n constructor(options: StageSignalCollectorOptions) {\n this.options = options;\n }\n\n async collect(\n input: LifecycleAssessmentInput = {}\n ): Promise<StageSignalCollectorResult> {\n const axes: LifecycleAxes = {\n ...DEFAULT_AXES,\n ...(input.axes ?? {}),\n };\n const metricsSnapshots: LifecycleMetricSnapshot[] = [];\n const aggregatedSignals: LifecycleSignal[] = [...(input.signals ?? [])];\n const questionnaireAnswers: Record<string, unknown> = {\n ...(input.questionnaireAnswers ?? {}),\n };\n\n if (input.metrics) {\n metricsSnapshots.push(input.metrics);\n }\n\n if (this.options.analyticsAdapter) {\n const result = await this.options.analyticsAdapter.fetch();\n if (result.axes) Object.assign(axes, result.axes);\n if (result.metrics) metricsSnapshots.push(result.metrics);\n if (result.signals) aggregatedSignals.push(...result.signals);\n }\n\n if (this.options.questionnaireAdapter) {\n const result = await this.options.questionnaireAdapter.fetch();\n if (result.axes) Object.assign(axes, result.axes);\n if (result.signals) aggregatedSignals.push(...result.signals);\n Object.assign(questionnaireAnswers, result.answers);\n }\n\n if (this.options.intentAdapter) {\n const result = await this.options.intentAdapter.fetch();\n if (result.signals) aggregatedSignals.push(...result.signals);\n }\n\n const metrics = mergeMetricSnapshots(metricsSnapshots);\n\n return {\n axes,\n metrics,\n signals: dedupeSignals(aggregatedSignals),\n questionnaireAnswers: Object.keys(questionnaireAnswers).length\n ? questionnaireAnswers\n : undefined,\n };\n }\n}\n\nconst mergeMetricSnapshots = (\n snapshots: LifecycleMetricSnapshot[]\n): LifecycleMetricSnapshot =>\n snapshots.reduce<LifecycleMetricSnapshot>((acc, snapshot) => {\n Object.entries(snapshot ?? {}).forEach(([key, value]) => {\n if (value !== undefined && value !== null) {\n acc[key as keyof LifecycleMetricSnapshot] = value as never;\n }\n });\n return acc;\n }, {});\n\nconst dedupeSignals = (signals: LifecycleSignal[]): LifecycleSignal[] => {\n const seen = new Set<string>();\n return signals.filter((signal) => {\n if (!signal.id) return true;\n if (seen.has(signal.id)) return false;\n seen.add(signal.id);\n return true;\n });\n};\n"],"mappings":"0GAWA,MAAMA,EAA8B,CAClC,QAASC,EAAa,OACtB,QAASC,EAAa,KACtB,QAASC,EAAa,aACvB,CAeD,IAAa,EAAb,KAAkC,CAChC,QAEA,YAAY,EAAsC,CAChD,KAAK,QAAU,EAGjB,MAAM,QACJ,EAAkC,EAAE,CACC,CACrC,IAAMC,EAAsB,CAC1B,GAAG,EACH,GAAI,EAAM,MAAQ,EAAE,CACrB,CACKC,EAA8C,EAAE,CAChDC,EAAuC,CAAC,GAAI,EAAM,SAAW,EAAE,CAAE,CACjEC,EAAgD,CACpD,GAAI,EAAM,sBAAwB,EAAE,CACrC,CAMD,GAJI,EAAM,SACR,EAAiB,KAAK,EAAM,QAAQ,CAGlC,KAAK,QAAQ,iBAAkB,CACjC,IAAM,EAAS,MAAM,KAAK,QAAQ,iBAAiB,OAAO,CACtD,EAAO,MAAM,OAAO,OAAO,EAAM,EAAO,KAAK,CAC7C,EAAO,SAAS,EAAiB,KAAK,EAAO,QAAQ,CACrD,EAAO,SAAS,EAAkB,KAAK,GAAG,EAAO,QAAQ,CAG/D,GAAI,KAAK,QAAQ,qBAAsB,CACrC,IAAM,EAAS,MAAM,KAAK,QAAQ,qBAAqB,OAAO,CAC1D,EAAO,MAAM,OAAO,OAAO,EAAM,EAAO,KAAK,CAC7C,EAAO,SAAS,EAAkB,KAAK,GAAG,EAAO,QAAQ,CAC7D,OAAO,OAAO,EAAsB,EAAO,QAAQ,CAGrD,GAAI,KAAK,QAAQ,cAAe,CAC9B,IAAM,EAAS,MAAM,KAAK,QAAQ,cAAc,OAAO,CACnD,EAAO,SAAS,EAAkB,KAAK,GAAG,EAAO,QAAQ,CAK/D,MAAO,CACL,OACA,QAJc,EAAqB,EAAiB,CAKpD,QAAS,EAAc,EAAkB,CACzC,qBAAsB,OAAO,KAAK,EAAqB,CAAC,OACpD,EACA,IAAA,GACL,GAIL,MAAM,EACJ,GAEA,EAAU,QAAiC,EAAK,KAC9C,OAAO,QAAQ,GAAY,EAAE,CAAC,CAAC,SAAS,CAAC,EAAK,KAAW,CACnD,GAAiC,OACnC,EAAI,GAAwC,IAE9C,CACK,GACN,EAAE,CAAC,CAEF,EAAiB,GAAkD,CACvE,IAAM,EAAO,IAAI,IACjB,OAAO,EAAQ,OAAQ,GAChB,EAAO,GACR,EAAK,IAAI,EAAO,GAAG,CAAS,IAChC,EAAK,IAAI,EAAO,GAAG,CACZ,IAHgB,GAIvB"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"milestones-catalog.js","names":[],"sources":["../../src/data/milestones-catalog.json"],"sourcesContent":["[\n {\n \"id\": \"stage0-problem-statement\",\n \"stage\": 0,\n \"category\": \"product\",\n \"title\": \"Write the pain statement\",\n \"description\": \"Capture the clearest description of the top problem in the customer’s own words.\",\n \"priority\": 1,\n \"actionItems\": [\n \"Interview at least 5 ideal customers\",\n \"Synthesize quotes into a one-page brief\"\n ]\n },\n {\n \"id\": \"stage1-prototype-loop\",\n \"stage\": 1,\n \"category\": \"product\",\n \"title\": \"Prototype feedback loop\",\n \"description\": \"Ship a clickable prototype and gather 3 rounds of feedback.\",\n \"priority\": 2,\n \"actionItems\": [\n \"Create a low-fidelity prototype\",\n \"Schedule standing feedback calls\"\n ]\n },\n {\n \"id\": \"stage2-activation\",\n \"stage\": 2,\n \"category\": \"operations\",\n \"title\": \"Activation checklist\",\n \"description\": \"Define the minimum steps required for a new user to succeed.\",\n \"priority\": 1,\n \"actionItems\": [\n \"Document onboarding flow\",\n \"Instrument activation analytics\"\n ]\n },\n {\n \"id\": \"stage3-retention-narrative\",\n \"stage\": 3,\n \"category\": \"product\",\n \"title\": \"Retention narrative\",\n \"description\": \"Create the before/after story that proves why users stay.\",\n \"priority\": 2,\n \"actionItems\": [\n \"Interview 3 retained users\",\n \"Publish a one-pager with concrete metrics\"\n ]\n },\n {\n \"id\": \"stage4-growth-loop\",\n \"stage\": 4,\n \"category\": \"growth\",\n \"title\": \"Install a growth loop\",\n \"description\": \"Stand up a repeatable acquisition → activation → referral motion.\",\n \"priority\": 1,\n \"actionItems\": [\n \"Define loop metrics\",\n \"Assign owners for each stage\",\n \"Review weekly\"\n ]\n },\n {\n \"id\": \"stage5-platform-blueprint\",\n \"stage\": 5,\n \"category\": \"product\",\n \"title\": \"Platform blueprint\",\n \"description\": \"Align on APIs, integrations, and governance for partners.\",\n \"priority\": 2,\n \"actionItems\": [\n \"Create integration scoring rubric\",\n \"Publish partner onboarding checklist\"\n ]\n },\n {\n \"id\": \"stage6-renewal-ops\",\n \"stage\": 6,\n \"category\": \"operations\",\n \"title\": \"Renewal operating rhythm\",\n \"description\": \"Decide whether to optimize, reinvest, or sunset each major surface.\",\n \"priority\": 1,\n \"actionItems\": [\n \"Hold quarterly renewal review\",\n \"Document reinvestment bets\"\n ]\n }\n]\n"],"mappings":"MAAA,CACE,CACE,GAAM,2BACN,MAAS,EACT,SAAY,UACZ,MAAS,2BACT,YAAe,mFACf,SAAY,EACZ,YAAe,CACb,uCACA,0CACD,CACF,CACD,CACE,GAAM,wBACN,MAAS,EACT,SAAY,UACZ,MAAS,0BACT,YAAe,8DACf,SAAY,EACZ,YAAe,CACb,kCACA,mCACD,CACF,CACD,CACE,GAAM,oBACN,MAAS,EACT,SAAY,aACZ,MAAS,uBACT,YAAe,+DACf,SAAY,EACZ,YAAe,CACb,2BACA,kCACD,CACF,CACD,CACE,GAAM,6BACN,MAAS,EACT,SAAY,UACZ,MAAS,sBACT,YAAe,4DACf,SAAY,EACZ,YAAe,CACb,6BACA,4CACD,CACF,CACD,CACE,GAAM,qBACN,MAAS,EACT,SAAY,SACZ,MAAS,wBACT,YAAe,oEACf,SAAY,EACZ,YAAe,CACb,sBACA,+BACA,gBACD,CACF,CACD,CACE,GAAM,4BACN,MAAS,EACT,SAAY,UACZ,MAAS,qBACT,YAAe,4DACf,SAAY,EACZ,YAAe,CACb,oCACA,uCACD,CACF,CACD,CACE,GAAM,qBACN,MAAS,EACT,SAAY,aACZ,MAAS,2BACT,YAAe,sEACf,SAAY,EACZ,YAAe,CACb,gCACA,6BACD,CACF,CACF"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"stage-weights.js","names":[],"sources":["../../src/data/stage-weights.json"],"sourcesContent":["{\n \"Exploration\": {\n \"base\": 0.35,\n \"metrics\": {\n \"activeUsers\": { \"weight\": -0.3, \"direction\": \"lte\", \"threshold\": 5 },\n \"customerCount\": { \"weight\": -0.2, \"direction\": \"lte\", \"threshold\": 3 },\n \"teamSize\": { \"weight\": -0.1, \"direction\": \"lte\", \"threshold\": 3 }\n },\n \"signalKinds\": {\n \"qualitative\": 0.4,\n \"metric\": 0.1\n }\n },\n \"ProblemSolutionFit\": {\n \"base\": 0.4,\n \"metrics\": {\n \"activeUsers\": { \"weight\": 0.2, \"direction\": \"gte\", \"threshold\": 5 },\n \"customerCount\": { \"weight\": 0.2, \"direction\": \"gte\", \"threshold\": 3 }\n },\n \"signalKinds\": {\n \"qualitative\": 0.3,\n \"event\": 0.1\n }\n },\n \"MvpEarlyTraction\": {\n \"base\": 0.45,\n \"metrics\": {\n \"activeUsers\": { \"weight\": 0.25, \"direction\": \"gte\", \"threshold\": 25 },\n \"weeklyActiveUsers\": {\n \"weight\": 0.25,\n \"direction\": \"gte\",\n \"threshold\": 20\n },\n \"retentionRate\": { \"weight\": 0.2, \"direction\": \"gte\", \"threshold\": 0.25 }\n },\n \"signalKinds\": {\n \"metric\": 0.15,\n \"event\": 0.1\n }\n },\n \"ProductMarketFit\": {\n \"base\": 0.5,\n \"metrics\": {\n \"retentionRate\": {\n \"weight\": 0.35,\n \"direction\": \"gte\",\n \"threshold\": 0.45\n },\n \"monthlyRecurringRevenue\": {\n \"weight\": 0.25,\n \"direction\": \"gte\",\n \"threshold\": 10000\n },\n \"customerCount\": { \"weight\": 0.2, \"direction\": \"gte\", \"threshold\": 30 }\n },\n \"signalKinds\": {\n \"metric\": 0.15,\n \"event\": 0.1\n }\n },\n \"GrowthScaleUp\": {\n \"base\": 0.55,\n \"metrics\": {\n \"retentionRate\": { \"weight\": 0.2, \"direction\": \"gte\", \"threshold\": 0.55 },\n \"monthlyRecurringRevenue\": {\n \"weight\": 0.3,\n \"direction\": \"gte\",\n \"threshold\": 50000\n },\n \"teamSize\": { \"weight\": 0.15, \"direction\": \"gte\", \"threshold\": 15 }\n },\n \"signalKinds\": {\n \"event\": 0.2,\n \"metric\": 0.15\n }\n },\n \"ExpansionPlatform\": {\n \"base\": 0.6,\n \"metrics\": {\n \"monthlyRecurringRevenue\": {\n \"weight\": 0.35,\n \"direction\": \"gte\",\n \"threshold\": 150000\n },\n \"customerCount\": { \"weight\": 0.2, \"direction\": \"gte\", \"threshold\": 100 },\n \"teamSize\": { \"weight\": 0.15, \"direction\": \"gte\", \"threshold\": 40 }\n },\n \"signalKinds\": {\n \"event\": 0.2,\n \"milestone\": 0.1\n }\n },\n \"MaturityRenewal\": {\n \"base\": 0.6,\n \"metrics\": {\n \"monthlyRecurringRevenue\": {\n \"weight\": 0.25,\n \"direction\": \"gte\",\n \"threshold\": 250000\n },\n \"teamSize\": { \"weight\": 0.15, \"direction\": \"gte\", \"threshold\": 80 },\n \"burnMultiple\": { \"weight\": 0.2, \"direction\": \"lte\", \"threshold\": 1.5 }\n },\n \"signalKinds\": {\n \"event\": 0.2,\n \"milestone\": 0.15\n }\n }\n}\n"],"mappings":"MAAA,aACiB,CACb,KAAQ,IACR,QAAW,CACT,YAAe,CAAE,OAAU,IAAM,UAAa,MAAO,UAAa,EAAG,CACrE,cAAiB,CAAE,OAAU,IAAM,UAAa,MAAO,UAAa,EAAG,CACvE,SAAY,CAAE,OAAU,IAAM,UAAa,MAAO,UAAa,EAAG,CACnE,CACD,YAAe,CACb,YAAe,GACf,OAAU,GACX,CACF,oBACqB,CACpB,KAAQ,GACR,QAAW,CACT,YAAe,CAAE,OAAU,GAAK,UAAa,MAAO,UAAa,EAAG,CACpE,cAAiB,CAAE,OAAU,GAAK,UAAa,MAAO,UAAa,EAAG,CACvE,CACD,YAAe,CACb,YAAe,GACf,MAAS,GACV,CACF,kBACmB,CAClB,KAAQ,IACR,QAAW,CACT,YAAe,CAAE,OAAU,IAAM,UAAa,MAAO,UAAa,GAAI,CACtE,kBAAqB,CACnB,OAAU,IACV,UAAa,MACb,UAAa,GACd,CACD,cAAiB,CAAE,OAAU,GAAK,UAAa,MAAO,UAAa,IAAM,CAC1E,CACD,YAAe,CACb,OAAU,IACV,MAAS,GACV,CACF,kBACmB,CAClB,KAAQ,GACR,QAAW,CACT,cAAiB,CACf,OAAU,IACV,UAAa,MACb,UAAa,IACd,CACD,wBAA2B,CACzB,OAAU,IACV,UAAa,MACb,UAAa,IACd,CACD,cAAiB,CAAE,OAAU,GAAK,UAAa,MAAO,UAAa,GAAI,CACxE,CACD,YAAe,CACb,OAAU,IACV,MAAS,GACV,CACF,eACgB,CACf,KAAQ,IACR,QAAW,CACT,cAAiB,CAAE,OAAU,GAAK,UAAa,MAAO,UAAa,IAAM,CACzE,wBAA2B,CACzB,OAAU,GACV,UAAa,MACb,UAAa,IACd,CACD,SAAY,CAAE,OAAU,IAAM,UAAa,MAAO,UAAa,GAAI,CACpE,CACD,YAAe,CACb,MAAS,GACT,OAAU,IACX,CACF,mBACoB,CACnB,KAAQ,GACR,QAAW,CACT,wBAA2B,CACzB,OAAU,IACV,UAAa,MACb,UAAa,KACd,CACD,cAAiB,CAAE,OAAU,GAAK,UAAa,MAAO,UAAa,IAAK,CACxE,SAAY,CAAE,OAAU,IAAM,UAAa,MAAO,UAAa,GAAI,CACpE,CACD,YAAe,CACb,MAAS,GACT,UAAa,GACd,CACF,iBACkB,CACjB,KAAQ,GACR,QAAW,CACT,wBAA2B,CACzB,OAAU,IACV,UAAa,MACb,UAAa,KACd,CACD,SAAY,CAAE,OAAU,IAAM,UAAa,MAAO,UAAa,GAAI,CACnE,aAAgB,CAAE,OAAU,GAAK,UAAa,MAAO,UAAa,IAAK,CACxE,CACD,YAAe,CACb,MAAS,GACT,UAAa,IACd,CACF,CACF"}
package/dist/index.d.ts DELETED
@@ -1,8 +0,0 @@
1
- import { AnalyticsAdapter, AnalyticsAdapterResult } from "./adapters/analytics-adapter.js";
2
- import { QuestionnaireAdapter, QuestionnaireAdapterResult } from "./adapters/questionnaire-adapter.js";
3
- import { IntentAdapter, IntentAdapterResult } from "./adapters/intent-adapter.js";
4
- import { StageSignalCollector, StageSignalCollectorOptions, StageSignalCollectorResult } from "./collectors/signal-collector.js";
5
- import { StageScoreInput, StageScorer } from "./scoring/stage-scorer.js";
6
- import { LifecycleMilestonePlanner } from "./planning/milestone-planner.js";
7
- import { LifecycleOrchestrator, LifecycleOrchestratorOptions } from "./orchestrator/lifecycle-orchestrator.js";
8
- export { AnalyticsAdapter, AnalyticsAdapterResult, IntentAdapter, IntentAdapterResult, LifecycleMilestonePlanner, LifecycleOrchestrator, LifecycleOrchestratorOptions, QuestionnaireAdapter, QuestionnaireAdapterResult, StageScoreInput, StageScorer, StageSignalCollector, StageSignalCollectorOptions, StageSignalCollectorResult };
@@ -1 +0,0 @@
1
- import{e,n as t}from"./types/stages.js";import{e as n,n as r,t as i}from"./types/axes.js";import"./types/signals.js";import"./types/milestones.js";import"./utils/formatters.js";
@@ -1,2 +0,0 @@
1
- let e=function(e){return e.Sketch=`Sketch`,e.Prototype=`Prototype`,e.Mvp=`MVP`,e.V1=`V1`,e.Ecosystem=`Ecosystem`,e}({}),t=function(e){return e.Solo=`Solo`,e.TinyTeam=`TinyTeam`,e.FunctionalOrg=`FunctionalOrg`,e.MultiTeam=`MultiTeam`,e.Bureaucratic=`Bureaucratic`,e}({}),n=function(e){return e.Bootstrapped=`Bootstrapped`,e.PreSeed=`PreSeed`,e.Seed=`Seed`,e.SeriesAorB=`SeriesAorB`,e.LateStage=`LateStage`,e}({});export{e,n,t};
2
- //# sourceMappingURL=axes.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"axes.js","names":["e"],"sources":["../../../../../../../libs/lifecycle/dist/types/axes.js"],"sourcesContent":["let e=function(e){return e.Sketch=`Sketch`,e.Prototype=`Prototype`,e.Mvp=`MVP`,e.V1=`V1`,e.Ecosystem=`Ecosystem`,e}({}),t=function(e){return e.Solo=`Solo`,e.TinyTeam=`TinyTeam`,e.FunctionalOrg=`FunctionalOrg`,e.MultiTeam=`MultiTeam`,e.Bureaucratic=`Bureaucratic`,e}({}),n=function(e){return e.Bootstrapped=`Bootstrapped`,e.PreSeed=`PreSeed`,e.Seed=`Seed`,e.SeriesAorB=`SeriesAorB`,e.LateStage=`LateStage`,e}({});export{n as CapitalPhase,t as CompanyPhase,e as ProductPhase};\n//# sourceMappingURL=axes.js.map"],"mappings":"AAAA,IAAI,EAAE,SAAS,EAAE,CAAC,MAAO,GAAE,OAAO,SAAS,EAAE,UAAU,YAAY,EAAE,IAAI,MAAM,EAAE,GAAG,KAAK,EAAE,UAAU,YAAYA,GAAG,EAAE,CAAC,CAAC,EAAE,SAAS,EAAE,CAAC,MAAO,GAAE,KAAK,OAAO,EAAE,SAAS,WAAW,EAAE,cAAc,gBAAgB,EAAE,UAAU,YAAY,EAAE,aAAa,eAAeA,GAAG,EAAE,CAAC,CAAC,EAAE,SAAS,EAAE,CAAC,MAAO,GAAE,aAAa,eAAe,EAAE,QAAQ,UAAU,EAAE,KAAK,OAAO,EAAE,WAAW,aAAa,EAAE,UAAU,YAAYA,GAAG,EAAE,CAAC"}
@@ -1 +0,0 @@
1
- import"./stages.js";
@@ -1 +0,0 @@
1
- import"./stages.js";
@@ -1,2 +0,0 @@
1
- let e=function(e){return e[e.Exploration=0]=`Exploration`,e[e.ProblemSolutionFit=1]=`ProblemSolutionFit`,e[e.MvpEarlyTraction=2]=`MvpEarlyTraction`,e[e.ProductMarketFit=3]=`ProductMarketFit`,e[e.GrowthScaleUp=4]=`GrowthScaleUp`,e[e.ExpansionPlatform=5]=`ExpansionPlatform`,e[e.MaturityRenewal=6]=`MaturityRenewal`,e}({});e.Exploration,e.ProblemSolutionFit,e.MvpEarlyTraction,e.ProductMarketFit,e.GrowthScaleUp,e.ExpansionPlatform,e.MaturityRenewal;const t={[e.Exploration]:{id:e.Exploration,order:0,slug:`exploration`,name:`Exploration / Ideation`,question:`Is there a problem worth my time?`,signals:[`20+ discovery interviews`,`Clear problem statement`,`Named ICP`],traps:[`Branding before discovery`,`Premature tooling decisions`],focusAreas:[`Customer discovery`,`Problem definition`,`Segment clarity`]},[e.ProblemSolutionFit]:{id:e.ProblemSolutionFit,order:1,slug:`problem-solution-fit`,name:`Problem–Solution Fit`,question:`Do people care enough about this solution?`,signals:[`Prototype reuse`,`Referral energy`,`Pre-pay interest`],traps:[`“Market is huge” without users`,`Skipping qualitative loops`],focusAreas:[`Solution hypothesis`,`Value messaging`,`Feedback capture`]},[e.MvpEarlyTraction]:{id:e.MvpEarlyTraction,order:2,slug:`mvp-early-traction`,name:`MVP & Early Traction`,question:`Can we get real usage and learn fast?`,signals:[`20–50 named active users`,`Weekly releases`,`Noisy feedback`],traps:[`Overbuilt infra for 10 users`,`Undefined retention metric`],focusAreas:[`Activation`,`Cohort tracking`,`Feedback rituals`]},[e.ProductMarketFit]:{id:e.ProductMarketFit,order:3,slug:`product-market-fit`,name:`Product–Market Fit`,question:`Is this pulling us forward?`,signals:[`Retention without heroics`,`Organic word-of-mouth`,`Value stories`],traps:[`Hero growth that does not scale`,`Ignoring churn signals`],focusAreas:[`Retention`,`Reliability`,`ICP clarity`]},[e.GrowthScaleUp]:{id:e.GrowthScaleUp,order:4,slug:`growth-scale-up`,name:`Growth / Scale-up`,question:`Can we grow this repeatably?`,signals:[`Predictable channels`,`Specialized hires`,`Unit economics on track`],traps:[`Paid spend masking retention gaps`,`Infra debt blocking launches`],focusAreas:[`Ops systems`,`Growth loops`,`Reliability engineering`]},[e.ExpansionPlatform]:{id:e.ExpansionPlatform,order:5,slug:`expansion-platform`,name:`Expansion / Platform`,question:`What is the next growth curve?`,signals:[`Stable core metrics`,`Partner/API demand`,`Ecosystem pull`],traps:[`Platform theater before wedge is solid`],focusAreas:[`Partnerships`,`APIs`,`New market validation`]},[e.MaturityRenewal]:{id:e.MaturityRenewal,order:6,slug:`maturity-renewal`,name:`Maturity / Renewal`,question:`Optimize, reinvent, or sunset?`,signals:[`Margin focus`,`Portfolio bets`,`Narrative refresh`],traps:[`Assuming past success is enough`],focusAreas:[`Cost optimization`,`Reinvention bets`,`Sunset planning`]}};export{e,t as n};
2
- //# sourceMappingURL=stages.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"stages.js","names":["e","t"],"sources":["../../../../../../../libs/lifecycle/dist/types/stages.js"],"sourcesContent":["let e=function(e){return e[e.Exploration=0]=`Exploration`,e[e.ProblemSolutionFit=1]=`ProblemSolutionFit`,e[e.MvpEarlyTraction=2]=`MvpEarlyTraction`,e[e.ProductMarketFit=3]=`ProductMarketFit`,e[e.GrowthScaleUp=4]=`GrowthScaleUp`,e[e.ExpansionPlatform=5]=`ExpansionPlatform`,e[e.MaturityRenewal=6]=`MaturityRenewal`,e}({});const t=[e.Exploration,e.ProblemSolutionFit,e.MvpEarlyTraction,e.ProductMarketFit,e.GrowthScaleUp,e.ExpansionPlatform,e.MaturityRenewal],n={[e.Exploration]:{id:e.Exploration,order:0,slug:`exploration`,name:`Exploration / Ideation`,question:`Is there a problem worth my time?`,signals:[`20+ discovery interviews`,`Clear problem statement`,`Named ICP`],traps:[`Branding before discovery`,`Premature tooling decisions`],focusAreas:[`Customer discovery`,`Problem definition`,`Segment clarity`]},[e.ProblemSolutionFit]:{id:e.ProblemSolutionFit,order:1,slug:`problem-solution-fit`,name:`Problem–Solution Fit`,question:`Do people care enough about this solution?`,signals:[`Prototype reuse`,`Referral energy`,`Pre-pay interest`],traps:[`“Market is huge” without users`,`Skipping qualitative loops`],focusAreas:[`Solution hypothesis`,`Value messaging`,`Feedback capture`]},[e.MvpEarlyTraction]:{id:e.MvpEarlyTraction,order:2,slug:`mvp-early-traction`,name:`MVP & Early Traction`,question:`Can we get real usage and learn fast?`,signals:[`20–50 named active users`,`Weekly releases`,`Noisy feedback`],traps:[`Overbuilt infra for 10 users`,`Undefined retention metric`],focusAreas:[`Activation`,`Cohort tracking`,`Feedback rituals`]},[e.ProductMarketFit]:{id:e.ProductMarketFit,order:3,slug:`product-market-fit`,name:`Product–Market Fit`,question:`Is this pulling us forward?`,signals:[`Retention without heroics`,`Organic word-of-mouth`,`Value stories`],traps:[`Hero growth that does not scale`,`Ignoring churn signals`],focusAreas:[`Retention`,`Reliability`,`ICP clarity`]},[e.GrowthScaleUp]:{id:e.GrowthScaleUp,order:4,slug:`growth-scale-up`,name:`Growth / Scale-up`,question:`Can we grow this repeatably?`,signals:[`Predictable channels`,`Specialized hires`,`Unit economics on track`],traps:[`Paid spend masking retention gaps`,`Infra debt blocking launches`],focusAreas:[`Ops systems`,`Growth loops`,`Reliability engineering`]},[e.ExpansionPlatform]:{id:e.ExpansionPlatform,order:5,slug:`expansion-platform`,name:`Expansion / Platform`,question:`What is the next growth curve?`,signals:[`Stable core metrics`,`Partner/API demand`,`Ecosystem pull`],traps:[`Platform theater before wedge is solid`],focusAreas:[`Partnerships`,`APIs`,`New market validation`]},[e.MaturityRenewal]:{id:e.MaturityRenewal,order:6,slug:`maturity-renewal`,name:`Maturity / Renewal`,question:`Optimize, reinvent, or sunset?`,signals:[`Margin focus`,`Portfolio bets`,`Narrative refresh`],traps:[`Assuming past success is enough`],focusAreas:[`Cost optimization`,`Reinvention bets`,`Sunset planning`]}},r=e=>{let t=Object.values(n).find(t=>t.slug===e);if(!t)throw Error(`Unknown lifecycle stage slug: ${e}`);return t.id};export{n as LIFECYCLE_STAGE_META,t as LIFECYCLE_STAGE_ORDER,e as LifecycleStage,r as getLifecycleStageBySlug};\n//# sourceMappingURL=stages.js.map"],"mappings":"AAAA,IAAI,EAAE,SAAS,EAAE,CAAC,MAAO,GAAE,EAAE,YAAY,GAAG,cAAc,EAAE,EAAE,mBAAmB,GAAG,qBAAqB,EAAE,EAAE,iBAAiB,GAAG,mBAAmB,EAAE,EAAE,iBAAiB,GAAG,mBAAmB,EAAE,EAAE,cAAc,GAAG,gBAAgB,EAAE,EAAE,kBAAkB,GAAG,oBAAoB,EAAE,EAAE,gBAAgB,GAAG,kBAAkBA,GAAG,EAAE,CAAC,CAAU,EAAE,YAAY,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,cAAc,EAAE,kBAAkB,EAAE,gBAAxH,MAAyI,EAAE,EAAE,EAAE,aAAa,CAAC,GAAG,EAAE,YAAY,MAAM,EAAE,KAAK,cAAc,KAAK,yBAAyB,SAAS,oCAAoC,QAAQ,CAAC,2BAA2B,0BAA0B,YAAY,CAAC,MAAM,CAAC,4BAA4B,8BAA8B,CAAC,WAAW,CAAC,qBAAqB,qBAAqB,kBAAkB,CAAC,EAAE,EAAE,oBAAoB,CAAC,GAAG,EAAE,mBAAmB,MAAM,EAAE,KAAK,uBAAuB,KAAK,uBAAuB,SAAS,6CAA6C,QAAQ,CAAC,kBAAkB,kBAAkB,mBAAmB,CAAC,MAAM,CAAC,iCAAiC,6BAA6B,CAAC,WAAW,CAAC,sBAAsB,kBAAkB,mBAAmB,CAAC,EAAE,EAAE,kBAAkB,CAAC,GAAG,EAAE,iBAAiB,MAAM,EAAE,KAAK,qBAAqB,KAAK,uBAAuB,SAAS,wCAAwC,QAAQ,CAAC,2BAA2B,kBAAkB,iBAAiB,CAAC,MAAM,CAAC,+BAA+B,6BAA6B,CAAC,WAAW,CAAC,aAAa,kBAAkB,mBAAmB,CAAC,EAAE,EAAE,kBAAkB,CAAC,GAAG,EAAE,iBAAiB,MAAM,EAAE,KAAK,qBAAqB,KAAK,qBAAqB,SAAS,8BAA8B,QAAQ,CAAC,4BAA4B,wBAAwB,gBAAgB,CAAC,MAAM,CAAC,kCAAkC,yBAAyB,CAAC,WAAW,CAAC,YAAY,cAAc,cAAc,CAAC,EAAE,EAAE,eAAe,CAAC,GAAG,EAAE,cAAc,MAAM,EAAE,KAAK,kBAAkB,KAAK,oBAAoB,SAAS,+BAA+B,QAAQ,CAAC,uBAAuB,oBAAoB,0BAA0B,CAAC,MAAM,CAAC,oCAAoC,+BAA+B,CAAC,WAAW,CAAC,cAAc,eAAe,0BAA0B,CAAC,EAAE,EAAE,mBAAmB,CAAC,GAAG,EAAE,kBAAkB,MAAM,EAAE,KAAK,qBAAqB,KAAK,uBAAuB,SAAS,iCAAiC,QAAQ,CAAC,sBAAsB,qBAAqB,iBAAiB,CAAC,MAAM,CAAC,yCAAyC,CAAC,WAAW,CAAC,eAAe,OAAO,wBAAwB,CAAC,EAAE,EAAE,iBAAiB,CAAC,GAAG,EAAE,gBAAgB,MAAM,EAAE,KAAK,mBAAmB,KAAK,qBAAqB,SAAS,iCAAiC,QAAQ,CAAC,eAAe,iBAAiB,oBAAoB,CAAC,MAAM,CAAC,kCAAkC,CAAC,WAAW,CAAC,oBAAoB,mBAAmB,kBAAkB,CAAC,CAAC"}
@@ -1 +0,0 @@
1
- import"../types/stages.js";
@@ -1,22 +0,0 @@
1
- import { StageSignalCollector } from "../collectors/signal-collector.js";
2
- import { StageScorer } from "../scoring/stage-scorer.js";
3
- import { LifecycleMilestonePlanner } from "../planning/milestone-planner.js";
4
- import { LifecycleAssessment, LifecycleAssessmentInput, LifecycleMilestone, LifecycleStage } from "@lssm/lib.lifecycle";
5
-
6
- //#region src/orchestrator/lifecycle-orchestrator.d.ts
7
- interface LifecycleOrchestratorOptions {
8
- collector: StageSignalCollector;
9
- scorer: StageScorer;
10
- milestonePlanner?: LifecycleMilestonePlanner;
11
- }
12
- declare class LifecycleOrchestrator {
13
- private readonly collector;
14
- private readonly scorer;
15
- private readonly planner?;
16
- constructor(options: LifecycleOrchestratorOptions);
17
- run(input?: LifecycleAssessmentInput): Promise<LifecycleAssessment>;
18
- getUpcomingMilestones(stage: LifecycleStage, completedMilestoneIds?: string[], limit?: number): LifecycleMilestone[];
19
- }
20
- //#endregion
21
- export { LifecycleOrchestrator, LifecycleOrchestratorOptions };
22
- //# sourceMappingURL=lifecycle-orchestrator.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"lifecycle-orchestrator.d.ts","names":[],"sources":["../../src/orchestrator/lifecycle-orchestrator.ts"],"sourcesContent":[],"mappings":";;;;;;UAWiB,4BAAA;EAAA,SAAA,EACJ,oBADgC;EAChC,MAAA,EACH,WADG;EACH,gBAAA,CAAA,EACW,yBADX;;AACoC,cAGjC,qBAAA,CAHiC;EAGjC,iBAAA,SAAqB;EAKX,iBAAA,MAAA;EAMH,iBAAA,OAAA;EAAmC,WAAA,CAAA,OAAA,EANhC,4BAMgC;EAAR,GAAA,CAAA,KAAA,CAAA,EAA3B,wBAA2B,CAAA,EAAA,OAAA,CAAQ,mBAAR,CAAA;EAuBpC,qBAAA,CAAA,KAAA,EAAA,cAAA,EAAA,qBAAA,CAAA,EAAA,MAAA,EAAA,EAAA,KAAA,CAAA,EAAA,MAAA,CAAA,EAGN,kBAHM,EAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"lifecycle-orchestrator.js","names":["LIFECYCLE_STAGE_META","LifecycleStage"],"sources":["../../src/orchestrator/lifecycle-orchestrator.ts"],"sourcesContent":["import type {\n LifecycleAssessment,\n LifecycleAssessmentInput,\n LifecycleMilestone,\n LifecycleMetricSnapshot,\n} from '@lssm/lib.lifecycle';\nimport { LIFECYCLE_STAGE_META, LifecycleStage } from '@lssm/lib.lifecycle';\nimport { StageSignalCollector } from '../collectors/signal-collector';\nimport { StageScorer } from '../scoring/stage-scorer';\nimport { LifecycleMilestonePlanner } from '../planning/milestone-planner';\n\nexport interface LifecycleOrchestratorOptions {\n collector: StageSignalCollector;\n scorer: StageScorer;\n milestonePlanner?: LifecycleMilestonePlanner;\n}\n\nexport class LifecycleOrchestrator {\n private readonly collector: StageSignalCollector;\n private readonly scorer: StageScorer;\n private readonly planner?: LifecycleMilestonePlanner;\n\n constructor(options: LifecycleOrchestratorOptions) {\n this.collector = options.collector;\n this.scorer = options.scorer;\n this.planner = options.milestonePlanner;\n }\n\n async run(input?: LifecycleAssessmentInput): Promise<LifecycleAssessment> {\n const collected = await this.collector.collect(input);\n const scorecard = this.scorer.score({\n metrics: collected.metrics,\n signals: collected.signals,\n });\n const top = scorecard[0] ?? fallbackScore();\n const meta = LIFECYCLE_STAGE_META[top.stage];\n\n return {\n stage: top.stage,\n confidence: top.confidence,\n axes: collected.axes,\n signals: collected.signals,\n metrics: toMetricRecord(collected.metrics),\n gaps: meta.focusAreas.slice(0, 3),\n focusAreas: meta.focusAreas,\n scorecard,\n generatedAt: new Date().toISOString(),\n };\n }\n\n getUpcomingMilestones(\n stage: LifecycleStage,\n completedMilestoneIds: string[] = [],\n limit = 5\n ): LifecycleMilestone[] {\n if (!this.planner) return [];\n return this.planner.getUpcoming(stage, completedMilestoneIds, limit);\n }\n}\n\nconst fallbackScore = () => ({\n stage: LifecycleStage.Exploration,\n score: 0.3,\n confidence: 0.3,\n supportingSignals: [],\n});\n\nconst toMetricRecord = (\n snapshot: LifecycleMetricSnapshot\n): Record<string, number | undefined> =>\n Object.entries(snapshot ?? {}).reduce<Record<string, number | undefined>>(\n (acc, [key, value]) => {\n if (typeof value === 'number') {\n acc[key] = value;\n }\n return acc;\n },\n {}\n );\n"],"mappings":"kLAiBA,IAAa,EAAb,KAAmC,CACjC,UACA,OACA,QAEA,YAAY,EAAuC,CACjD,KAAK,UAAY,EAAQ,UACzB,KAAK,OAAS,EAAQ,OACtB,KAAK,QAAU,EAAQ,iBAGzB,MAAM,IAAI,EAAgE,CACxE,IAAM,EAAY,MAAM,KAAK,UAAU,QAAQ,EAAM,CAC/C,EAAY,KAAK,OAAO,MAAM,CAClC,QAAS,EAAU,QACnB,QAAS,EAAU,QACpB,CAAC,CACI,EAAM,EAAU,IAAM,GAAe,CACrC,EAAOA,EAAqB,EAAI,OAEtC,MAAO,CACL,MAAO,EAAI,MACX,WAAY,EAAI,WAChB,KAAM,EAAU,KAChB,QAAS,EAAU,QACnB,QAAS,EAAe,EAAU,QAAQ,CAC1C,KAAM,EAAK,WAAW,MAAM,EAAG,EAAE,CACjC,WAAY,EAAK,WACjB,YACA,YAAa,IAAI,MAAM,CAAC,aAAa,CACtC,CAGH,sBACE,EACA,EAAkC,EAAE,CACpC,EAAQ,EACc,CAEtB,OADK,KAAK,QACH,KAAK,QAAQ,YAAY,EAAO,EAAuB,EAAM,CAD1C,EAAE,GAKhC,MAAM,OAAuB,CAC3B,MAAOC,EAAe,YACtB,MAAO,GACP,WAAY,GACZ,kBAAmB,EAAE,CACtB,EAEK,EACJ,GAEA,OAAO,QAAQ,GAAY,EAAE,CAAC,CAAC,QAC5B,EAAK,CAAC,EAAK,MACN,OAAO,GAAU,WACnB,EAAI,GAAO,GAEN,GAET,EAAE,CACH"}
@@ -1,11 +0,0 @@
1
- import { LifecycleMilestone, LifecycleStage } from "@lssm/lib.lifecycle";
2
-
3
- //#region src/planning/milestone-planner.d.ts
4
- declare class LifecycleMilestonePlanner {
5
- private readonly milestones;
6
- constructor(customCatalog?: LifecycleMilestone[]);
7
- getUpcoming(stage: LifecycleStage, completedIds?: string[], limit?: number): LifecycleMilestone[];
8
- }
9
- //#endregion
10
- export { LifecycleMilestonePlanner };
11
- //# sourceMappingURL=milestone-planner.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"milestone-planner.d.ts","names":[],"sources":["../../src/planning/milestone-planner.ts"],"sourcesContent":[],"mappings":";;;cAGa,yBAAA;;EAAA,WAAA,CAAA,aAAyB,CAAzB,EAGiB,kBAHQ,EAAA;EAGR,WAAA,CAAA,KAAA,EAKnB,cALmB,EAAA,YAAA,CAAA,EAAA,MAAA,EAAA,EAAA,KAAA,CAAA,EAAA,MAAA,CAAA,EAQzB,kBARyB,EAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"milestone-planner.js","names":["catalog"],"sources":["../../src/planning/milestone-planner.ts"],"sourcesContent":["import type { LifecycleMilestone, LifecycleStage } from '@lssm/lib.lifecycle';\nimport catalog from '../data/milestones-catalog.json' assert { type: 'json' };\n\nexport class LifecycleMilestonePlanner {\n private readonly milestones: LifecycleMilestone[];\n\n constructor(customCatalog?: LifecycleMilestone[]) {\n this.milestones = customCatalog ?? (catalog as LifecycleMilestone[]);\n }\n\n getUpcoming(\n stage: LifecycleStage,\n completedIds: string[] = [],\n limit = 5\n ): LifecycleMilestone[] {\n const completedSet = new Set(completedIds);\n return this.milestones\n .filter(\n (milestone) =>\n milestone.stage === stage && !completedSet.has(milestone.id)\n )\n .sort((a, b) => a.priority - b.priority)\n .slice(0, limit);\n }\n}\n"],"mappings":"6CAGA,IAAa,EAAb,KAAuC,CACrC,WAEA,YAAY,EAAsC,CAChD,KAAK,WAAa,GAAkBA,EAGtC,YACE,EACA,EAAyB,EAAE,CAC3B,EAAQ,EACc,CACtB,IAAM,EAAe,IAAI,IAAI,EAAa,CAC1C,OAAO,KAAK,WACT,OACE,GACC,EAAU,QAAU,GAAS,CAAC,EAAa,IAAI,EAAU,GAAG,CAC/D,CACA,MAAM,EAAG,IAAM,EAAE,SAAW,EAAE,SAAS,CACvC,MAAM,EAAG,EAAM"}
@@ -1,27 +0,0 @@
1
- import { LifecycleMetricSnapshot, LifecycleScore, LifecycleSignal } from "@lssm/lib.lifecycle";
2
-
3
- //#region src/scoring/stage-scorer.d.ts
4
- type NumericMetricKey = Extract<{ [Key in keyof LifecycleMetricSnapshot]: LifecycleMetricSnapshot[Key] extends number | undefined ? Key : never }[keyof LifecycleMetricSnapshot], string>;
5
- interface MetricWeightConfig {
6
- weight: number;
7
- threshold: number;
8
- direction?: 'gte' | 'lte';
9
- }
10
- interface StageWeightConfig {
11
- base: number;
12
- metrics?: Partial<Record<NumericMetricKey, MetricWeightConfig>>;
13
- signalKinds?: Partial<Record<string, number>>;
14
- }
15
- type StageWeights = Record<string, StageWeightConfig>;
16
- interface StageScoreInput {
17
- metrics: LifecycleMetricSnapshot;
18
- signals: LifecycleSignal[];
19
- }
20
- declare class StageScorer {
21
- private readonly weights;
22
- constructor(weights?: StageWeights);
23
- score(input: StageScoreInput): LifecycleScore[];
24
- }
25
- //#endregion
26
- export { StageScoreInput, StageScorer };
27
- //# sourceMappingURL=stage-scorer.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"stage-scorer.d.ts","names":[],"sources":["../../src/scoring/stage-scorer.ts"],"sourcesContent":[],"mappings":";;;KAQK,gBAAA,GAAmB,wBAEN,0BAA0B,wBAAwB,kCAG5D,aATqB,CAAA,MAWnB,uBAPW,CAAA,EAAA,MAAA,CAAA;UAWX,kBAAA,CATQ;EAA0B,MAAA,EAAA,MAAA;EAAwB,SAAA,EAAA,MAAA;EAG5D,SAAA,CAAA,EAAA,KAAA,GAAA,KAAA;;UAYE,iBAAA,CAjBc;EAAO,IAAA,EAAA,MAAA;EAWrB,OAAA,CAAA,EAQE,OARF,CAQU,MARQ,CAQD,gBARC,EAQiB,kBARjB,CAAA,CAAA;EAMlB,WAAA,CAAA,EAGM,OAHW,CAGH,MAHG,CAAA,MAAA,EAAA,MAAA,CAAA,CAAA;;KAMtB,YAAA,GAAe,MAJyB,CAAA,MAAA,EAIV,iBAJU,CAAA;AAAzB,UAQH,eAAA,CARG;EAAR,OAAA,EASD,uBATC;EACY,OAAA,EASb,eATa,EAAA;;AAAD,cAYV,WAAA,CAZU;EAGlB,iBAAY,OAAA;EAIA,WAAA,CAAA,OACN,CADqB,EAQT,YAPZ;EAIE,KAAA,CAAA,KAAA,EAOE,eAPS,CAAA,EAOS,cAPT,EAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"stage-scorer.js","names":["stageWeights","LifecycleStage","supportingSignals: string[]","LIFECYCLE_STAGE_META"],"sources":["../../src/scoring/stage-scorer.ts"],"sourcesContent":["import type {\n LifecycleMetricSnapshot,\n LifecycleScore,\n LifecycleSignal,\n} from '@lssm/lib.lifecycle';\nimport { LIFECYCLE_STAGE_META, LifecycleStage } from '@lssm/lib.lifecycle';\nimport stageWeights from '../data/stage-weights.json' assert { type: 'json' };\n\ntype NumericMetricKey = Extract<\n {\n [Key in keyof LifecycleMetricSnapshot]: LifecycleMetricSnapshot[Key] extends\n | number\n | undefined\n ? Key\n : never;\n }[keyof LifecycleMetricSnapshot],\n string\n>;\n\ninterface MetricWeightConfig {\n weight: number;\n threshold: number;\n direction?: 'gte' | 'lte';\n}\n\ninterface StageWeightConfig {\n base: number;\n metrics?: Partial<Record<NumericMetricKey, MetricWeightConfig>>;\n signalKinds?: Partial<Record<string, number>>;\n}\n\ntype StageWeights = Record<string, StageWeightConfig>;\n\nconst DEFAULT_WEIGHTS = stageWeights as StageWeights;\n\nexport interface StageScoreInput {\n metrics: LifecycleMetricSnapshot;\n signals: LifecycleSignal[];\n}\n\nexport class StageScorer {\n private readonly weights: StageWeights;\n\n constructor(weights: StageWeights = DEFAULT_WEIGHTS) {\n this.weights = weights;\n }\n\n score(input: StageScoreInput): LifecycleScore[] {\n const kindStrength = evaluateSignalKinds(input.signals);\n\n const scores = Object.values(LifecycleStage)\n .filter(isStageValue)\n .map((stage) => {\n const stageName = LifecycleStage[stage];\n const config = this.weights[stageName] ?? { base: 0.5 };\n let score = config.base ?? 0.5;\n let contributions = 0;\n const totalPossible =\n Object.keys(config.metrics ?? {}).length +\n Object.keys(config.signalKinds ?? {}).length || 1;\n const supportingSignals: string[] = [];\n\n if (config.metrics) {\n Object.entries(config.metrics).forEach(\n ([metricKey, metricConfig]) => {\n const value = input.metrics[metricKey as NumericMetricKey];\n if (value === undefined || value === null) return;\n if (passesThreshold(value, metricConfig)) {\n score += metricConfig.weight;\n contributions += 1;\n supportingSignals.push(`metric:${metricKey}`);\n } else {\n score += metricConfig.weight * 0.25;\n }\n }\n );\n }\n\n if (config.signalKinds) {\n Object.entries(config.signalKinds).forEach(([kind, weight]) => {\n const strength = kindStrength[kind] ?? 0;\n if (strength > 0 && typeof weight === 'number') {\n score += weight;\n contributions += 1;\n supportingSignals.push(`signal:${kind}`);\n }\n });\n }\n\n score = clamp(score, 0, 1.25); // allow slight overage before clamp\n const confidence = clamp(contributions / totalPossible, 0.1, 1);\n\n return {\n stage,\n score,\n confidence,\n supportingSignals,\n };\n });\n\n return scores.sort((a, b) => {\n if (b.score === a.score) {\n return b.confidence - a.confidence;\n }\n return b.score - a.score;\n });\n }\n}\n\nconst passesThreshold = (\n value: number,\n config: MetricWeightConfig\n): boolean => {\n const direction = config.direction ?? 'gte';\n if (direction === 'gte') {\n return value >= config.threshold;\n }\n return value <= config.threshold;\n};\n\nconst clamp = (value: number, min: number, max: number): number =>\n Math.min(Math.max(value, min), max);\n\nconst evaluateSignalKinds = (\n signals: LifecycleSignal[]\n): Record<string, number> =>\n signals.reduce<Record<string, number>>((acc, signal) => {\n const key = signal.kind ?? 'unknown';\n acc[key] = (acc[key] ?? 0) + (signal.weight ?? 1);\n return acc;\n }, {});\n\nconst isStageValue = (\n value: string | LifecycleStage\n): value is LifecycleStage =>\n typeof value === 'number' && value in LIFECYCLE_STAGE_META;\n"],"mappings":"6IAiCA,MAAM,EAAkBA,EAOxB,IAAa,EAAb,KAAyB,CACvB,QAEA,YAAY,EAAwB,EAAiB,CACnD,KAAK,QAAU,EAGjB,MAAM,EAA0C,CAC9C,IAAM,EAAe,EAAoB,EAAM,QAAQ,CAoDvD,OAlDe,OAAO,OAAOC,EAAe,CACzC,OAAO,EAAa,CACpB,IAAK,GAAU,CACd,IAAM,EAAYA,EAAe,GAC3B,EAAS,KAAK,QAAQ,IAAc,CAAE,KAAM,GAAK,CACnD,EAAQ,EAAO,MAAQ,GACvB,EAAgB,EACd,EACJ,OAAO,KAAK,EAAO,SAAW,EAAE,CAAC,CAAC,OAChC,OAAO,KAAK,EAAO,aAAe,EAAE,CAAC,CAAC,QAAU,EAC9CC,EAA8B,EAAE,CAElC,EAAO,SACT,OAAO,QAAQ,EAAO,QAAQ,CAAC,SAC5B,CAAC,EAAW,KAAkB,CAC7B,IAAM,EAAQ,EAAM,QAAQ,GACxB,GAAiC,OACjC,EAAgB,EAAO,EAAa,EACtC,GAAS,EAAa,OACtB,GAAiB,EACjB,EAAkB,KAAK,UAAU,IAAY,EAE7C,GAAS,EAAa,OAAS,MAGpC,CAGC,EAAO,aACT,OAAO,QAAQ,EAAO,YAAY,CAAC,SAAS,CAAC,EAAM,KAAY,EAC5C,EAAa,IAAS,GACxB,GAAK,OAAO,GAAW,WACpC,GAAS,EACT,GAAiB,EACjB,EAAkB,KAAK,UAAU,IAAO,GAE1C,CAGJ,EAAQ,EAAM,EAAO,EAAG,KAAK,CAC7B,IAAM,EAAa,EAAM,EAAgB,EAAe,GAAK,EAAE,CAE/D,MAAO,CACL,QACA,QACA,aACA,oBACD,EACD,CAEU,MAAM,EAAG,IACjB,EAAE,QAAU,EAAE,MACT,EAAE,WAAa,EAAE,WAEnB,EAAE,MAAQ,EAAE,MACnB,GAIN,MAAM,GACJ,EACA,KAEkB,EAAO,WAAa,SACpB,MACT,GAAS,EAAO,UAElB,GAAS,EAAO,UAGnB,GAAS,EAAe,EAAa,IACzC,KAAK,IAAI,KAAK,IAAI,EAAO,EAAI,CAAE,EAAI,CAE/B,EACJ,GAEA,EAAQ,QAAgC,EAAK,IAAW,CACtD,IAAM,EAAM,EAAO,MAAQ,UAE3B,MADA,GAAI,IAAQ,EAAI,IAAQ,IAAM,EAAO,QAAU,GACxC,GACN,EAAE,CAAC,CAEF,EACJ,GAEA,OAAO,GAAU,UAAY,KAASC"}