{"id":51849779,"url":"https://github.com/manojmallick/codemind","last_synced_at":"2026-07-23T17:03:47.072Z","repository":{"id":372365402,"uuid":"1306892834","full_name":"manojmallick/codemind","owner":"manojmallick","description":"Developer AI that never forgets your codebase — SigMap-style structural index fused with three-tier persistent memory (hot/warm/cold) powered by Qwen","archived":false,"fork":false,"pushed_at":"2026-07-20T19:24:39.000Z","size":15,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-07-20T20:18:39.221Z","etag":null,"topics":["ai-agent","codebase-intelligence","developer-tools","hackathon","memory-systems","persistent-memory","qwen","typescript"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/manojmallick.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-07-20T18:14:54.000Z","updated_at":"2026-07-20T19:25:21.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/manojmallick/codemind","commit_stats":null,"previous_names":["manojmallick/codemind"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/manojmallick/codemind","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manojmallick%2Fcodemind","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manojmallick%2Fcodemind/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manojmallick%2Fcodemind/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manojmallick%2Fcodemind/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/manojmallick","download_url":"https://codeload.github.com/manojmallick/codemind/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manojmallick%2Fcodemind/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35809505,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-07-20T02:08:10.276Z","status":"online","status_checked_at":"2026-07-23T02:00:06.683Z","response_time":57,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai-agent","codebase-intelligence","developer-tools","hackathon","memory-systems","persistent-memory","qwen","typescript"],"created_at":"2026-07-23T17:03:46.369Z","updated_at":"2026-07-23T17:03:47.068Z","avatar_url":"https://github.com/manojmallick.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CodeMind 🧠\n\n**The developer AI that never forgets your codebase — structural code intelligence fused with persistent experiential memory.**\n\n[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](LICENSE)\n[![TypeScript](https://img.shields.io/badge/TypeScript-5.4-blue.svg)](tsconfig.json)\n[![Qwen](https://img.shields.io/badge/Qwen-max-orange.svg)](https://www.alibabacloud.com/en/solutions/generative-ai/qwen)\n[![Track](https://img.shields.io/badge/Qwen%20Hackathon-Track%201%3A%20MemoryAgent-purple.svg)](#)\n\nEvery AI coding assistant starts fresh. Every session you re-explain your project, your naming conventions, your preferences. *\"We use snake_case.\" \"Auth lives in src/auth.\" \"Never use print — use logger.\"* Repeated. Every. Session.\n\nCodeMind fixes this by combining two complementary memories:\n\n- **Structural memory** (SigMap-style index) — *\"here are the relevant files and signatures for your query\"*\n- **Experiential memory** (three-tier, persistent) — *\"last time, you preferred the JWT approach over sessions\"*\n\nNeither alone is enough. Together they answer like a senior developer who has actually worked on your project.\n\n---\n\n## Table of Contents\n\n- [Architecture](#architecture)\n- [The Three Memory Tiers](#the-three-memory-tiers)\n- [Memory Lifecycle](#memory-lifecycle)\n- [How a Query Flows](#how-a-query-flows)\n- [Quick Start](#quick-start)\n- [Configuration](#configuration)\n- [Project Structure](#project-structure)\n- [Honest Status](#honest-status)\n- [License](#license)\n\n---\n\n## Architecture\n\n```mermaid\nflowchart TB\n    Q([💬 Developer query]) --\u003e S \u0026 M\n\n    subgraph \"Context Assembly\"\n        S[\"SigMap index\u003cbr/\u003eranked file signatures\u003cbr/\u003e(structural)\"]\n        M[\"Memory retrieval\u003cbr/\u003erelevance = confidence × decay\u003cbr/\u003e+ overlap + hit count\u003cbr/\u003e(experiential)\"]\n    end\n\n    S \u0026 M --\u003e LLM[\"Qwen-Max\u003cbr/\u003eanswer grounded in\u003cbr/\u003ecode AND history\"]\n    LLM --\u003e A([✅ Answer with file + preference citations])\n\n    LLM --\u003e E[\"Memory extraction\u003cbr/\u003epreferences · corrections\u003cbr/\u003econventions · facts\"]\n\n    subgraph \"Three-Tier Memory (persistent JSON)\"\n        H[\"🔥 HOT\u003cbr/\u003elast 10 items\u003cbr/\u003ecurrent session\"]\n        W[\"🌡️ WARM\u003cbr/\u003erecurring, decaying\u003cbr/\u003equeryable\"]\n        C[\"🧊 COLD\u003cbr/\u003epermanent conventions\u003cbr/\u003eno decay\"]\n    end\n\n    E --\u003e W\n    W -- \"consolidation (Qwen-Max):\u003cbr/\u003ePROMOTE_COLD / KEEP_WARM / DISCARD\" --\u003e C\n```\n\n## The Three Memory Tiers\n\n| Tier | Holds | Retention |\n|---|---|---|\n| **HOT** | Last 10 interactions of the current session | Rolling window |\n| **WARM** | Recurring preferences and observations | Time-decayed confidence; periodically consolidated |\n| **COLD** | Confirmed conventions and never-forget rules | Permanent — confidence 0.95, zero decay |\n\nEach entry carries a category (`preference` · `correction` · `convention` · `fact`), a confidence score, a decay rate, a timestamp, and a hit counter.\n\n## Memory Lifecycle\n\n1. **Write (automatic)** — after every answer, Qwen-Max extracts memory-worthy items from the exchange and stores them in WARM.\n2. **Read (every query)** — memories are ranked by `confidence × time-decay (60%) + query overlap (30%) + hit count (10%)`; the top matches join the prompt.\n3. **Consolidate** — Qwen-Max reviews WARM entries and rules each one: promote to COLD (proved recurrent), keep in WARM (with a confidence bump), or discard (outdated). Explicit corrections beat old memories.\n\nThe intended trajectory: Session 1 answers like any assistant; by Session 10 it knows your conventions and cites your own files and past choices back to you.\n\n## How a Query Flows\n\n```\nSession 1:  \"How should I handle errors in this service?\"\n            → generic best-practice answer, memories extracted\n\nSession N:  \"How should I handle errors in this service?\"\n            → \"You've been using GlobalExceptionHandler.java; your team\n               convention is ErrorResponse objects with HTTP status codes —\n               follow the pattern in PaymentService.handleException().\"\n```\n\n## Quick Start\n\n**Prerequisites:** Node.js 18+, a [Qwen Cloud API key](https://www.alibabacloud.com/en/product/modelstudio).\n\n```bash\ngit clone https://github.com/manojmallick/codemind.git\ncd codemind\nnpm install\n\ncp .env.example .env        # add your QWEN_API_KEY\n\nnpm run dev                 # multi-session demo on a sample repo index\n```\n\n## Configuration\n\n| Variable | Default | Purpose |\n|---|---|---|\n| `QWEN_API_KEY` | — (required) | Qwen Cloud API key |\n| `QWEN_BASE_URL` | `https://dashscope.aliyuncs.com/compatible-mode/v1` | OpenAI-compatible endpoint |\n\nMemory persists to `codemind_memory.json` (constructor parameter).\n\n## Project Structure\n\n```\ncodemind/\n├── src/\n│   ├── index.ts        # CodeMind class — context assembly, chat, extraction\n│   ├── memory.ts       # three-tier memory, relevance scoring, SigMap store, consolidation\n│   └── qwenClient.ts   # Qwen Cloud client with robust JSON handling\n└── README.md\n```\n\n## Honest Status\n\nThis is a working prototype built for the hackathon window. The SigMap store here is a lightweight lexical simulator of the full [SigMap](https://www.npmjs.com/package/sigmap) signature index; the demo transcript is generated live per run, and no cross-session accuracy numbers are claimed until measured. See the memory-relevance formula in [src/memory.ts](src/memory.ts) — it is deliberately simple and inspectable.\n\n## License\n\n[MIT](LICENSE) © 2026 Manoj Mallick · Built for the Qwen Cloud Hackathon, Track 1 (MemoryAgent).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmanojmallick%2Fcodemind","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmanojmallick%2Fcodemind","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmanojmallick%2Fcodemind/lists"}