{"slug": "archie-give-ai-coding-tools-permanent-context-about-your-codebase-with-one", "title": "Archie – Give AI coding tools permanent context about your codebase with one command", "summary": "A developer built Archie, a tool that generates and maintains a structured ARCHITECTURE.md for codebases using a single command. It leverages Gemini's large context window and incremental updates via dependency graphs to keep AI coding tools informed about project context without manual upkeep.", "body_md": "Hi everyone, this is my first post on dev.to and I wanted to share a project I've been building.\n\nI built **Archie** to fix this. One command:\n\n```\nnpx archie init\n```\n\nIt reads your codebase and git history, uses Gemini to generate a structured `ARCHITECTURE.md`\n\n, and keeps that doc updated automatically via a git post-commit hook. No manual upkeep required.\n\nThe doc captures:\n\nEnd result is that every developer and every AI tool that opens the project gets the same context the original developer had. The AI stops re-suggesting things you already ruled out.\n\n**Context window**\n\nI went with Gemini specifically for the huge context window\n\n**Incremental updates**\n\nArchie builds a dependency graph from static import analysis. When files change, it finds their direct imports and importers (basically their neighbors), and *only* sends those to Gemini — not the whole codebase. Keeps updates fast and cheap per commit.\n\n**State management**\n\n`.git/archie/state.json`\n\ntracks `lastProcessedCommit`\n\n. The hook grabs ALL commits between the last processed one and HEAD, not just the latest — so it catches changes even if you've made a bunch of commits offline.\n\n**Surgical update prompting**\n\nThere's a Generate mode (first run) and an Update mode (every run after). The update prompt explicitly tells Gemini to only touch the sections affected by the changed files, so anything you've manually written stays untouched.\n\n**Significance detection**\n\nThis is what stops Archie from burning API calls on every tiny commit. It only fires on things like package.json changes, schema/migration files, new directories, or commits touching 5+ files. Smaller commits still move the state pointer forward, just without triggering a regeneration.\n\nIt's still early — about 250 npm downloads since launch a few days ago — so I'm still figuring out what's actually useful to people.\n\n`npm i archie-ai`\n\nI'd genuinely like to hear what you think, whether it's the core premise, the architecture doc format, or any of the technical decisions above. Happy to discuss any of it in the comments.", "url": "https://wpnews.pro/news/archie-give-ai-coding-tools-permanent-context-about-your-codebase-with-one", "canonical_source": "https://dev.to/abhishek_208a88756e55d3c3/archie-give-ai-coding-tools-permanent-context-about-your-codebase-with-one-command-42l7", "published_at": "2026-06-30 19:51:20+00:00", "updated_at": "2026-06-30 20:19:11.844873+00:00", "lang": "en", "topics": ["developer-tools", "artificial-intelligence", "large-language-models", "ai-tools"], "entities": ["Archie", "Gemini", "npm"], "alternates": {"html": "https://wpnews.pro/news/archie-give-ai-coding-tools-permanent-context-about-your-codebase-with-one", "markdown": "https://wpnews.pro/news/archie-give-ai-coding-tools-permanent-context-about-your-codebase-with-one.md", "text": "https://wpnews.pro/news/archie-give-ai-coding-tools-permanent-context-about-your-codebase-with-one.txt", "jsonld": "https://wpnews.pro/news/archie-give-ai-coding-tools-permanent-context-about-your-codebase-with-one.jsonld"}}