# My AI agents stop starting cold: a map of my Mac that git commits write

Javier Rodeiro · 2026-11-17 (updated 2026-11-23)

An AI coding agent starts every session knowing nothing about my Mac. atlas-framework fixes that with 167 short markdown pages, one per repo, service and MCP server, rewritten by git hooks on every commit. The agent searches them with qmd instead of opening folders.

![The same question answered two ways: without a map the agent reads dozens of files across three repos; with the map it searches once and reads one page. The file counts are an illustrative example, not a measured session.](../../../assets/articles/machine-map-for-ai-coding-agents-4.svg)

## Why an agent needs a map it did not have to explore

An AI coding agent such as Claude Code or Codex starts every session knowing nothing about the machine it runs on. Opened in one repo, it cannot see that the LLM proxy it talks to is configured in another repo, that a launchd job runs from a third, or that a dependency was dropped last month for a license reason. It finds out by reading files, and every file it reads is paid for again in the next session.

![An entity page in four bands: the frontmatter comes from git and the GitHub CLI with no LLM, the decisions are mined from agent transcripts by CodeAlmanac, the workflow table comes from gh run list, and everything below the manual marker is yours and never rewritten.](../../../assets/articles/machine-map-for-ai-coding-agents-6.svg)

atlas answers those questions with one page per thing. This is the page it wrote for [media-tools](https://github.com/jrodeiro5/media-tools), one of my public repos, trimmed:

```md
---
type: repo
title: media-tools
remote: github.com/jrodeiro5/media-tools
stack: python
last-commit: 2026-10-23
gitnexus-indexed: yes
generated: { by: process:repo-atlas, at: 2026-11-14T19:36:55Z }
---

## Decisions
- pdf2docx moved to an optional docx extra (AGPL PyMuPDF) — Decided 2026-09-20
- Local TTS uses Kokoro, not Chatterbox — autoregressive models run away

## Workflows
| workflow | last run   | status  | consecutive failures |
|----------|------------|---------|----------------------|
| CI       | 2026-11-14 | success | 0                    |
| Gitleaks | 2026-11-14 | success | 0                    |

<!-- manual -->
```

Nobody typed any of it. The frontmatter comes from git and the GitHub CLI, the decisions are mined from past agent transcripts by [CodeAlmanac](https://github.com/AlmanacCode/codealmanac), and the workflow table comes from `gh run list`. Anything a human wants to add goes below the `<!-- manual -->` marker, and the next scan rewrites everything above it. On 23 November the bundle on my machine held 167 pages. The scanners in atlas-framework write the repo, service, MCP server and agent harness pages. Job pages come from a script of mine that I have not published, and host pages are written by hand.

![A stacked bar of the 167 pages on 23 November 2026: 43 repos, 49 services, 6 MCP servers and 4 agent harnesses written by the atlas scanners, 62 scheduled jobs written by an unpublished script of mine, and 3 hosts written by hand.](../../../assets/articles/machine-map-for-ai-coding-agents-5.svg)

## A commit is the main trigger

Onboarding a repo sets git's `core.hooksPath` to atlas's own hooks folder. After that, every commit starts a chain of four steps in the background. atlas calls it the cascade. The commit returns at once.

![The atlas cascade in two lanes. Within minutes, a git commit fires a background hook that runs GitNexus, repo-atlas.sh and qmd update, none of them with an LLM. At night, between 01:15 and 07:00, OpenWiki, the only step that calls an LLM, works through the repos the hook marked pending and feeds qmd.](../../../assets/articles/machine-map-for-ai-coding-agents-1.svg)

The pages catch up a few minutes later, except OpenWiki's. OpenWiki is the only step that needs the local model, and I want that model free during the day, so the hook only marks the repo as pending. A nightly job, atlas-openwiki-nightly.sh, works through the pending repos from 01:15 and starts no new run after 07:00. A day of commits is one run, and `atlas cascade <repo>` still runs the whole chain on demand.

Three launchd jobs cover what commits cannot see: a periodic repo scan, a scan of the services macOS has loaded, and a local viewer for the bundle.

[GitNexus](https://github.com/abhigyanpatwari/GitNexus) builds a code graph, so an agent can ask what breaks if it changes a function instead of grepping for callers. [OpenWiki](https://github.com/langchain-ai/openwiki) writes narrative pages about how the repo works, and it is the only step that calls a model. repo-atlas.sh rewrites the entity page from git and GitHub with no model at all. [qmd](https://github.com/tobi/qmd), a local search engine for markdown, re-indexes the result.

The generated files have to go somewhere, and that is where the cascade is most careful. In a repo whose remote is private, atlas commits the generated pages itself, with an `Atlas-Cascade:` trailer in the message so the hook recognizes its own commit and does not fire again. The commit uses an explicit list of paths, so anything I had staged in the meantime stays staged and out of the bot's commit. In a public repo it commits nothing and leaves the diff for me, because a silent commit followed by my next push would publish model-written prose nobody read.

## Private code never leaves the machine, even when the proxy is down

atlas-framework sends a repo to a model according to its visibility on GitHub, and a private repo only ever reaches a local model. Before OpenWiki runs, a short script asks `gh` whether the repo is public. If `gh` cannot confirm it, the repo counts as private. Both kinds go through the same local OpenAI-compatible proxy, [LiteLLM](https://github.com/BerriAI/litellm) by default, but they ask it for different models.

![Routing by repo visibility. Public repos use the public model through the local proxy, and a cloud fallback only when the proxy is down and all three fallback settings exist. Private or unknown repos use a local model through the same proxy, and when the proxy is down generation is refused.](../../../assets/articles/machine-map-for-ai-coding-agents-2.svg)

The branch worth looking at is the bottom right. When the proxy is down, a public repo may use a cloud endpoint if I have configured one, and a private repo gets nothing: the script refuses, and the page waits for the next commit. There is no setting that sends private code to the cloud, because the cheapest way to make that mistake impossible is to leave the code path out.

That rule only holds if the proxy agrees. LiteLLM can be configured with a global fallback that retries a failed request on another provider, and that would send private code out behind atlas's back. The README tells you to keep the private model group local in the proxy config too. In August the private model on my machine was Ornith 1.5, a 35B mixture-of-experts model I [compared against Qwen3.8 on the same Mac](/blog/qwen-mtp-vs-moe-dflash-on-a-mac/). It is now Inkling 2 Mini, after [an eval of local models for an agent](/blog/local-model-for-an-ai-agent-on-a-mac/).

## The cost is reading, so atlas cuts pages, not words

In atlas's OpenWiki stage the model reads about 29 tokens for every token it writes. I measured it on 19 August 2026 from the LiteLLM spend logs: 62 OpenWiki calls read 2,020,977 prompt tokens and wrote 69,968 completion tokens, a ratio of 28.9 to 1. Completion was 3.3% of the total.

![Bar chart of 62 OpenWiki calls on 19 August 2026: 2,020,977 prompt tokens read against 69,968 completion tokens written, a ratio of 28.9 to 1.](../../../assets/articles/machine-map-for-ai-coding-agents-3.svg)

That number cancelled an experiment I was about to run. I wanted the model to write terser pages, and even a perfect result would have saved about 3%. The time goes the same way. Within one pass the prompt grew from 6,470 to 74,674 tokens, and a call with a 74,000-token prompt took 76 to 107 seconds on the local model while emitting about 300 tokens.

The same arithmetic applies to the agents reading the map, and it shaped the format. One entity per file, facts as lists, and a search index in front, so an agent reads the one page it needs instead of five. Generated output is never fed back in as source either: OpenWiki is told to skip its own pages, CodeAlmanac's pages, the GitNexus index, lockfiles and `.env` files. Without that rule each pass would read the previous pass's prose and the prompt would grow on every run.

## Try it on one repo before wiring anything

atlas-framework installs from the [repo on GitHub](https://github.com/jrodeiro5/atlas-framework), and the first scan needs no model. These are the commands from the README:

```sh
git clone https://github.com/jrodeiro5/atlas-framework ~/dev/infra/atlas
ln -s ~/dev/infra/atlas/bin/atlas ~/.local/bin/atlas
atlas scan      # first scan, no LLM: one page per repo
atlas status
```

Read what the scan wrote before anything runs on its own. Then onboard a single repo with `atlas onboard <repo>`, make a commit, and watch its page change. `atlas onboard <repo> --undo` puts the repo's hooks back as they were. The test suite runs every external tool as a stub in a fake home directory, with no network and no model, so `test/run-tests.sh` is safe to run before you trust it with your machine.

## What is still rough

- **macOS only**, and opinionated: repos must live under `~/dev/<category>/<repo>` and the wiki folder sits in the home directory, both hardcoded.
- **Bash 4** or later for the scanner, while macOS ships 3.2.
- **Node 22** for OpenWiki, because its native SQLite module is built against one Node version and breaks on another.
- **PolyForm Noncommercial** is the GitNexus license, so commercial use needs its own license. The cascade skips that step when GitNexus is not installed.
- **Nine repos** on my machine still have no GitNexus index.
- **One signal**, an unclosed code fence, is all I trust to detect a page the model cut off halfway.
- **No Nix** out of the box. The three launchd jobs the framework ships as plists could be declared as `launchd.user.agents` in nix-darwin, and the README says how. Only my nightly OpenWiki job is declared that way, and the framework ships its script but no plist for it.

The same idea shows up at a different scale in [my MeasureCamp Madrid 2026 talk](/talks/), where the map is of analytics accounts instead of repos. In both cases an agent that can read the map before it acts makes fewer blind changes. Start with one repo: `atlas scan`, read what it wrote, then `atlas onboard <repo>`.

Source: https://javierrodeiro.com/blog/machine-map-for-ai-coding-agents/
