<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Sanchit</title>
    <description>The latest articles on DEV Community by Sanchit (@bigendianbits).</description>
    <link>https://dev.to/bigendianbits</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3975380%2Fa1bfeea0-c2ab-4a2b-bbe7-8ca8737b4c84.png</url>
      <title>DEV Community: Sanchit</title>
      <link>https://dev.to/bigendianbits</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/bigendianbits"/>
    <language>en</language>
    <item>
      <title>Agent Harness Devlog #002</title>
      <dc:creator>Sanchit</dc:creator>
      <pubDate>Thu, 11 Jun 2026 14:44:34 +0000</pubDate>
      <link>https://dev.to/bigendianbits/agent-harness-devlog-002-18fl</link>
      <guid>https://dev.to/bigendianbits/agent-harness-devlog-002-18fl</guid>
      <description>&lt;h1&gt;
  
  
  Building the Pluggable Sandbox
&lt;/h1&gt;

&lt;p&gt;I'm building an agent harness, as a learning project and experimenting different ideas and implementations, along the way learning EffectTS, a lot of it is ideating with agents, agents do help a lot understanding libraries and frameworks which typically take more time and are involving.&lt;/p&gt;

&lt;h2&gt;
  
  
  Implementing Soft Sandbox
&lt;/h2&gt;

&lt;p&gt;A soft sandbox solution is to implement some kind of application layered sandboxing, not hard sandbox and isolation solutions like VMs, containers, bubblewrap, etc.&lt;/p&gt;

&lt;p&gt;This allows us to provided on-spot filesystem layer, for quick agentic workflows, without worrying about agent messing up the current filesystems.&lt;/p&gt;

&lt;p&gt;I discovered &lt;a href="https://github.com/platformatic/vfs" rel="noopener noreferrer"&gt;@platformatic/vfs&lt;/a&gt;, a virtual filesystem provider for NodeJS, eventually vfs will be merged into official node, which is great.&lt;/p&gt;

&lt;p&gt;The best part of using effect is composability, it's little magical and a blackbox, as I'm just learning about it, It's also very powerful.&lt;/p&gt;

&lt;p&gt;The sandbox is just a layer which looks like&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="nx"&gt;Layer&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;Provides&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;where&lt;/span&gt; &lt;span class="nx"&gt;Provides&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;Vfs&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="nx"&gt;ChildProcessSpawner&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If your layer provides the tags, it plugs it. These are parts I feel kinda magical!&lt;/p&gt;

&lt;p&gt;VFS allows for different provider implementation, like real filesystem, sqlite based, and in-memory filesystem, It also allows for custom provider implementation, so in future I can have S3 filesystem provider, and others.&lt;/p&gt;

&lt;h3&gt;
  
  
  Integrating with Just Bash
&lt;/h3&gt;

&lt;p&gt;One of the cool projects from Vercel is &lt;a href="https://github.com/vercel-labs/just-bash" rel="noopener noreferrer"&gt;just-bash&lt;/a&gt; It allows for sandboxed bash interpreter for agents, it implements some or most of the required coreutils functionality like grep, cat, ls, etc.&lt;/p&gt;

&lt;p&gt;It's really powerful because agents love bash, they've been trained on 40+yrs of unix shell commands.&lt;/p&gt;

&lt;p&gt;just-bash also provides a filesystem layer, like VFS but I think sticking to VFS helps, as it will later allows for future proofing with &lt;code&gt;node:vfs&lt;/code&gt; implementation and custom provider implementations, the most value from just-bash is the &lt;code&gt;bash&lt;/code&gt; interpreter, so the underlying FS could just be VFS and that's what I did, creating VFS implementation that has interface that satisfies just-bash, basically building the bridge&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// just-bash accepts a custom filesystem interface.&lt;/span&gt;
&lt;span class="c1"&gt;// Implement it on top of the sandbox's VFS — don't let it bring its own.&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;bridge&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;vfs&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;VirtualFileSystem&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt; &lt;span class="nx"&gt;IFileSystem&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;readFile&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;  &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;path&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;vfs&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;promises&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;readFile&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;path&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;utf8&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
  &lt;span class="na"&gt;writeFile&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;path&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;content&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;vfs&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;promises&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;writeFile&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;path&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;content&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
  &lt;span class="na"&gt;stat&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;      &lt;span class="k"&gt;async &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;path&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nf"&gt;toStat&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;vfs&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;promises&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;stat&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;path&lt;/span&gt;&lt;span class="p"&gt;)),&lt;/span&gt;
  &lt;span class="p"&gt;...&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Bash is just a layer&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;shell&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;Layer&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;effect&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
  &lt;span class="nx"&gt;Shell&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;Effect&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;gen&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;function&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;vfs&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;yield&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="nx"&gt;FileSystem&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;Vfs&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;            &lt;span class="c1"&gt;// the sandbox's own tree&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;bash&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Bash&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;fs&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nf"&gt;bridge&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;vfs&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="na"&gt;cwd&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;/&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;
    &lt;span class="p"&gt;...&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Composition is what really like with Effect like&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="nx"&gt;EnvBash&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;layer&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;EnvInMemory&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;layer&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt;        &lt;span class="c1"&gt;// bash over a throwaway memory tree&lt;/span&gt;
&lt;span class="nx"&gt;EnvBash&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;layer&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;EnvSqldb&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;layer&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;fs.db&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;    &lt;span class="c1"&gt;// bash over a filesystem inside one sqlite file&lt;/span&gt;
&lt;span class="p"&gt;...&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The VFS and just-bash working together&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;filesystem&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;yield&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="nx"&gt;FileSystem&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;Service&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;shell&lt;/span&gt;      &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;yield&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="nx"&gt;Shell&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;yield&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="nx"&gt;filesystem&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;writeFileString&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;/data.txt&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;alpha&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s2"&gt;beta&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s2"&gt;beta&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;yield&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="nx"&gt;shell&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;exec&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;grep beta /data.txt | wc -l&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;...&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;So, if you like this scratchy non-edited, non-ai devlog, give it a like ;)&lt;/p&gt;

&lt;p&gt;Next, I'm hoping to learn more about EffectTS and also go deep into building more!&lt;/p&gt;

&lt;p&gt;Checkout the repo: &lt;a href="https://github.com/codeworksh/codework" rel="noopener noreferrer"&gt;https://github.com/codeworksh/codework&lt;/a&gt;&lt;br&gt;
Other projects: &lt;a href="https://codeworksh.github.io/aikit/" rel="noopener noreferrer"&gt;https://codeworksh.github.io/aikit/&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>claude</category>
      <category>agents</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Agent Harness Devlog #001</title>
      <dc:creator>Sanchit</dc:creator>
      <pubDate>Tue, 09 Jun 2026 07:25:09 +0000</pubDate>
      <link>https://dev.to/bigendianbits/agent-harness-devlog-001-5701</link>
      <guid>https://dev.to/bigendianbits/agent-harness-devlog-001-5701</guid>
      <description>&lt;p&gt;I'm looking into building an agent harness, this is the first in series for devlog posts and are non-ai, human generated.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Init
&lt;/h2&gt;

&lt;p&gt;It starts with a working directory, provided by the current process or a custom path.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;/app/codeworksh/codework
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This seemingly simple filesystem path has a lot going for it, e.g this could be a git repo, nested module within a git repo, or no repo at all, etc.&lt;/p&gt;

&lt;p&gt;The idea here is to start somewhere at a filesystem. The mental model of a filesystem is a view to some data on computer partitioned by the filesystem tree, you can walk this tree (will explore this later). This view should be pluggable allowing for custom implementations like VFS, a virtual filesystem whose underlying implementation can be real OS filesystem, in-memory, sqlite, or etc, providing a common interface irrespective of the underlying implementation. see &lt;a href="https://github.com/platformatic/vfs" rel="noopener noreferrer"&gt;vfs&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Location
&lt;/h3&gt;

&lt;p&gt;The location data model represents the instance of working location aka directory example&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="kr"&gt;interface&lt;/span&gt; &lt;span class="nx"&gt;Location&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;directory&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt; &lt;span class="c1"&gt;// directory path example os.cwd()&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The directory path within a machine is always unique, no two paths exists within the same machine, the underlying OS filesystem makes those guarantees, with that knowledge we can also use the directory within a machine as unique key.&lt;/p&gt;

&lt;p&gt;With this directory as the unique key, allows us to attach some runtime metadata to the location, allowing us to view the location as a world domain called Project.&lt;/p&gt;

&lt;h3&gt;
  
  
  Project
&lt;/h3&gt;

&lt;p&gt;A project is a real world domain mental model representing metadata + location. The metadata can be:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;a git repository&lt;/li&gt;
&lt;li&gt;named directory meaning&lt;/li&gt;
&lt;li&gt;some other identification&lt;/li&gt;
&lt;li&gt;source files or some binary data, etc.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The most common way to think about a location with metadata is a git repository. Take an example&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;/app/codeworksh/codework
    .git // git@github.com/codeworksh/codework
    package.json
    ...
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Git gives us the common location metadata like name of repository, unique identifier (repo URL), etc. With this we can build the domain model of a Project. Will be exploring more about Git later, there are lot of functionality for it.&lt;/p&gt;

&lt;p&gt;Note: Git is just one example here, we can also have git like/specific protocol e.g Cloudflare Artifacts, svn, etc&lt;/p&gt;

&lt;p&gt;Example&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// git@github.com/codeworksh/codework&lt;/span&gt;

&lt;span class="kr"&gt;interface&lt;/span&gt; &lt;span class="nx"&gt;Project&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// codework&lt;/span&gt;
    &lt;span class="nl"&gt;vcs&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// git&lt;/span&gt;
    &lt;span class="nl"&gt;directories&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;ProjectDirectory&lt;/span&gt;&lt;span class="p"&gt;[]&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="kr"&gt;interface&lt;/span&gt; &lt;span class="nx"&gt;ProjectDirectory&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;directory&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;main&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;root&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;gitworktree&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;
    &lt;span class="nx"&gt;sandboxEnvID&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Project:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;id&lt;/code&gt; - unique identifier generated via hash of git URL or some UUID see UUID7&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;name&lt;/code&gt; - generated via git repo name&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;vcs&lt;/code&gt; - defaults to &lt;code&gt;git&lt;/code&gt; string&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Project Directory:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;id&lt;/code&gt; - unique identifier&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;directory&lt;/code&gt; - absolute path in the filesystem&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;type&lt;/code&gt; - type of directory

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;main&lt;/code&gt; - The primary, first-seen clone of the repository.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;root&lt;/code&gt; - Any other independent clone of the exact same repository on your disk.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;gitworktree&lt;/code&gt; - A dynamically created linked copy spun off from one of the roots.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For a non git project a Project can be more simpler with static attributes&lt;br&gt;
Example&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="kr"&gt;interface&lt;/span&gt; &lt;span class="nx"&gt;Project&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;local&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// directory name&lt;/span&gt;
    &lt;span class="nl"&gt;vcs&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;unknown&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;directories&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;ProjectDirectory&lt;/span&gt;&lt;span class="p"&gt;[]&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For non-git directory there is no single best way to globally identify the sources or at least cheaply. Versioned control systems like git allows you to have multiple copies on your machine with same .git it's easy to track hence having &lt;code&gt;directories&lt;/code&gt; makes sense, all directories pointing to same project.&lt;/p&gt;

&lt;p&gt;Next will be exploring more on this location, building the project domain, and also storing in sqlite DB.&lt;/p&gt;

&lt;p&gt;If you like what you read checkout the repo: &lt;a href="https://github.com/codeworksh/codework" rel="noopener noreferrer"&gt;https://github.com/codeworksh/codework&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;PS: Would love some stars, keeps me motivated.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>claude</category>
      <category>agents</category>
      <category>tutorial</category>
    </item>
  </channel>
</rss>
