Applying ICM foundation (Module 1.2) on Localhosted Opensource Model
Before digging into the topic let's briefly set the scene by providing some background context.
Background
In 2026-Q1 I decided to invest into a custom pc to run local AI Models. Being an IT Professional I grew increasingly concerned seeing the pc component shift heavily towards AI Business cases. PC component prices was increasing rapidly and high-end components becoming scarce or non-available. Given the overall AI development in general I realized I wanted to ensure I owned AI capability at home, and that if I want to stay current in my career I need to dive in head first into AI and AI Development.
A powerful driver and motivator is that I want to see just how far I can take AI capabilities based on localhosted opensource methodology over paying a subscription/pay as you go solutions.
I eventually came across Clief's YouTube videos which got me curious about ICM and I decided to join this community.
Getting educated
Working through the Classroom Foundational course I noticed that ICM is primarily used together with Claude. Reading Clief's thesis ( Interpretable Context Methodology: Folder Structure as Agentic Architecture - https://arxiv.org/abs/2603.16021 ) strengthened my own observation that ICM conceptually is model and tooling agnostic. As long as the AI Model can access and interpret the ICM specification files it shouldn't matter if the model itself is run on cloud services like Claude, Gemini etc. or local hosted alternatives. I decided to put this to the test and do it practically.
Working through The Foundation: Module 1.2 ( https://www.skool.com/cliefnotes/classroom/036893d9?md=fdee3f73c53b46049078494c0cfb2e54 ) where we create our first ICM folder and get a quick win. I decided that since the Module 1.2 usecase is easy to start with, it makes sense to get it set up running in my own localhosted ai environment.
I also wanted to proceed with a real usecase where ICM can be helpful.
The Usecase
My current AI Homelab is in a phase where I am setting up what I call local AI eco system. Think of it as multiple components that should be integrated into the eco system that is easy to run with a modular approach and that ideally can share the same download ai models where possible. To help with version handling of the files I created a github repo that I decided to make public.
As part of the development process I find myself frequently creating linux bash scripts. Think of it as creating small scripts that can be run focused on frequently taken actions.
Up until this point I have been using a chat interface to generate the bash code for the script. Over time and repeated use I have noticed that the look and feel, colors etc. that the script output is changing inconsistency is being observed in the output. Inconsistent use of text colors makes for a poor user experience and can loose it's value of doing it entirely.
So where does ICM come into the picture?
Well with ICM we can define things such as standards that the AI Model need to respect and follow. This could help solve the inconsistencies in code when it comes to applying color to text for better highlighting important aspects of the script functionality. Since ICM is focused on text based file definitions it's something I can define once and reap the benefits of for every use thereafter. I was completely hooked and dedicated to see this practical test through!
The Challenges
Defining the ICM file specification was the easy part. The challenge quickly became apparent when it was time to apply it practically. I quickly faced these challenges
  • How to ensure that my localhosted AI models recognize, respects and follows ICM?
  • ICM is filebased meaning AI Model need to have access to my harddrive/files. Easy to achieve via ex. OpenCode or VS Code running Cline. I don't currently have these fully operational yet.
  • Following path of least resistance I wanted to test the ICM output of module 1.2 in the same chat interface (OpenWebUI) that I have been using to generate the bash scripts. This approach is conceptually different from the primary way of applying/using ICM. Chat based interfaces normally are de-coupled from files. How to make the files available via chat interface, have the AI model respect ICM human review/human in the loop between steps. And what about following ICMs output as file methodology?
These challenges ended up being conceptually tricky to resolve and also proved to be invaluable as they really helped elevate my understanding of how to apply AI in general and ICM methodoly in particular.
Ensuring local AI Models follows ICM
The model I have been using to generate the bash code is qwen3-coder:30b served by localhosted ollama. After some earlier experiments I knew that the way forward most likely was to create an ollama model specification based on, for this use case, qwen3-coder:30b and specifying a system prompt that ensures that the derived model respects and follows ICM.
This was the approach I took which turns out to be the correct one. More about results later.
Test: Can ICM methodology be used in chat interfaces
The primary challenges with chat interfaces is how to get the model to consume, understand and follow ICM specifications which are on-disk/file based. Sure it's possible to cut and paste these directly into the chat, or to add it all into the derived model specification system prompt. However both approaches deviates from ICM methodolgy by either becoming monolithic or not using the needed context only when it's needed. Also how to use the same model for many various ICM workspaces/usecases? Granted I could manually input what context I need when I need it but that is prone to human error and therefor not desired.
This conceptually lead me down a rabbit hole where I ended up thinking way to explicitly on the details. Basically not seeing the forest for all the trees until I had a lighbulb moment.
I should not concern myself with the practical details of how the tooling process the files etc. The tooling itself knows how best to take the contents of the ICM specification files and make it available to the model. The respective tool. Ex. OpenCode & VS code with Cline have direct access to the files on disk. Easy use case, ICM should work out of the box. OpenwebUI however does not have this native file access from the beginning. The option I have is either setting up the ICM files as knowledge repository, or folder or attach the files directly in the chat.
I decided to try the easiest solution of just manually dropping/attaching the files in the chat. This however causes another conceptual challenge. As a human I am going to forget to do it. How can I ensure that the model doesn't just process my request without ICM and outputs something anyways? I would need to be really into the details to catch such a case when reviewing the output. The solution was easier then I thought. As part of the created model specification system prompt. Ensure that the model checks for the existance of ICM files first, and if not, produce an error to the user and ask to have the files provided. Thereby solving the challenge of how can an ai model respect ICM if it does not first have ICM. Basically a chicken or the egg conceptual challenge. One cool aspect here is that this approach should be "tooling agnostic" as it either already has ICM file context on ai model loaded, or it does not is detected and can be provided. If the tooling is highly specified and does not allow for any type of on-disk/file interface the workaround would be manual prompting based on the files.
For the final challenge: How to respect ICM methodology when moving from a file centric approach to chat centric.
The conceptual solution was staring me in the face all along. Ensure the ICM files gets to the AI model contextual awareness by using the toolings native functionality. In my case attaching the files to the chat. Then following the human in the loop aspects of ICM, see the AI output after each step visually on the screen rather then a file output. Not having a file output is a slight deviation from ICM, however the human in the loop is respected and I can manually be responsible for saving the output to a file. As it's text output on the screen that part also respect ICM.
What about the result?
Defining the derived model specification - Ensure model detects and respects ICM
See the attached ollama_icm_model_specification.png file
The image shows the specification and the system prompt. At this stage it's a proof of concept. I need to get through more of the ICM foundational course and a lot more practical tests to further refine the system prompt. This initial test show a lot of potential.
ICM Workspace outcome
Getting inspired by Curtis Hays post: The Folder System Became my Agency (https://www.skool.com/cliefnotes/the-folder-system-became-my-agency?p=1e30aba0) where he gives each ICM a name I decided to do the same. If you haven't read the post I highly recommend that you do. It's a treasure trove of insights into AI and ICM.
Community meet Basher, Basher meet the community.
Basher loves to create bash scripts in linux. He loves to do so in a highly defined and repeatable manner. At least that is his goal and as I progress through the course material and get more practical experience basher will evolve and get better.
When I created Basher I also realised that I will be creating quite a lot of ICM workspaces over time. Giving them unique names/nicknames makes it easier to recognize them. To stay organized and have versioning in place I created a git report that I also decided to make public which i call icm-crew. The goal of the icm-crew is to help you get stuff done in a better way, the way you need it to be done by following ICM methodoly. The goal of the respository is to make it an ICM library of ICM compliant workplaces. The repository will respect ICM structure with one addition, a category to put icm workplaces in to make it easier to find workplaces for type of work it needs to do. Ex. Basher will come an ICM workplace in the category of coder.
Now how did it go? Did it work? Yes it sure did...
Look at the icm-crew images that I attached to the post. I started of by saying hello in the chat to see if the system prompt was working correctly. It did as it recognized that it didn't have the ICM files or their context. I added them manually, asked the model to evaluate them and reference it's understanding. It did and I then proceeded with a simple use case. I ran the same usecase prompt in the ICM specific model and the non ICM specified model. qwen3-coder-30b vs icm-qwen3-coder-30b. The outcome shows a difference in output, the icm version respecting the provided ICM context. Proving that this ICM proof of concept test works. Which outcome result is better is a natural question and needs to be checked but it's out of scope for this test as the scope was to test if ICM can work on localhosted opensource model and in a chat interface.
Concluding
If you made it this far, thank you for taking the time to read it all. I learned so much about AI and how to think about AI working through the module, reading Cliefs ICM thesis and by practically applying it in my current ai homelab context. Proving just how much more can be learned when taking what appears to be a simple quick win exercise and applying it to a real use case.
This for me turned out to be a MASSIVE Win and I hope reading through this post you had several Aha moments yourself. / Tobias
5
8 comments
Tobias Fransson
3
Applying ICM foundation (Module 1.2) on Localhosted Opensource Model
Clief Notes
skool.com/cliefnotes
What we give away free beats most paid courses. Build durable AI systems with a Marine vet and Edinburgh researcher. 40+ lessons, growing.
Leaderboard (30-day)
Powered by