feat: implement Joe AI Augment Engine — high-context AI assistant#11745
Closed
Jothi-333 wants to merge 4 commits intoRooCodeInc:mainfrom
Closed
feat: implement Joe AI Augment Engine — high-context AI assistant#11745Jothi-333 wants to merge 4 commits intoRooCodeInc:mainfrom
Jothi-333 wants to merge 4 commits intoRooCodeInc:mainfrom
Conversation
Adds a full Augment Code-style intelligence layer to Joe AI with 6 phases: ## Phase 1 — Persistent Cross-Session Memory (MemoryManager) - Stores file summaries, editing patterns, and decisions to disk (.joe-memory.json) - Recalls context from previous sessions so Joe AI "remembers" your codebase - Tracks frequently edited files, code conventions, and recent work sessions ## Phase 2 — Continuous Background Indexing (ContinuousIndexer) - Always-on file watcher that re-indexes files on save (debounced 1.5s) - Prioritizes active editor file for immediate context relevance - Status bar indicator showing indexing progress in real time - Wires into existing CodeIndexManager for the actual embedding work ## Phase 3 — Smart RAG Context Auto-Selection (SmartContextSelector) - Semantic search via existing vector store to find most relevant files - Boosts recently-edited and frequently-edited files using memory scores - Boosts files in same directory as active editor - Injects top-N files into prompt with token budget management (12k tokens) ## Phase 4 — Proactive Code Intelligence (ProactiveAnalyzer) - Detects missing test files for changed source files - Suggests next actions based on file path patterns (services→controllers, etc.) - Finds related index files that may need updating after edits - Formats suggestions as non-blocking hints after task completion ## Phase 5 — New "Augment" Mode - Added 'augment' mode to DEFAULT_MODES with full role definition - Deep codebase Q&A with memory, semantic index, and proactive suggestions - Custom instructions for cross-file awareness, citation, and impact analysis ## Phase 6 — Multi-File Refactor Intelligence (MultiFileRefactorAnalyzer) - Scans entire codebase for all usages of a symbol (import/call/extend/impl) - Finds indirect dependencies (files that import files that use the symbol) - Generates risk level (low/medium/high) and ordered change plan - Detects duplicate code blocks across the codebase ## Integration - AugmentEngine orchestrator ties all phases together via single API - Initialized in extension.ts for all workspace folders on activation - System prompt (system.ts) injects augment context block when in augment mode - Status bar shows Joe AI engine state at all times https://claude.ai/code/session_013BkXczqxHfTQ5twb1ZknQ5
Complete branding update across the entire codebase (169 files): ## Package Manifests - package.json: name roo-code → joe-code - src/package.json: name roo-cline → joe-code, publisher RooVeterinaryInc → JoeCode, author "Roo Code" → "Joe Code", homepage → GitHub repo, repository → Joe-Code fork - apps/cli/package.json: description, bin command roo → joe, dev script URLs ## VSCode NLS Translation Files (18 languages) - All package.nls.*.json: displayName, context menu labels, activity bar title, sidebar name all updated from "Roo Code" → "Joe Code" ## i18n Locale Files (src/i18n — 18 languages × 2 files) - common.json: extension name, cloud auth messages, auto-import messages, MDM org messages, storage path placeholder, "What should Roo do?" → Joe - tools.json: image generation cloud auth messages ## Webview UI Locale Files (webview-ui/src/i18n — 18 languages × 10 files) - settings.json: all 20+ "Roo will/can/reads/sees" → Joe, community links, feature descriptions, about section - cloud.json: all Joe Code Cloud references - chat.json: all task sharing messages - All 180 webview locale JSON files updated ## Source Code - packages/cloud/src/utils.ts: User-Agent "Roo-Code" → "Joe-Code" - packages/cloud/src/__tests__: "Roo Code Cloud" auth messages in tests - apps/web-roo-code/src/lib/constants.ts: all external URLs updated to github.com/Jothi-333/Joe-Code and joe-code.dev domain - apps/cli/src/types/constants.ts: ASCII art renamed, auth/SDK URLs updated - src/extension.ts: sidebar and models cache log messages - src/utils/networkProxy.ts, autoImportSettings.ts: comment strings - webview-ui/src/components/: Roo Code Cloud → Joe Code Cloud in components/tests ## Assets - Added joe-logo.svg and joe.png (copied from roo equivalents) - webview-ui/src/components/welcome/RooHero.tsx: logo src updated to joe-logo.svg Note: Internal monorepo package names (@roo-code/*) intentionally kept unchanged to avoid updating 100s of import statements across the monorepo. https://claude.ai/code/session_013BkXczqxHfTQ5twb1ZknQ5
…l gaps Closes the gaps that prevented Joe AI from working like Augment Code: ## Gap 1 — Query-Level RAG Context (not static init) - system.ts: added `userQuery` parameter to `generatePrompt()` and `SYSTEM_PROMPT()` - Task.ts: `initiateTaskLoop()` now extracts the user's actual task text from userContent and stores it as `_augmentUserQuery` - Task.ts: `getSystemPrompt()` passes `_augmentUserQuery` to SYSTEM_PROMPT() so the RAG engine retrieves files relevant to THIS specific query, not a generic init string - This is the core of Augment Code's context-awareness: every query gets its own semantically-matched file context ## Gap 2 — Real-Time File Edit Tracking - WriteToFileTool.ts: calls `task.trackAugmentFileEdit(absPath)` after every successful file write, keeping memory + index current in real time - ApplyDiffTool.ts: same hook after every successful diff application - Task.ts: `trackAugmentFileEdit()` method — updates MemoryManager + triggers ContinuousIndexer to re-index the changed file immediately ## Gap 3 — Session Completion + Proactive Analysis - Task.ts: `_finalizeAugmentSession()` called on TaskIdle (attempt_completion) AND TaskAborted — persists session summary to cross-session memory - After session ends, ProactiveAnalyzer runs on all files changed during the task and surfaces top suggestions as VSCode info notifications - Task.ts: `_augmentEditedFiles[]` tracks all files changed during the session ## Gap 4 — Augment Mode Instructions Updated - mode.ts augment customInstructions: tells Joe AI to USE the injected memory and auto-context blocks in responses, not ignore them - Added clear note about embedder configuration requirement for full RAG - Added multi-file refactor workflow instructions https://claude.ai/code/session_013BkXczqxHfTQ5twb1ZknQ5
### TiDB Cloud Vector Store - New `TiDBVectorStore` implementing full `IVectorStore` interface - Uses TiDB Cloud HTTP gateway (`/v1/sql`) via axios (no new deps) - Stores embeddings as native `VECTOR(n)` columns with HNSW index - `VEC_COSINE_DISTANCE()` for ANN similarity search - Per-workspace table namespacing via SHA-256 workspace path hash - Upserts in chunks of 50 to avoid oversized SQL payloads - Full lifecycle: initialize, upsertPoints, search, delete, clear, markComplete - Wired into `CodeIndexServiceFactory.createVectorStore()` — auto-selected when `tidbHost`, `tidbUsername`, `tidbPassword` are configured; falls back to Qdrant ### Config - `CodeIndexConfig` gains `tidbHost`, `tidbUsername`, `tidbPassword`, `tidbDatabase` - `CodeIndexConfigManager` reads TiDB settings from global state + secrets storage - `isConfigured()` updated for all providers: accepts TiDB OR Qdrant as vector store ### Joe AI Inline Completions - New `JoeInlineCompletionProvider` registered for all language document types - 400ms debounce to avoid excessive API calls while typing - Builds fill-in-the-middle prompt: 100 lines prefix + 20 lines suffix - Pulls AugmentEngine smart context (relevant codebase files) into prompt - Calls `claude-haiku-4-5-20251001` with max 80 output tokens for speed - Gracefully handles: no API key, rate limits, auth errors, cancellation - Registered in `extension.ts` alongside the AugmentEngine initializer https://claude.ai/code/session_013BkXczqxHfTQ5twb1ZknQ5
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a full Augment Code-style intelligence layer to Joe AI with 6 phases:
Phase 1 — Persistent Cross-Session Memory (MemoryManager)
Phase 2 — Continuous Background Indexing (ContinuousIndexer)
Phase 3 — Smart RAG Context Auto-Selection (SmartContextSelector)
Phase 4 — Proactive Code Intelligence (ProactiveAnalyzer)
Phase 5 — New "Augment" Mode
Phase 6 — Multi-File Refactor Intelligence (MultiFileRefactorAnalyzer)
Integration
https://claude.ai/code/session_013BkXczqxHfTQ5twb1ZknQ5
Related GitHub Issue
Closes: #
Roo Code Task Context (Optional)
Description
Test Procedure
Pre-Submission Checklist
Screenshots / Videos
Documentation Updates
Additional Notes
Get in Touch
Interactively review PR in Roo Code Cloud