@lssm/bundle.lifecycle-managed 0.0.0-canary-20251217063201 → 0.0.0-canary-20251217072406
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agents/lifecycle-advisor-agent.js +68 -2
- package/dist/api/rest-handlers.js +22 -1
- package/dist/events/lifecycle-events.js +45 -1
- package/dist/index.js +6 -1
- package/dist/libs/ai-agent/dist/agent/agent-factory.js +1 -1
- package/dist/libs/ai-agent/dist/agent/contract-spec-agent.js +18 -1
- package/dist/libs/ai-agent/dist/agent/index.js +2 -1
- package/dist/libs/ai-agent/dist/approval/index.js +1 -1
- package/dist/libs/ai-agent/dist/approval/workflow.js +1 -1
- package/dist/libs/ai-agent/dist/index.js +15 -1
- package/dist/libs/ai-agent/dist/schema/index.js +2 -1
- package/dist/libs/ai-agent/dist/schema/json-schema-to-zod.js +1 -1
- package/dist/libs/ai-agent/dist/schema/schema-output.js +3 -1
- package/dist/libs/ai-agent/dist/spec/spec.js +23 -1
- package/dist/libs/ai-agent/dist/tools/index.js +4 -1
- package/dist/libs/ai-agent/dist/tools/knowledge-tool.js +2 -1
- package/dist/libs/ai-agent/dist/tools/mcp-client.js +2 -1
- package/dist/libs/ai-agent/dist/tools/mcp-server.js +3 -1
- package/dist/libs/ai-agent/dist/tools/tool-adapter.js +2 -1
- package/dist/libs/analytics/dist/churn/index.js +1 -1
- package/dist/libs/analytics/dist/churn/predictor.js +1 -1
- package/dist/libs/analytics/dist/cohort/index.js +1 -1
- package/dist/libs/analytics/dist/cohort/tracker.js +1 -1
- package/dist/libs/analytics/dist/index.js +5 -1
- package/dist/libs/analytics/dist/lifecycle/metric-collectors.js +9 -1
- package/dist/libs/lifecycle/dist/index.js +5 -1
- package/dist/libs/lifecycle/dist/types/axes.js +28 -1
- package/dist/libs/lifecycle/dist/types/milestones.js +1 -1
- package/dist/libs/lifecycle/dist/types/signals.js +1 -1
- package/dist/libs/lifecycle/dist/types/stages.js +151 -1
- package/dist/libs/lifecycle/dist/utils/formatters.js +1 -1
- package/dist/libs/observability/dist/index.js +8 -1
- package/dist/libs/observability/dist/intent/aggregator.js +4 -0
- package/dist/libs/observability/dist/intent/detector.js +1 -1
- package/dist/libs/observability/dist/lifecycle/dist/index.js +4 -1
- package/dist/libs/observability/dist/lifecycle/dist/types/milestones.js +1 -1
- package/dist/libs/observability/dist/lifecycle/dist/types/signals.js +1 -1
- package/dist/libs/observability/dist/lifecycle/dist/types/stages.js +143 -1
- package/dist/libs/observability/dist/lifecycle/dist/utils/formatters.js +7 -1
- package/dist/libs/observability/dist/logging/index.js +39 -1
- package/dist/libs/observability/dist/metrics/index.js +25 -1
- package/dist/libs/observability/dist/pipeline/evolution-pipeline.js +3 -1
- package/dist/libs/observability/dist/pipeline/lifecycle-pipeline.js +73 -1
- package/dist/libs/observability/dist/tracing/index.js +1 -1
- package/dist/libs/observability/dist/tracing/middleware.js +2 -1
- package/dist/modules/lifecycle-advisor/dist/ceremony/ceremony-designer.js +17 -1
- package/dist/modules/lifecycle-advisor/dist/data/library-stage-map.js +90 -1
- package/dist/modules/lifecycle-advisor/dist/data/stage-playbooks.js +240 -1
- package/dist/modules/lifecycle-advisor/dist/index.js +3 -1
- package/dist/modules/lifecycle-advisor/dist/libs/lifecycle/dist/index.js +4 -1
- package/dist/modules/lifecycle-advisor/dist/libs/lifecycle/dist/types/milestones.js +1 -1
- package/dist/modules/lifecycle-advisor/dist/libs/lifecycle/dist/types/signals.js +1 -1
- package/dist/modules/lifecycle-advisor/dist/libs/lifecycle/dist/types/stages.js +143 -1
- package/dist/modules/lifecycle-advisor/dist/libs/lifecycle/dist/utils/formatters.js +1 -1
- package/dist/modules/lifecycle-advisor/dist/recommendations/library-recommender.js +19 -1
- package/dist/modules/lifecycle-advisor/dist/recommendations/recommendation-engine.js +46 -1
- package/dist/modules/lifecycle-core/dist/collectors/signal-collector.js +65 -1
- package/dist/modules/lifecycle-core/dist/data/milestones-catalog.js +73 -1
- package/dist/modules/lifecycle-core/dist/data/stage-weights.js +169 -1
- package/dist/modules/lifecycle-core/dist/index.js +4 -1
- package/dist/modules/lifecycle-core/dist/libs/lifecycle/dist/index.js +4 -1
- package/dist/modules/lifecycle-core/dist/libs/lifecycle/dist/types/axes.js +28 -1
- package/dist/modules/lifecycle-core/dist/libs/lifecycle/dist/types/milestones.js +1 -1
- package/dist/modules/lifecycle-core/dist/libs/lifecycle/dist/types/signals.js +1 -1
- package/dist/modules/lifecycle-core/dist/libs/lifecycle/dist/types/stages.js +143 -1
- package/dist/modules/lifecycle-core/dist/libs/lifecycle/dist/utils/formatters.js +1 -1
- package/dist/modules/lifecycle-core/dist/orchestrator/lifecycle-orchestrator.js +53 -1
- package/dist/modules/lifecycle-core/dist/planning/milestone-planner.js +16 -1
- package/dist/modules/lifecycle-core/dist/scoring/stage-scorer.js +64 -1
- package/dist/services/assessment-service.js +72 -1
- package/package.json +9 -9
- package/dist/libs/observability/dist/lifecycle/dist/types/axes.js +0 -1
- package/dist/modules/lifecycle-advisor/dist/libs/lifecycle/dist/types/axes.js +0 -1
|
@@ -1 +1,169 @@
|
|
|
1
|
-
|
|
1
|
+
//#region ../../modules/lifecycle-core/dist/data/stage-weights.js
|
|
2
|
+
var stage_weights_default = {
|
|
3
|
+
Exploration: {
|
|
4
|
+
"base": .35,
|
|
5
|
+
"metrics": {
|
|
6
|
+
"activeUsers": {
|
|
7
|
+
"weight": -.3,
|
|
8
|
+
"direction": "lte",
|
|
9
|
+
"threshold": 5
|
|
10
|
+
},
|
|
11
|
+
"customerCount": {
|
|
12
|
+
"weight": -.2,
|
|
13
|
+
"direction": "lte",
|
|
14
|
+
"threshold": 3
|
|
15
|
+
},
|
|
16
|
+
"teamSize": {
|
|
17
|
+
"weight": -.1,
|
|
18
|
+
"direction": "lte",
|
|
19
|
+
"threshold": 3
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
"signalKinds": {
|
|
23
|
+
"qualitative": .4,
|
|
24
|
+
"metric": .1
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
ProblemSolutionFit: {
|
|
28
|
+
"base": .4,
|
|
29
|
+
"metrics": {
|
|
30
|
+
"activeUsers": {
|
|
31
|
+
"weight": .2,
|
|
32
|
+
"direction": "gte",
|
|
33
|
+
"threshold": 5
|
|
34
|
+
},
|
|
35
|
+
"customerCount": {
|
|
36
|
+
"weight": .2,
|
|
37
|
+
"direction": "gte",
|
|
38
|
+
"threshold": 3
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
"signalKinds": {
|
|
42
|
+
"qualitative": .3,
|
|
43
|
+
"event": .1
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
MvpEarlyTraction: {
|
|
47
|
+
"base": .45,
|
|
48
|
+
"metrics": {
|
|
49
|
+
"activeUsers": {
|
|
50
|
+
"weight": .25,
|
|
51
|
+
"direction": "gte",
|
|
52
|
+
"threshold": 25
|
|
53
|
+
},
|
|
54
|
+
"weeklyActiveUsers": {
|
|
55
|
+
"weight": .25,
|
|
56
|
+
"direction": "gte",
|
|
57
|
+
"threshold": 20
|
|
58
|
+
},
|
|
59
|
+
"retentionRate": {
|
|
60
|
+
"weight": .2,
|
|
61
|
+
"direction": "gte",
|
|
62
|
+
"threshold": .25
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
"signalKinds": {
|
|
66
|
+
"metric": .15,
|
|
67
|
+
"event": .1
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
ProductMarketFit: {
|
|
71
|
+
"base": .5,
|
|
72
|
+
"metrics": {
|
|
73
|
+
"retentionRate": {
|
|
74
|
+
"weight": .35,
|
|
75
|
+
"direction": "gte",
|
|
76
|
+
"threshold": .45
|
|
77
|
+
},
|
|
78
|
+
"monthlyRecurringRevenue": {
|
|
79
|
+
"weight": .25,
|
|
80
|
+
"direction": "gte",
|
|
81
|
+
"threshold": 1e4
|
|
82
|
+
},
|
|
83
|
+
"customerCount": {
|
|
84
|
+
"weight": .2,
|
|
85
|
+
"direction": "gte",
|
|
86
|
+
"threshold": 30
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
"signalKinds": {
|
|
90
|
+
"metric": .15,
|
|
91
|
+
"event": .1
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
GrowthScaleUp: {
|
|
95
|
+
"base": .55,
|
|
96
|
+
"metrics": {
|
|
97
|
+
"retentionRate": {
|
|
98
|
+
"weight": .2,
|
|
99
|
+
"direction": "gte",
|
|
100
|
+
"threshold": .55
|
|
101
|
+
},
|
|
102
|
+
"monthlyRecurringRevenue": {
|
|
103
|
+
"weight": .3,
|
|
104
|
+
"direction": "gte",
|
|
105
|
+
"threshold": 5e4
|
|
106
|
+
},
|
|
107
|
+
"teamSize": {
|
|
108
|
+
"weight": .15,
|
|
109
|
+
"direction": "gte",
|
|
110
|
+
"threshold": 15
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
"signalKinds": {
|
|
114
|
+
"event": .2,
|
|
115
|
+
"metric": .15
|
|
116
|
+
}
|
|
117
|
+
},
|
|
118
|
+
ExpansionPlatform: {
|
|
119
|
+
"base": .6,
|
|
120
|
+
"metrics": {
|
|
121
|
+
"monthlyRecurringRevenue": {
|
|
122
|
+
"weight": .35,
|
|
123
|
+
"direction": "gte",
|
|
124
|
+
"threshold": 15e4
|
|
125
|
+
},
|
|
126
|
+
"customerCount": {
|
|
127
|
+
"weight": .2,
|
|
128
|
+
"direction": "gte",
|
|
129
|
+
"threshold": 100
|
|
130
|
+
},
|
|
131
|
+
"teamSize": {
|
|
132
|
+
"weight": .15,
|
|
133
|
+
"direction": "gte",
|
|
134
|
+
"threshold": 40
|
|
135
|
+
}
|
|
136
|
+
},
|
|
137
|
+
"signalKinds": {
|
|
138
|
+
"event": .2,
|
|
139
|
+
"milestone": .1
|
|
140
|
+
}
|
|
141
|
+
},
|
|
142
|
+
MaturityRenewal: {
|
|
143
|
+
"base": .6,
|
|
144
|
+
"metrics": {
|
|
145
|
+
"monthlyRecurringRevenue": {
|
|
146
|
+
"weight": .25,
|
|
147
|
+
"direction": "gte",
|
|
148
|
+
"threshold": 25e4
|
|
149
|
+
},
|
|
150
|
+
"teamSize": {
|
|
151
|
+
"weight": .15,
|
|
152
|
+
"direction": "gte",
|
|
153
|
+
"threshold": 80
|
|
154
|
+
},
|
|
155
|
+
"burnMultiple": {
|
|
156
|
+
"weight": .2,
|
|
157
|
+
"direction": "lte",
|
|
158
|
+
"threshold": 1.5
|
|
159
|
+
}
|
|
160
|
+
},
|
|
161
|
+
"signalKinds": {
|
|
162
|
+
"event": .2,
|
|
163
|
+
"milestone": .15
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
};
|
|
167
|
+
|
|
168
|
+
//#endregion
|
|
169
|
+
export { stage_weights_default };
|
|
@@ -1 +1,4 @@
|
|
|
1
|
-
import{
|
|
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 { LifecycleOrchestrator } from "./orchestrator/lifecycle-orchestrator.js";
|
|
@@ -1 +1,28 @@
|
|
|
1
|
-
|
|
1
|
+
//#region ../../modules/lifecycle-core/dist/libs/lifecycle/dist/types/axes.js
|
|
2
|
+
let ProductPhase = /* @__PURE__ */ function(ProductPhase$1) {
|
|
3
|
+
ProductPhase$1["Sketch"] = "Sketch";
|
|
4
|
+
ProductPhase$1["Prototype"] = "Prototype";
|
|
5
|
+
ProductPhase$1["Mvp"] = "MVP";
|
|
6
|
+
ProductPhase$1["V1"] = "V1";
|
|
7
|
+
ProductPhase$1["Ecosystem"] = "Ecosystem";
|
|
8
|
+
return ProductPhase$1;
|
|
9
|
+
}({});
|
|
10
|
+
let CompanyPhase = /* @__PURE__ */ function(CompanyPhase$1) {
|
|
11
|
+
CompanyPhase$1["Solo"] = "Solo";
|
|
12
|
+
CompanyPhase$1["TinyTeam"] = "TinyTeam";
|
|
13
|
+
CompanyPhase$1["FunctionalOrg"] = "FunctionalOrg";
|
|
14
|
+
CompanyPhase$1["MultiTeam"] = "MultiTeam";
|
|
15
|
+
CompanyPhase$1["Bureaucratic"] = "Bureaucratic";
|
|
16
|
+
return CompanyPhase$1;
|
|
17
|
+
}({});
|
|
18
|
+
let CapitalPhase = /* @__PURE__ */ function(CapitalPhase$1) {
|
|
19
|
+
CapitalPhase$1["Bootstrapped"] = "Bootstrapped";
|
|
20
|
+
CapitalPhase$1["PreSeed"] = "PreSeed";
|
|
21
|
+
CapitalPhase$1["Seed"] = "Seed";
|
|
22
|
+
CapitalPhase$1["SeriesAorB"] = "SeriesAorB";
|
|
23
|
+
CapitalPhase$1["LateStage"] = "LateStage";
|
|
24
|
+
return CapitalPhase$1;
|
|
25
|
+
}({});
|
|
26
|
+
|
|
27
|
+
//#endregion
|
|
28
|
+
export { CapitalPhase, CompanyPhase, ProductPhase };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./stages.js";
|
|
1
|
+
import "./stages.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./stages.js";
|
|
1
|
+
import "./stages.js";
|
|
@@ -1 +1,143 @@
|
|
|
1
|
-
|
|
1
|
+
//#region ../../modules/lifecycle-core/dist/libs/lifecycle/dist/types/stages.js
|
|
2
|
+
let LifecycleStage = /* @__PURE__ */ function(LifecycleStage$1) {
|
|
3
|
+
LifecycleStage$1[LifecycleStage$1["Exploration"] = 0] = "Exploration";
|
|
4
|
+
LifecycleStage$1[LifecycleStage$1["ProblemSolutionFit"] = 1] = "ProblemSolutionFit";
|
|
5
|
+
LifecycleStage$1[LifecycleStage$1["MvpEarlyTraction"] = 2] = "MvpEarlyTraction";
|
|
6
|
+
LifecycleStage$1[LifecycleStage$1["ProductMarketFit"] = 3] = "ProductMarketFit";
|
|
7
|
+
LifecycleStage$1[LifecycleStage$1["GrowthScaleUp"] = 4] = "GrowthScaleUp";
|
|
8
|
+
LifecycleStage$1[LifecycleStage$1["ExpansionPlatform"] = 5] = "ExpansionPlatform";
|
|
9
|
+
LifecycleStage$1[LifecycleStage$1["MaturityRenewal"] = 6] = "MaturityRenewal";
|
|
10
|
+
return LifecycleStage$1;
|
|
11
|
+
}({});
|
|
12
|
+
LifecycleStage.Exploration, LifecycleStage.ProblemSolutionFit, LifecycleStage.MvpEarlyTraction, LifecycleStage.ProductMarketFit, LifecycleStage.GrowthScaleUp, LifecycleStage.ExpansionPlatform, LifecycleStage.MaturityRenewal;
|
|
13
|
+
const LIFECYCLE_STAGE_META = {
|
|
14
|
+
[LifecycleStage.Exploration]: {
|
|
15
|
+
id: LifecycleStage.Exploration,
|
|
16
|
+
order: 0,
|
|
17
|
+
slug: "exploration",
|
|
18
|
+
name: "Exploration / Ideation",
|
|
19
|
+
question: "Is there a problem worth my time?",
|
|
20
|
+
signals: [
|
|
21
|
+
"20+ discovery interviews",
|
|
22
|
+
"Clear problem statement",
|
|
23
|
+
"Named ICP"
|
|
24
|
+
],
|
|
25
|
+
traps: ["Branding before discovery", "Premature tooling decisions"],
|
|
26
|
+
focusAreas: [
|
|
27
|
+
"Customer discovery",
|
|
28
|
+
"Problem definition",
|
|
29
|
+
"Segment clarity"
|
|
30
|
+
]
|
|
31
|
+
},
|
|
32
|
+
[LifecycleStage.ProblemSolutionFit]: {
|
|
33
|
+
id: LifecycleStage.ProblemSolutionFit,
|
|
34
|
+
order: 1,
|
|
35
|
+
slug: "problem-solution-fit",
|
|
36
|
+
name: "Problem–Solution Fit",
|
|
37
|
+
question: "Do people care enough about this solution?",
|
|
38
|
+
signals: [
|
|
39
|
+
"Prototype reuse",
|
|
40
|
+
"Referral energy",
|
|
41
|
+
"Pre-pay interest"
|
|
42
|
+
],
|
|
43
|
+
traps: ["“Market is huge” without users", "Skipping qualitative loops"],
|
|
44
|
+
focusAreas: [
|
|
45
|
+
"Solution hypothesis",
|
|
46
|
+
"Value messaging",
|
|
47
|
+
"Feedback capture"
|
|
48
|
+
]
|
|
49
|
+
},
|
|
50
|
+
[LifecycleStage.MvpEarlyTraction]: {
|
|
51
|
+
id: LifecycleStage.MvpEarlyTraction,
|
|
52
|
+
order: 2,
|
|
53
|
+
slug: "mvp-early-traction",
|
|
54
|
+
name: "MVP & Early Traction",
|
|
55
|
+
question: "Can we get real usage and learn fast?",
|
|
56
|
+
signals: [
|
|
57
|
+
"20–50 named active users",
|
|
58
|
+
"Weekly releases",
|
|
59
|
+
"Noisy feedback"
|
|
60
|
+
],
|
|
61
|
+
traps: ["Overbuilt infra for 10 users", "Undefined retention metric"],
|
|
62
|
+
focusAreas: [
|
|
63
|
+
"Activation",
|
|
64
|
+
"Cohort tracking",
|
|
65
|
+
"Feedback rituals"
|
|
66
|
+
]
|
|
67
|
+
},
|
|
68
|
+
[LifecycleStage.ProductMarketFit]: {
|
|
69
|
+
id: LifecycleStage.ProductMarketFit,
|
|
70
|
+
order: 3,
|
|
71
|
+
slug: "product-market-fit",
|
|
72
|
+
name: "Product–Market Fit",
|
|
73
|
+
question: "Is this pulling us forward?",
|
|
74
|
+
signals: [
|
|
75
|
+
"Retention without heroics",
|
|
76
|
+
"Organic word-of-mouth",
|
|
77
|
+
"Value stories"
|
|
78
|
+
],
|
|
79
|
+
traps: ["Hero growth that does not scale", "Ignoring churn signals"],
|
|
80
|
+
focusAreas: [
|
|
81
|
+
"Retention",
|
|
82
|
+
"Reliability",
|
|
83
|
+
"ICP clarity"
|
|
84
|
+
]
|
|
85
|
+
},
|
|
86
|
+
[LifecycleStage.GrowthScaleUp]: {
|
|
87
|
+
id: LifecycleStage.GrowthScaleUp,
|
|
88
|
+
order: 4,
|
|
89
|
+
slug: "growth-scale-up",
|
|
90
|
+
name: "Growth / Scale-up",
|
|
91
|
+
question: "Can we grow this repeatably?",
|
|
92
|
+
signals: [
|
|
93
|
+
"Predictable channels",
|
|
94
|
+
"Specialized hires",
|
|
95
|
+
"Unit economics on track"
|
|
96
|
+
],
|
|
97
|
+
traps: ["Paid spend masking retention gaps", "Infra debt blocking launches"],
|
|
98
|
+
focusAreas: [
|
|
99
|
+
"Ops systems",
|
|
100
|
+
"Growth loops",
|
|
101
|
+
"Reliability engineering"
|
|
102
|
+
]
|
|
103
|
+
},
|
|
104
|
+
[LifecycleStage.ExpansionPlatform]: {
|
|
105
|
+
id: LifecycleStage.ExpansionPlatform,
|
|
106
|
+
order: 5,
|
|
107
|
+
slug: "expansion-platform",
|
|
108
|
+
name: "Expansion / Platform",
|
|
109
|
+
question: "What is the next growth curve?",
|
|
110
|
+
signals: [
|
|
111
|
+
"Stable core metrics",
|
|
112
|
+
"Partner/API demand",
|
|
113
|
+
"Ecosystem pull"
|
|
114
|
+
],
|
|
115
|
+
traps: ["Platform theater before wedge is solid"],
|
|
116
|
+
focusAreas: [
|
|
117
|
+
"Partnerships",
|
|
118
|
+
"APIs",
|
|
119
|
+
"New market validation"
|
|
120
|
+
]
|
|
121
|
+
},
|
|
122
|
+
[LifecycleStage.MaturityRenewal]: {
|
|
123
|
+
id: LifecycleStage.MaturityRenewal,
|
|
124
|
+
order: 6,
|
|
125
|
+
slug: "maturity-renewal",
|
|
126
|
+
name: "Maturity / Renewal",
|
|
127
|
+
question: "Optimize, reinvent, or sunset?",
|
|
128
|
+
signals: [
|
|
129
|
+
"Margin focus",
|
|
130
|
+
"Portfolio bets",
|
|
131
|
+
"Narrative refresh"
|
|
132
|
+
],
|
|
133
|
+
traps: ["Assuming past success is enough"],
|
|
134
|
+
focusAreas: [
|
|
135
|
+
"Cost optimization",
|
|
136
|
+
"Reinvention bets",
|
|
137
|
+
"Sunset planning"
|
|
138
|
+
]
|
|
139
|
+
}
|
|
140
|
+
};
|
|
141
|
+
|
|
142
|
+
//#endregion
|
|
143
|
+
export { LIFECYCLE_STAGE_META, LifecycleStage };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../types/stages.js";
|
|
1
|
+
import "../types/stages.js";
|
|
@@ -1 +1,53 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import { LIFECYCLE_STAGE_META, LifecycleStage } from "../libs/lifecycle/dist/types/stages.js";
|
|
2
|
+
import "../libs/lifecycle/dist/index.js";
|
|
3
|
+
import "../collectors/signal-collector.js";
|
|
4
|
+
import "../scoring/stage-scorer.js";
|
|
5
|
+
|
|
6
|
+
//#region ../../modules/lifecycle-core/dist/orchestrator/lifecycle-orchestrator.js
|
|
7
|
+
var LifecycleOrchestrator = class {
|
|
8
|
+
collector;
|
|
9
|
+
scorer;
|
|
10
|
+
planner;
|
|
11
|
+
constructor(options) {
|
|
12
|
+
this.collector = options.collector;
|
|
13
|
+
this.scorer = options.scorer;
|
|
14
|
+
this.planner = options.milestonePlanner;
|
|
15
|
+
}
|
|
16
|
+
async run(input) {
|
|
17
|
+
const collected = await this.collector.collect(input);
|
|
18
|
+
const scorecard = this.scorer.score({
|
|
19
|
+
metrics: collected.metrics,
|
|
20
|
+
signals: collected.signals
|
|
21
|
+
});
|
|
22
|
+
const top = scorecard[0] ?? fallbackScore();
|
|
23
|
+
const meta = LIFECYCLE_STAGE_META[top.stage];
|
|
24
|
+
return {
|
|
25
|
+
stage: top.stage,
|
|
26
|
+
confidence: top.confidence,
|
|
27
|
+
axes: collected.axes,
|
|
28
|
+
signals: collected.signals,
|
|
29
|
+
metrics: toMetricRecord(collected.metrics),
|
|
30
|
+
gaps: meta.focusAreas.slice(0, 3),
|
|
31
|
+
focusAreas: meta.focusAreas,
|
|
32
|
+
scorecard,
|
|
33
|
+
generatedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
getUpcomingMilestones(stage, completedMilestoneIds = [], limit = 5) {
|
|
37
|
+
if (!this.planner) return [];
|
|
38
|
+
return this.planner.getUpcoming(stage, completedMilestoneIds, limit);
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
const fallbackScore = () => ({
|
|
42
|
+
stage: LifecycleStage.Exploration,
|
|
43
|
+
score: .3,
|
|
44
|
+
confidence: .3,
|
|
45
|
+
supportingSignals: []
|
|
46
|
+
});
|
|
47
|
+
const toMetricRecord = (snapshot) => Object.entries(snapshot ?? {}).reduce((acc, [key, value]) => {
|
|
48
|
+
if (typeof value === "number") acc[key] = value;
|
|
49
|
+
return acc;
|
|
50
|
+
}, {});
|
|
51
|
+
|
|
52
|
+
//#endregion
|
|
53
|
+
export { LifecycleOrchestrator };
|
|
@@ -1 +1,16 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import { milestones_catalog_default } from "../data/milestones-catalog.js";
|
|
2
|
+
|
|
3
|
+
//#region ../../modules/lifecycle-core/dist/planning/milestone-planner.js
|
|
4
|
+
var LifecycleMilestonePlanner = class {
|
|
5
|
+
milestones;
|
|
6
|
+
constructor(customCatalog) {
|
|
7
|
+
this.milestones = customCatalog ?? milestones_catalog_default;
|
|
8
|
+
}
|
|
9
|
+
getUpcoming(stage, completedIds = [], limit = 5) {
|
|
10
|
+
const completedSet = new Set(completedIds);
|
|
11
|
+
return this.milestones.filter((milestone) => milestone.stage === stage && !completedSet.has(milestone.id)).sort((a, b) => a.priority - b.priority).slice(0, limit);
|
|
12
|
+
}
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
//#endregion
|
|
16
|
+
export { LifecycleMilestonePlanner };
|
|
@@ -1 +1,64 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import { LIFECYCLE_STAGE_META, LifecycleStage } from "../libs/lifecycle/dist/types/stages.js";
|
|
2
|
+
import "../libs/lifecycle/dist/index.js";
|
|
3
|
+
import { stage_weights_default } from "../data/stage-weights.js";
|
|
4
|
+
|
|
5
|
+
//#region ../../modules/lifecycle-core/dist/scoring/stage-scorer.js
|
|
6
|
+
const DEFAULT_WEIGHTS = stage_weights_default;
|
|
7
|
+
var StageScorer = class {
|
|
8
|
+
weights;
|
|
9
|
+
constructor(weights = DEFAULT_WEIGHTS) {
|
|
10
|
+
this.weights = weights;
|
|
11
|
+
}
|
|
12
|
+
score(input) {
|
|
13
|
+
const kindStrength = evaluateSignalKinds(input.signals);
|
|
14
|
+
return Object.values(LifecycleStage).filter(isStageValue).map((stage) => {
|
|
15
|
+
const stageName = LifecycleStage[stage];
|
|
16
|
+
const config = this.weights[stageName] ?? { base: .5 };
|
|
17
|
+
let score = config.base ?? .5;
|
|
18
|
+
let contributions = 0;
|
|
19
|
+
const totalPossible = Object.keys(config.metrics ?? {}).length + Object.keys(config.signalKinds ?? {}).length || 1;
|
|
20
|
+
const supportingSignals = [];
|
|
21
|
+
if (config.metrics) Object.entries(config.metrics).forEach(([metricKey, metricConfig]) => {
|
|
22
|
+
const value = input.metrics[metricKey];
|
|
23
|
+
if (value === void 0 || value === null) return;
|
|
24
|
+
if (passesThreshold(value, metricConfig)) {
|
|
25
|
+
score += metricConfig.weight;
|
|
26
|
+
contributions += 1;
|
|
27
|
+
supportingSignals.push(`metric:${metricKey}`);
|
|
28
|
+
} else score += metricConfig.weight * .25;
|
|
29
|
+
});
|
|
30
|
+
if (config.signalKinds) Object.entries(config.signalKinds).forEach(([kind, weight]) => {
|
|
31
|
+
if ((kindStrength[kind] ?? 0) > 0 && typeof weight === "number") {
|
|
32
|
+
score += weight;
|
|
33
|
+
contributions += 1;
|
|
34
|
+
supportingSignals.push(`signal:${kind}`);
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
score = clamp(score, 0, 1.25);
|
|
38
|
+
const confidence = clamp(contributions / totalPossible, .1, 1);
|
|
39
|
+
return {
|
|
40
|
+
stage,
|
|
41
|
+
score,
|
|
42
|
+
confidence,
|
|
43
|
+
supportingSignals
|
|
44
|
+
};
|
|
45
|
+
}).sort((a, b) => {
|
|
46
|
+
if (b.score === a.score) return b.confidence - a.confidence;
|
|
47
|
+
return b.score - a.score;
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
const passesThreshold = (value, config) => {
|
|
52
|
+
if ((config.direction ?? "gte") === "gte") return value >= config.threshold;
|
|
53
|
+
return value <= config.threshold;
|
|
54
|
+
};
|
|
55
|
+
const clamp = (value, min, max) => Math.min(Math.max(value, min), max);
|
|
56
|
+
const evaluateSignalKinds = (signals) => signals.reduce((acc, signal) => {
|
|
57
|
+
const key = signal.kind ?? "unknown";
|
|
58
|
+
acc[key] = (acc[key] ?? 0) + (signal.weight ?? 1);
|
|
59
|
+
return acc;
|
|
60
|
+
}, {});
|
|
61
|
+
const isStageValue = (value) => typeof value === "number" && value in LIFECYCLE_STAGE_META;
|
|
62
|
+
|
|
63
|
+
//#endregion
|
|
64
|
+
export { StageScorer };
|
|
@@ -1 +1,72 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import { CapitalPhase, CompanyPhase, ProductPhase } from "../libs/lifecycle/dist/types/axes.js";
|
|
2
|
+
import "../libs/lifecycle/dist/index.js";
|
|
3
|
+
import { StageSignalCollector } from "../modules/lifecycle-core/dist/collectors/signal-collector.js";
|
|
4
|
+
import { StageScorer } from "../modules/lifecycle-core/dist/scoring/stage-scorer.js";
|
|
5
|
+
import { LifecycleMilestonePlanner } from "../modules/lifecycle-core/dist/planning/milestone-planner.js";
|
|
6
|
+
import { LifecycleOrchestrator } from "../modules/lifecycle-core/dist/orchestrator/lifecycle-orchestrator.js";
|
|
7
|
+
import "../modules/lifecycle-core/dist/index.js";
|
|
8
|
+
import { LifecycleRecommendationEngine } from "../modules/lifecycle-advisor/dist/recommendations/recommendation-engine.js";
|
|
9
|
+
import { ContractSpecLibraryRecommender } from "../modules/lifecycle-advisor/dist/recommendations/library-recommender.js";
|
|
10
|
+
import { LifecycleCeremonyDesigner } from "../modules/lifecycle-advisor/dist/ceremony/ceremony-designer.js";
|
|
11
|
+
import "../modules/lifecycle-advisor/dist/index.js";
|
|
12
|
+
import { LifecycleKpiPipeline } from "../libs/observability/dist/pipeline/lifecycle-pipeline.js";
|
|
13
|
+
import "../libs/observability/dist/index.js";
|
|
14
|
+
import "../events/lifecycle-events.js";
|
|
15
|
+
|
|
16
|
+
//#region src/services/assessment-service.ts
|
|
17
|
+
var LifecycleAssessmentService = class {
|
|
18
|
+
orchestrator;
|
|
19
|
+
recommendationEngine;
|
|
20
|
+
libraryRecommender;
|
|
21
|
+
ceremonyDesigner;
|
|
22
|
+
pipeline;
|
|
23
|
+
eventBridge;
|
|
24
|
+
constructor(options) {
|
|
25
|
+
this.orchestrator = new LifecycleOrchestrator({
|
|
26
|
+
collector: new StageSignalCollector(options.collector),
|
|
27
|
+
scorer: new StageScorer(),
|
|
28
|
+
milestonePlanner: new LifecycleMilestonePlanner()
|
|
29
|
+
});
|
|
30
|
+
this.recommendationEngine = options.recommendationEngine ?? new LifecycleRecommendationEngine();
|
|
31
|
+
this.libraryRecommender = options.libraryRecommender ?? new ContractSpecLibraryRecommender();
|
|
32
|
+
this.ceremonyDesigner = options.ceremonyDesigner ?? new LifecycleCeremonyDesigner();
|
|
33
|
+
this.pipeline = options.pipeline ?? new LifecycleKpiPipeline();
|
|
34
|
+
this.eventBridge = options.eventBridge;
|
|
35
|
+
if (options.onPipelineEvent) this.pipeline.on(options.onPipelineEvent);
|
|
36
|
+
if (this.eventBridge) this.pipeline.on((event) => this.eventBridge?.forward(event));
|
|
37
|
+
}
|
|
38
|
+
async runAssessment(request) {
|
|
39
|
+
const assessment = await this.orchestrator.run(request);
|
|
40
|
+
const upcoming = this.orchestrator.getUpcomingMilestones(assessment.stage, request.completedMilestones);
|
|
41
|
+
this.pipeline.recordAssessment(assessment, request.tenantId);
|
|
42
|
+
return {
|
|
43
|
+
assessment,
|
|
44
|
+
recommendation: this.recommendationEngine.generate(assessment, { upcomingMilestones: upcoming }),
|
|
45
|
+
libraries: this.libraryRecommender.recommend(assessment.stage),
|
|
46
|
+
ceremony: this.ceremonyDesigner.design(assessment.stage)
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
getStagePlaybook(stage) {
|
|
50
|
+
return {
|
|
51
|
+
recommendation: this.recommendationEngine.generate({
|
|
52
|
+
stage,
|
|
53
|
+
confidence: 1,
|
|
54
|
+
axes: {
|
|
55
|
+
product: ProductPhase.Mvp,
|
|
56
|
+
company: CompanyPhase.TinyTeam,
|
|
57
|
+
capital: CapitalPhase.Seed
|
|
58
|
+
},
|
|
59
|
+
signals: [],
|
|
60
|
+
gaps: [],
|
|
61
|
+
focusAreas: [],
|
|
62
|
+
scorecard: [],
|
|
63
|
+
generatedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
64
|
+
}, { upcomingMilestones: this.orchestrator.getUpcomingMilestones(stage) }),
|
|
65
|
+
libraries: this.libraryRecommender.recommend(stage),
|
|
66
|
+
ceremony: this.ceremonyDesigner.design(stage)
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
//#endregion
|
|
72
|
+
export { LifecycleAssessmentService };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lssm/bundle.lifecycle-managed",
|
|
3
|
-
"version": "0.0.0-canary-
|
|
3
|
+
"version": "0.0.0-canary-20251217072406",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.js",
|
|
@@ -23,16 +23,16 @@
|
|
|
23
23
|
"test": "bun run"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@lssm/lib.ai-agent": "0.0.0-canary-
|
|
27
|
-
"@lssm/lib.analytics": "0.0.0-canary-
|
|
28
|
-
"@lssm/lib.lifecycle": "0.0.0-canary-
|
|
29
|
-
"@lssm/lib.observability": "0.0.0-canary-
|
|
30
|
-
"@lssm/module.lifecycle-advisor": "0.0.0-canary-
|
|
31
|
-
"@lssm/module.lifecycle-core": "0.0.0-canary-
|
|
26
|
+
"@lssm/lib.ai-agent": "0.0.0-canary-20251217072406",
|
|
27
|
+
"@lssm/lib.analytics": "0.0.0-canary-20251217072406",
|
|
28
|
+
"@lssm/lib.lifecycle": "0.0.0-canary-20251217072406",
|
|
29
|
+
"@lssm/lib.observability": "0.0.0-canary-20251217072406",
|
|
30
|
+
"@lssm/module.lifecycle-advisor": "0.0.0-canary-20251217072406",
|
|
31
|
+
"@lssm/module.lifecycle-core": "0.0.0-canary-20251217072406"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
|
-
"@lssm/tool.tsdown": "0.0.0-canary-
|
|
35
|
-
"@lssm/tool.typescript": "0.0.0-canary-
|
|
34
|
+
"@lssm/tool.tsdown": "0.0.0-canary-20251217072406",
|
|
35
|
+
"@lssm/tool.typescript": "0.0.0-canary-20251217072406",
|
|
36
36
|
"tsdown": "^0.17.4",
|
|
37
37
|
"typescript": "^5.9.3"
|
|
38
38
|
},
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(function(e){return e.Sketch=`Sketch`,e.Prototype=`Prototype`,e.Mvp=`MVP`,e.V1=`V1`,e.Ecosystem=`Ecosystem`,e})({}),function(e){return e.Solo=`Solo`,e.TinyTeam=`TinyTeam`,e.FunctionalOrg=`FunctionalOrg`,e.MultiTeam=`MultiTeam`,e.Bureaucratic=`Bureaucratic`,e}({}),function(e){return e.Bootstrapped=`Bootstrapped`,e.PreSeed=`PreSeed`,e.Seed=`Seed`,e.SeriesAorB=`SeriesAorB`,e.LateStage=`LateStage`,e}({});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(function(e){return e.Sketch=`Sketch`,e.Prototype=`Prototype`,e.Mvp=`MVP`,e.V1=`V1`,e.Ecosystem=`Ecosystem`,e})({}),function(e){return e.Solo=`Solo`,e.TinyTeam=`TinyTeam`,e.FunctionalOrg=`FunctionalOrg`,e.MultiTeam=`MultiTeam`,e.Bureaucratic=`Bureaucratic`,e}({}),function(e){return e.Bootstrapped=`Bootstrapped`,e.PreSeed=`PreSeed`,e.Seed=`Seed`,e.SeriesAorB=`SeriesAorB`,e.LateStage=`LateStage`,e}({});
|