1
00:00:00,000 --> 00:00:06,926
As developers, when adding new features, we often touch multiple code bases, front-end,
backend, data infrastructure.

2
00:00:07,107 --> 00:00:10,330
AI can only assist you in limited scopes, right?

3
00:00:10,330 --> 00:00:16,575
But today we'll have a look at Cursor Workspaces, a feature that allows AI to assist you
across these code bases.

4
00:00:16,575 --> 00:00:17,436
Let's have a look.

5
00:00:26,438 --> 00:00:27,639
Hi everyone.

6
00:00:27,880 --> 00:00:30,784
Welcome to technology explorations at Dataminded.

7
00:00:30,784 --> 00:00:35,049
In this series, we give you an initial look in new or interesting technologies.

8
00:00:35,049 --> 00:00:40,456
My name is Jonny, I'm knowledge teacher at Dataminded, and today we'll have look at Cursor
Workspaces.

9
00:00:40,456 --> 00:00:42,338
For that, I've invited Emil.

10
00:00:42,338 --> 00:00:43,339
Hi Emil.

11
00:00:43,744 --> 00:00:45,120
Hi, how are you doing?

12
00:00:45,379 --> 00:00:46,826
All good here, how are you?

13
00:00:47,254 --> 00:00:48,264
Same here.

14
00:00:48,899 --> 00:00:49,691
Okay, perfect.

15
00:00:49,691 --> 00:00:52,827
Today we'll be discussing Cursor Workspaces.

16
00:00:52,849 --> 00:00:56,075
Maybe a quick introduction on what we're going to cover.

17
00:00:56,820 --> 00:01:03,050
Yes, so we're going to cover multi-root workspaces that let you pin various repositories
within one workspace.

18
00:01:03,050 --> 00:01:10,137
it all enters one AI context window, and you can ask questions that will encompass all of
these workspaces.

19
00:01:10,703 --> 00:01:16,269
So you can ask questions across your projects and also let the agent act in these
projects.

20
00:01:17,251 --> 00:01:18,411
Okay, cool.

21
00:01:19,613 --> 00:01:21,495
Okay, I'm ready for the demo.

22
00:01:21,921 --> 00:01:24,169
Yeah, let's jump right in.

23
00:01:24,169 --> 00:01:27,653
So how do you set up a Cursor Workspace?

24
00:01:27,653 --> 00:01:29,204
So it's very simple.

25
00:01:29,465 --> 00:01:32,128
Let's say you start with a blank Cursor page.

26
00:01:32,128 --> 00:01:34,390
You start by opening a folder.

27
00:01:34,390 --> 00:01:39,215
So I prepared two repositories that I will demo on.

28
00:01:39,215 --> 00:01:40,899
First one is demo-infra.

29
00:01:40,899 --> 00:01:43,178
You open the folder.

30
00:01:43,422 --> 00:01:45,064
this is what most of us work with.

31
00:01:45,064 --> 00:01:49,169
It's just a repository and Cursor and it's a Cursor project.

32
00:01:49,169 --> 00:01:59,326
But you can turn it into a repository if you hit file and add folder to workspace.

33
00:01:59,427 --> 00:02:03,070
When you do that and you select a second folder.

34
00:02:06,769 --> 00:02:15,650
Now this will become a workspace and you will notice this by looking here at the title.

35
00:02:15,650 --> 00:02:22,897
have both folders mounted in this Cursor window and the Cursor window is resembling your
workspace.

36
00:02:23,020 --> 00:02:23,491
Exactly.

37
00:02:23,491 --> 00:02:29,790
So here you see it's an untitled workspace and now we can go ahead and save it.

38
00:02:30,952 --> 00:02:33,395
You hit save workspace as.

39
00:02:35,414 --> 00:02:48,199
And it's going to create this workspace file, I, by the way, recommend you to save in the
Cursor folder right here.

40
00:02:48,781 --> 00:02:51,823
And that's it.

41
00:02:53,366 --> 00:02:55,368
Now you just created a workspace.

42
00:02:55,696 --> 00:02:57,903
Why did you save it in the Cursor folder?

43
00:02:57,903 --> 00:03:00,238
Does it automatically recognize these?

44
00:03:00,661 --> 00:03:05,610
I just like to have them all in one place, independent of where the repositories live.

45
00:03:05,610 --> 00:03:06,131
Okay, nice.

46
00:03:06,131 --> 00:03:16,068
And so now you have an infrastructure repository and your app repository, in this case,
your app will probably depend on infrastructure provisioned in the other repository.

47
00:03:16,278 --> 00:03:20,211
Exactly, and this is precisely the use case I would like to show.

48
00:03:20,211 --> 00:03:21,386
um

49
00:03:21,386 --> 00:03:34,319
So the specific use case we have an application a Kubernetes deployment in this case,
which is using the infrastructure we provisioned in the infrastructure repository, which

50
00:03:34,319 --> 00:03:36,991
runs on the EKS cluster.

51
00:03:37,312 --> 00:03:40,134
And this application has been running out of memory.

52
00:03:40,134 --> 00:03:44,518
So I would like to double requests and limits for the memory.

53
00:03:44,684 --> 00:03:51,899
but need to be aware if I'm going to create a node request that will not be able to be
satisfied.

54
00:03:52,039 --> 00:04:05,450
So in this specific situation, I'm going to give a prompt where I'm going to ask to double
the requests and limits, but making sure that such a node will be available.

55
00:04:06,174 --> 00:04:09,096
Okay, so if I understand correctly, you have your application running.

56
00:04:09,096 --> 00:04:18,925
There is some kind of out of memory issue popping up and your infrastructure needs to
provision more container resources to run your application.

57
00:04:19,026 --> 00:04:25,911
And this might be hindered by the infrastructure code, which limits the creation of bigger
nodes.

58
00:04:27,272 --> 00:04:28,553
Okay, got it.

59
00:04:28,591 --> 00:04:42,737
So basically I would like to make two changes across two repositories in one shot from a
one AI prompt, not having to have two windows open and figuring out where else will it

60
00:04:42,737 --> 00:04:44,098
have an implication.

61
00:04:44,430 --> 00:04:45,820
Yeah.

62
00:04:45,820 --> 00:04:48,363
Can you zoom in one or two steps?

63
00:04:50,443 --> 00:04:59,574
So in this case, you asked it to double the requests and the limits in the deployment and
that you get an adequate node so that the actual deployment can happen and that it can be

64
00:04:59,574 --> 00:05:00,605
provisioned.

65
00:05:01,066 --> 00:05:01,989
Correct.

66
00:05:06,378 --> 00:05:18,999
So, and it actually, yeah, it could see that the current node won't be adequate, that it's
not gonna satisfy the doubling of requests and limits as we see here.

67
00:05:20,461 --> 00:05:25,745
And let's see what change it made in oh main.tf.

68
00:05:27,207 --> 00:05:33,231
It actually changed the instance type from small to large, that will exactly...

69
00:05:33,253 --> 00:05:36,916
fit the bill of our double the request in limits.

70
00:05:37,404 --> 00:05:45,169
Okay, because otherwise you would actually have a different request of resources that
could not be provisioned by this infrastructure code.

71
00:05:45,169 --> 00:05:48,591
So it had to change the actual Terraform code.

72
00:05:48,979 --> 00:05:58,118
Correct, otherwise it wouldn't find a suitable node and you would risk an outage or a
production incident.

73
00:05:58,118 --> 00:05:58,630
Correct.

74
00:05:58,630 --> 00:06:02,056
That is a change in two repositories in this case.

75
00:06:02,259 --> 00:06:02,800
Correct.

76
00:06:02,800 --> 00:06:06,324
This is in the demo infra and our deployment was in the demo app

77
00:06:08,499 --> 00:06:15,966
It made this change, which we're going to accept and here as well moving from small to
large.

78
00:06:18,095 --> 00:06:22,659
did you do anything to signal that or does it just out of the box?

79
00:06:22,820 --> 00:06:27,669
No, a, this code is, is indexed and it's available to the context window.

80
00:06:27,669 --> 00:06:33,730
I didn't have to point it into any direction because that's the whole point of this is
that you don't have to be explicit.

81
00:06:33,730 --> 00:06:40,995
You have all these repositories so it can figure out all the touch points and all the
interaction points that maybe you would have missed.

82
00:06:40,995 --> 00:06:44,155
And yeah, so it didn't need any, any help to arrive to the

83
00:06:44,246 --> 00:06:45,292
solution.

84
00:06:46,218 --> 00:06:53,812
I cannot help but wonder, did you cheat a bit by adding to your text like making sure an
adequate node is available?

85
00:06:53,812 --> 00:07:01,846
If I would be a developer in your application code, I would maybe not even think about
saying that in my prompt.

86
00:07:01,941 --> 00:07:07,566
you are really right and now I'm also very curious.

87
00:07:07,928 --> 00:07:09,291
Let's undo this.

88
00:07:09,580 --> 00:07:12,529
Should we give it a go without any help?

89
00:07:12,529 --> 00:07:14,395
So without the last part.

90
00:07:15,452 --> 00:07:21,735
And so the YAML file for the deployment that lives in the first repository, the non-infra
repository, right?

91
00:07:21,735 --> 00:07:26,908
It, deployment lives in the app and EKS in the infra

92
00:07:28,371 --> 00:07:29,976
And it didn't do it.

93
00:07:30,341 --> 00:07:31,978
And it didn't do it.

94
00:07:32,613 --> 00:07:36,370
so you do need a bit of infrastructure context as an app developer.

95
00:07:36,370 --> 00:07:38,413
That's the conclusion, I think.

96
00:07:38,688 --> 00:07:40,901
you're right to challenge this.

97
00:07:40,976 --> 00:07:51,009
Okay, but if you know what you're doing and you're developing a multiple repositories,
this still provides you with an assistant that can touch across your projects, across your

98
00:07:51,009 --> 00:07:52,010
repositories.

99
00:07:52,010 --> 00:07:59,109
And it does avoid that you have to work in a monorepository setting or load the entire
project in Cursor at once.

100
00:07:59,301 --> 00:08:00,803
Yes, although I am disappointed.

101
00:08:00,803 --> 00:08:04,197
was hoping it would, it would figure it out.

102
00:08:04,339 --> 00:08:07,362
But no, so you still need to know what you're doing it seems.

103
00:08:08,293 --> 00:08:10,459
Yeah, this is good, right Emil?

104
00:08:10,459 --> 00:08:14,278
So we still need you to handle both sides.

105
00:08:14,781 --> 00:08:16,461
Yeah, yeah, exactly.

106
00:08:17,051 --> 00:08:20,914
A little bit more about where I think the value of this is.

107
00:08:20,914 --> 00:08:27,563
Even if you don't need to make changes to the code or fix bugs or, develop features.

108
00:08:27,725 --> 00:08:36,672
for me, the value lies from the fact that I can add repositories I don't work in and that
belong to teams far removed from my team.

109
00:08:36,672 --> 00:08:42,195
Maybe networking is provisioned by another team and they create VPCs and subnets you're
using.

110
00:08:42,195 --> 00:08:52,091
Sometimes you want to dig a bit deeper and understand why certain things were done the way
they were done or there are other elements of your product written in other programming

111
00:08:52,091 --> 00:08:54,502
languages that you don't understand.

112
00:08:54,502 --> 00:09:05,260
You can still ask just questions and gain an understanding about how things work on a top
level for projects that you are not actively contributing in.

113
00:09:05,260 --> 00:09:09,483
And I think that's something that I think is quite powerful.

114
00:09:09,483 --> 00:09:19,236
Yeah, so that would mean if you get an infra repository from somebody else and you're
depending on that, but you're not developing on that, that whatever you're developing can

115
00:09:19,236 --> 00:09:21,590
be supported by just linking in that code.

116
00:09:21,590 --> 00:09:22,802
Yes, exactly.

117
00:09:22,802 --> 00:09:33,004
Or maybe you're making some back-end changes and you want to see where would the front-end
impact be ah when you're changing something.

118
00:09:33,025 --> 00:09:37,110
And you can use this feature for exactly that.

119
00:09:38,002 --> 00:09:48,206
If I reflect on that for data products, if we build like chains of data products, we often
start off with a monorepository where you have all the code together, but that's not

120
00:09:48,206 --> 00:09:49,607
always sustainable.

121
00:09:49,847 --> 00:09:59,311
I can imagine that if you make a change in a data product and another one depends on it,
this could actually help you identify these dependencies and then also collaborating with

122
00:09:59,311 --> 00:10:00,411
other teams on that.

123
00:10:00,411 --> 00:10:05,693
Or if you're consuming from somebody that has made a change to make it easier to propagate
that change.

124
00:10:06,398 --> 00:10:07,200
Exactly.

125
00:10:07,200 --> 00:10:11,675
And throw in an MCP server into the mix and you are on top of all...

126
00:10:11,675 --> 00:10:13,980
Yeah, we have another video on that, right?

127
00:10:13,984 --> 00:10:14,927
Yes.

128
00:10:15,439 --> 00:10:28,492
But what I wonder is that suppose you got this extra repository It also brings in like
templates potentially or best practices that the system, the AI agent in this case, you

129
00:10:28,492 --> 00:10:31,555
can actually mirror in your own code base.

130
00:10:31,555 --> 00:10:32,207
So.

131
00:10:32,207 --> 00:10:33,839
I'm thinking you're developing data products.

132
00:10:33,839 --> 00:10:35,432
have a few sample repositories.

133
00:10:35,432 --> 00:10:40,979
You load them in, you're starting on your own and it can mimic the best practices present
in there.

134
00:10:41,080 --> 00:10:43,462
Is that also something that would work you think?

135
00:10:44,721 --> 00:10:53,597
To get inspired by certain way a product is built to replicate onto a different product in
a different maturity stage.

136
00:10:53,597 --> 00:10:53,937
you mean?

137
00:10:53,937 --> 00:10:58,231
m

138
00:10:58,231 --> 00:11:07,466
structure and I build a third one, I imagine it would be good to automatically carry over
the best practices without the need for extra documentation.

139
00:11:07,856 --> 00:11:10,877
I don't see why this wouldn't work.

140
00:11:10,877 --> 00:11:23,178
If it's just another, if you are very explicit in your prompt to say that take this
repository as standard, I don't see what would be standing in way to achieving this.

141
00:11:23,178 --> 00:11:27,781
And could you then also lock down these repositories?

142
00:11:27,781 --> 00:11:30,802
Like you loaded both infra and app in here.

143
00:11:30,802 --> 00:11:35,545
Suppose you don't want to touch the infra because you're not in control of that.

144
00:11:35,745 --> 00:11:37,466
Is that something you can do?

145
00:11:38,163 --> 00:11:44,212
So the way I would address this to limit the context a little bit, I would just add

146
00:11:44,270 --> 00:11:46,240
Add the folder specifically.

147
00:11:48,366 --> 00:11:49,951
and write my prompt here.

148
00:11:50,526 --> 00:11:52,284
And I would expect this.

149
00:11:52,284 --> 00:11:52,702
Yeah.

150
00:11:52,702 --> 00:11:57,582
on that folder, but it will also not use the information from the other one, I suppose.

151
00:11:57,582 --> 00:12:07,479
I think there's no guarantee because as long as this is indexed and it is, it just enters,
it's, know, all of this is indexed.

152
00:12:07,479 --> 00:12:17,461
So I don't think you can explicitly exclude what's already been indexed, but by adding the
folder, you probably narrow the solution space here.

153
00:12:17,616 --> 00:12:22,199
And do you think you can also use this for exploratory reasons?

154
00:12:22,199 --> 00:12:27,553
You mentioned before you sometimes use AI to learn about code bases.

155
00:12:27,553 --> 00:12:38,806
Yeah, I did it a lot in my current project where I work with a frontend team and I learned
quite a lot about their code base using AI prompting that otherwise I wouldn't be able to

156
00:12:38,806 --> 00:12:44,448
do because I have no knowledge of frontend or the languages they use.

157
00:12:45,128 --> 00:12:54,102
it helped me understand what they do, follow in meetings a little bit better just by
asking natural language questions about how

158
00:12:54,102 --> 00:12:58,283
their systems are structured without jumping into implementation.

159
00:12:58,283 --> 00:12:58,564
Yeah.

160
00:12:58,564 --> 00:13:04,430
And do you then ask questions or do you just say, give me a summary what this code
repository is all about?

161
00:13:05,100 --> 00:13:07,334
I do ask questions, for sure.

162
00:13:07,334 --> 00:13:09,976
Okay, so it's targeted questions that you do.

163
00:13:10,363 --> 00:13:15,335
this in a real life setting, you said you had a front end developers.

164
00:13:15,696 --> 00:13:17,257
What is the effect ultimately?

165
00:13:17,257 --> 00:13:23,680
Did you actually manage to speed yourself up or to learn more or to be more effective?

166
00:13:24,434 --> 00:13:38,709
So one situation we had, we had a production incident and I wasn't sure why it's happening
and it took quite a while to figure out and it was happening only in one environment.

167
00:13:39,149 --> 00:13:41,270
And even though the code was seemingly the same.

168
00:13:41,270 --> 00:13:50,512
So I used this to ask questions about the front end repositories and asked it to tell me
what is exactly the difference between all of these environments?

169
00:13:50,512 --> 00:13:52,653
Is there any setting that makes

170
00:13:53,605 --> 00:14:03,066
environment X much more resource heavy than other environments and actually told me that
there is this process that runs only in this environment for this and this reason and then

171
00:14:03,066 --> 00:14:15,307
it helped me narrow in on the actual production ah incident and the cause of it that was
something very useful for me to just figure out what was the root cause.

172
00:14:16,159 --> 00:14:19,773
even with lack of TypeScript knowledge or whatever.

173
00:14:19,773 --> 00:14:20,834
knowledge.

174
00:14:20,834 --> 00:14:26,603
could, and then with this information, I just gave it to front end and then they knew what
to do.

175
00:14:26,603 --> 00:14:32,511
But I helped as an enabler for them and to figure this out.

176
00:14:32,511 --> 00:14:35,874
Cause we thought it comes from the backend, turns out it didn't.

177
00:14:35,875 --> 00:14:36,715
So.

178
00:14:38,383 --> 00:14:39,350
Okay, nice.

179
00:14:40,243 --> 00:14:42,045
how do you see this evolve?

180
00:14:42,045 --> 00:14:46,608
Do you see this getting bigger or more effective?

181
00:14:47,959 --> 00:14:49,359
Uh, for sure.

182
00:14:49,376 --> 00:14:54,078
first of all, I think a lot of people don't know this exists just because it's relatively
recent.

183
00:14:54,119 --> 00:15:02,564
what got me interested in exploring this was a podcast when someone was having an issue
and AI helped him fix the issue.

184
00:15:02,564 --> 00:15:05,202
And he said that, luckily it was all in a monorepo.

185
00:15:05,202 --> 00:15:06,641
So the AI agent could.

186
00:15:06,641 --> 00:15:07,193
Yeah.

187
00:15:07,193 --> 00:15:09,175
do everything at the same time and it got me thinking.

188
00:15:09,175 --> 00:15:17,826
So first step is for people to know and use it and then they will, the use base will drive
the development and the features of this.

189
00:15:17,826 --> 00:15:26,591
For sure, what you mentioned to include or exclude certain repository from any given chat
that could be done more explicitly and with more control.

190
00:15:26,591 --> 00:15:34,397
Indeed, my reflex is also often to keep things in the same repository in the beginning to
avoid confusion.

191
00:15:34,397 --> 00:15:45,596
And the effect is also then if you split across repositories, my thoughts are like, okay,
but then an LLM or an AI agent like this one cannot really help you, but this removes that

192
00:15:45,596 --> 00:15:46,837
barrier, right?

193
00:15:47,008 --> 00:15:53,928
Yes, it's no longer an argument or a reason pro or contra

194
00:15:54,360 --> 00:15:58,263
Cursor also has these Cursor rules that you can embed.

195
00:15:58,523 --> 00:16:00,925
Have you experimented in any way with these?

196
00:16:00,925 --> 00:16:05,188
And if so, how would this behave across these folders?

197
00:16:06,063 --> 00:16:09,923
So it is supported.

198
00:16:10,106 --> 00:16:16,652
you need to drop these rules in this dot Cursor folder that I uh saw previously.

199
00:16:16,772 --> 00:16:22,396
And they should be available to all the projects pinned under the workspace.

200
00:16:23,777 --> 00:16:28,820
And I'm actually opening the page with the release notes for this.

201
00:16:30,094 --> 00:16:31,928
and there we go

202
00:16:31,928 --> 00:16:39,743
Okay, so in the backend and in the front end, you can have your own Cursor rules defined
if I understand it correctly.

203
00:16:40,243 --> 00:16:41,814
Cause it says in all folders added.

204
00:16:41,814 --> 00:16:46,337
So you can probably have a system level rule set I can imagine.

205
00:16:46,337 --> 00:16:54,361
But so in every project, in every folder that we see here, there can be a dot Cursor
folder with rules in there.

206
00:16:55,666 --> 00:17:06,514
Yes, or you can have one global set of rules that will be available to any folder you pin
under the workspace.

207
00:17:08,164 --> 00:17:09,796
Okay, nice.

208
00:17:10,017 --> 00:17:12,831
There's still some side questions that pop up to be invested.

209
00:17:12,831 --> 00:17:20,214
Like what if these rules conflict in multiple projects and things, but this is nice that
this is still supported on the workspace level.

210
00:17:20,214 --> 00:17:20,964
Cool.

211
00:17:21,422 --> 00:17:23,219
Alright, How would you summarize Emil?

212
00:17:23,219 --> 00:17:30,188
Multiroot's workspaces are a relatively new feature that for me have too main use cases.

213
00:17:30,188 --> 00:17:41,501
They'll, helped me develop better code by taking into account interdependencies with other
projects or other repositories that I don't actively work in that are easy to overlook

214
00:17:41,923 --> 00:17:52,639
And also helps me gain a top level understanding of other projects where I'm not a
contributor or maybe they're written using a technology I don't know.

215
00:17:52,639 --> 00:17:59,563
And it doesn't prevent me from following in discussions better and by understanding, yeah,
what's the logic?

216
00:17:59,563 --> 00:18:00,924
What are the touch points?

217
00:18:00,924 --> 00:18:01,544
What's the input?

218
00:18:01,544 --> 00:18:02,785
What's the output?

219
00:18:02,785 --> 00:18:05,206
This you can understand no matter the technology.

220
00:18:05,206 --> 00:18:09,889
So that's for me where the strength lies in these two points.

221
00:18:10,404 --> 00:18:11,724
Okay, indeed.

222
00:18:12,165 --> 00:18:18,757
My personal takeaway is essentially, the Cursor Workspaces removes the barrier between
repositories.

223
00:18:18,757 --> 00:18:27,182
And so my arguments for having a monorepo, I'm a big fan of monorepo, is not that great
anymore, at least in these terms.

224
00:18:27,282 --> 00:18:35,124
So it removes the barriers between the different projects and it allows you to go across
many code bases.

225
00:18:35,615 --> 00:18:35,958
Yeah.

226
00:18:35,958 --> 00:18:36,730
Okay, very nice.

227
00:18:36,730 --> 00:18:39,086
All right, thanks a lot Emil.

228
00:18:39,086 --> 00:18:42,694
Very interesting view on these new tools.

229
00:18:43,297 --> 00:18:44,940
Any concluding words?

230
00:18:45,816 --> 00:18:47,649
Try it out and see how it works for you.

231
00:18:47,649 --> 00:18:53,061
There might be some, value behind these three, four clicks.

232
00:18:53,061 --> 00:18:53,682
Yeah.

233
00:18:53,682 --> 00:19:00,973
Any links we can add to the comments, maybe the documentation page we can add for the
workspaces that people can start exploring.

234
00:19:01,019 --> 00:19:03,789
of the feature which is on the VS Code website.

235
00:19:04,997 --> 00:19:06,959
Alright, good.

236
00:19:07,301 --> 00:19:08,643
Thanks a lot, Emil.

237
00:19:08,643 --> 00:19:10,905
And thanks everybody for watching.

238
00:19:10,905 --> 00:19:12,807
We'll see you again in one of our next videos.

239
00:19:12,807 --> 00:19:19,234
If you want to learn more about what we mentioned like MCP, checkout our other videos and
we'll see you next time.

240
00:19:19,234 --> 00:19:20,215
Bye bye.