minovative-mind-cli 2.13.4 → 2.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/README.md +104 -42
  2. package/dist/commands/chat.d.ts +1 -1
  3. package/dist/commands/chat.js +1 -2
  4. package/dist/services/agent/slashCommands.js +47 -23
  5. package/dist/services/agent/syntaxAgent.js +13 -0
  6. package/dist/services/agent/types.d.ts +0 -4
  7. package/dist/services/agent-tools.d.ts +1 -1
  8. package/dist/services/agent-tools.js +2 -2
  9. package/dist/services/agent.d.ts +1 -7
  10. package/dist/services/agent.js +184 -209
  11. package/dist/services/ai.d.ts +19 -4
  12. package/dist/services/ai.js +97 -12
  13. package/dist/services/contextAgent.js +33 -8
  14. package/dist/services/investigationComplexity.js +1 -1
  15. package/dist/services/mentionEngine.d.ts +385 -0
  16. package/dist/services/mentionEngine.js +1395 -0
  17. package/dist/services/orchestration/investigationAgent.js +4 -1
  18. package/dist/services/orchestration/messageBus.d.ts +27 -4
  19. package/dist/services/orchestration/messageBus.js +206 -22
  20. package/dist/services/orchestration/orchestrator.js +4 -0
  21. package/dist/services/orchestration/scopedTools.js +16 -2
  22. package/dist/services/orchestration/subAgent.js +14 -2
  23. package/dist/services/proxyClient.d.ts +38 -2
  24. package/dist/services/proxyClient.js +42 -24
  25. package/dist/services/swebench/sweBenchRunnerService.js +1 -1
  26. package/dist/utils/config.d.ts +75 -0
  27. package/dist/utils/config.js +93 -0
  28. package/dist/utils/contextPrompts.d.ts +28 -4
  29. package/dist/utils/contextPrompts.js +70 -1
  30. package/dist/utils/historyPrompt.d.ts +166 -7
  31. package/dist/utils/historyPrompt.js +775 -30
  32. package/dist/utils/symbolExtractor.d.ts +111 -8
  33. package/dist/utils/symbolExtractor.js +616 -64
  34. package/dist/utils/systemPrompts.d.ts +3 -4
  35. package/dist/utils/systemPrompts.js +5 -34
  36. package/oclif.manifest.json +2 -2
  37. package/package.json +1 -1
package/README.md CHANGED
@@ -7,7 +7,7 @@ and hope for the best.
7
7
 
8
8
  This CLI does the opposite — it uses a custom built agentic system called,
9
9
  **Precision-Context Verification (PCV)** engine to feed lightweight Flash models
10
- exactly the right context, execute code, verify compilation, execute Property-Based Testing (PBT) suites and diff-scoped mutation audits, and self-correct (if it even needs to), until
10
+ exactly the right context via **AST-level targeted reads** and **2-tier context compression**, execute code, verify compilation, execute Property-Based Testing (PBT) suites and diff-scoped mutation audits, and self-correct (if it even needs to), until
11
11
  the build/performance metrics are green.
12
12
 
13
13
  > The result: **Genuine Pro reasoning accuracy at Flash-level speed and efficiency.**
@@ -82,7 +82,7 @@ Works in any terminal — SSH, Docker, CI pipelines, Vim, Windows Command Prompt
82
82
 
83
83
  ### 🔬 Automated SWE-bench Evaluation Runner
84
84
 
85
- Evaluate the agent on SWE-bench Lite datasets with automated repo isolation, patch extraction, and public-ready telemetry reporting:
85
+ Evaluate the agent on SWE-bench Lite datasets with automated repo isolation, patch extraction, AST-scoped context minimization, and public-ready telemetry reporting:
86
86
 
87
87
  ```bash
88
88
  # Run SWE-bench evaluation and generate JSON report
@@ -92,20 +92,31 @@ minovative-mind-cli eval -i test_instances.jsonl -o predictions.jsonl -r evaluat
92
92
  minovative-mind-cli eval -i instances.jsonl --repo astropy/astropy --concurrency 2
93
93
  ```
94
94
 
95
- ---
95
+ > **Token Economics & Efficiency**: With AST-level symbol chunking (`targetElements`), SHA-256 context caching, and in-place historical tool response pruning, benchmark evaluations achieve up to **85%–95% lower token usage per instance**, eliminating token-per-minute (TPM) rate limit thrashing while preserving deep reasoning fidelity.
96
96
 
97
+ ---
97
98
 
98
99
  ## Models
99
100
 
100
- Hot-swap during a session using `/models`:
101
+ Minovative Mind CLI features native support for Google's Gemini 3.x reasoning capabilities (`thinking_config`), allocating dynamic thinking budgets before tool execution and code generation. Hot-swap models and customize reasoning levels during a session using `/models`:
102
+
103
+ | Model | Default Thinking Level | Best for |
104
+ | ------------------------- | ---------------------- | --------------------------------------------------- |
105
+ | **Auto** (default) | `Medium` (`MEDIUM`) | Automatically selects (3.7 Flash or 3.5 Flash Lite) |
106
+ | **Gemini 3.7 Flash** | `Medium` (`MEDIUM`) | Next-gen performance, reasoning & fast execution |
107
+ | **Gemini 3.6 Flash** | `Medium` (`MEDIUM`) | Everyday coding — fast and accurate |
108
+ | **Gemini 3.1 Pro** | `High` (`HIGH`) | Complex architectural changes & deep reasoning |
109
+ | **Gemini 3.5 Flash Lite** | `Low` (`LOW`) | Best for speed and cost efficiency |
110
+
111
+ ### Native Thinking & Reasoning Levels
112
+
113
+ Gemini 3.x models support native provider-level reasoning control via `thinking_config`. When switching models or invoking `/models`, you can interactively customize the thinking depth across three streamlined developer tiers:
101
114
 
102
- | Model | Best for |
103
- | ------------------------- | --------------------------------------------------- |
104
- | **Auto** (default) | Automatically selects (3.7 Flash or 3.5 Flash Lite) |
105
- | **Gemini 3.7 Flash** | Next-gen performance, reasoning & fast execution |
106
- | **Gemini 3.6 Flash** | Everyday coding fast and accurate |
107
- | **Gemini 3.1 Pro** | Complex architectural changes |
108
- | **Gemini 3.5 Flash Lite** | Best for speed and cost efficiency |
115
+ - **`Low` (`LOW`)**: Fast, lightweight reasoning for routine tasks, minor bug fixes, and quick code edits.
116
+ - **`Medium` (`MEDIUM`)**: Balanced reasoning depth for multi-file refactoring, debugging, and feature development (default for 3.7 Flash, 3.6 Flash, and Auto).
117
+ - **`High` (`HIGH`)**: Exhaustive chain-of-thought deliberation for complex architectural transformations, intricate algorithmic puzzles, and large-scale migrations (default for 3.1 Pro).
118
+
119
+ _(Note: Internal `Minimal` reasoning is strictly reserved for lightweight background micro-agents and is excluded from user-facing selection to ensure optimal coding performance.)_
109
120
 
110
121
  ### BYOK (Bring Your Own Key)
111
122
 
@@ -114,17 +125,21 @@ If you prefer to use your own API key instead of credits, you can configure it v
114
125
  - **Configuration:** Use `/config-key` in the chat session to set and manage your API key.
115
126
  - **Error Handling:** If your key is invalid, expired, or you hit rate limits, the CLI will report a `BYOK AI Error`. Please check your API key status in the [Google AI Studio dashboard](https://aistudio.google.com).
116
127
 
117
- ### Auxiliary Model Routing Defaults
128
+ ### Auxiliary Model Routing Defaults & Reasoning Invariants
118
129
 
119
- Background tasks automatically route to dedicated auxiliary models with native `responseSchema` constraints for optimal latency, cost efficiency, and structured output reliability:
130
+ Background tasks automatically route to dedicated auxiliary models with native `responseSchema` constraints, AST symbol extractors, persistent caches, and deterministic reasoning invariants for optimal latency, cost efficiency, and structured output reliability:
120
131
 
121
- - **Intent Routing (`routeIntent`)**: `Gemini 3.7 Flash` (Temp 0, native `responseSchema`) — permissive zero-temperature classification into `SEARCH` vs `SKIP` and `CHAT` vs `EXECUTE` with resilient fallback to repository exploration.
122
- - **Complexity Evaluators (`evaluateInvestigationComplexity`)**: `Gemini 3.7 Flash` (Temp 0, native `responseSchema`) — permissive parallel domain partitioning, global override detection, primary sub-path auto-focusing, and dynamic agent assignment recovery.
123
- - **Context Compressor**: `Gemini 3.7 Flash` (Temp 0.2) — surgical code distillation for files exceeding 2,000 characters.
124
- - **Session Titling**: `Gemini 3.7 Flash` (Temp 0.7, native `responseSchema`) automated concise chat session titling.
125
- - **Semantic Cache Classifier**: `Gemini 3.5 Flash Lite` (Temp 0, native `responseSchema`) intent and topic classification for cache hits.
126
- - **History Summarizer**: `Gemini 3.7 Flash` (Temp 0.2) — 3-part structured conversation compression preserving recent history.
127
- - **Commit Generator**: `Gemini 3.5 Flash Lite` — conventional commit message synthesis.
132
+ - **Intent Routing (`routeIntent`)**: `Gemini 3.7 Flash` (Temp 0, native `responseSchema`, `MINIMAL` invariant) — permissive zero-temperature classification into `SEARCH` vs `SKIP` and `CHAT` vs `EXECUTE` with resilient fallback to repository exploration.
133
+ - **Complexity Evaluators (`evaluateInvestigationComplexity`)**: `Gemini 3.7 Flash` (Temp 0, native `responseSchema`, `MINIMAL` invariant) — permissive parallel domain partitioning, global override detection, primary sub-path auto-focusing, and dynamic agent assignment recovery.
134
+ - **Context Compressor & Caching**: `Gemini 3.7 Flash` (Temp 0.2, `MINIMAL` invariant) — surgical code distillation for files exceeding 2,000 characters backed by a persistent 2-tier SHA-256 disk cache (`context_cache.json`) capped at 5MB LRU. Files under 2,000 characters retain 100% full fidelity without compression overhead.
135
+ - **AST Symbol Extraction & Targeted Reads**: Polyglot AST declaration extractor (`symbolExtractor.ts`) enabling granular `targetElements` symbol chunking in `read_file`, slashing input token bloat by up to 85%–95%.
136
+ - **In-Place Tool History Pruning**: Active working memory management preserving raw workspace file blocks while compacting historical command/test outputs across multi-turn reasoning loops.
137
+ - **Session Titling**: `Gemini 3.7 Flash` (Temp 0.7, native `responseSchema`, `MINIMAL` invariant) — automated concise chat session titling.
138
+ - **Semantic Cache Classifier**: `Gemini 3.5 Flash Lite` (Temp 0, native `responseSchema`, `MINIMAL` invariant) intent and topic classification for cache hits.
139
+ - **History Summarizer**: `Gemini 3.7 Flash` (Temp 0.2, `MINIMAL` invariant) — 3-part structured conversation compression preserving recent history.
140
+ - **Commit Generator**: `Gemini 3.5 Flash Lite` (`MINIMAL` invariant) — conventional commit message synthesis.
141
+ - **Micro-Agent Safety Invariants & Normalization**: All internal background micro-agents enforce a hardcoded `MINIMAL` invariant to guarantee zero-latency execution without conversational token burn. The generation pipeline's `normalizeGenerationConfig` automatically strips unsupported internal minimal payloads before dispatching to Google's API, preventing `400 Bad Request` schema errors while ensuring user-selected thinking levels never pollute lightweight background micro-agents.
142
+ - **Subsystem Reasoning Budgets**: Orchestrated subsystems maintain tailored reasoning allocations: **PM Kernel Task Decomposition** operates at `HIGH` reasoning depth for optimal topological dependency sorting; **Investigation & Context Sub-Agents** operate at `MEDIUM` reasoning depth for comprehensive repository reconnaissance; **Syntax Repair Agents** operate at `LOW` reasoning depth for precise AST corrections; and **Execution Sub-Agents / Main Agent** dynamically inherit your configured model thinking level (`LOW` | `MEDIUM` | `HIGH`).
128
143
 
129
144
  > You pay for auxiliary model background AI operations and for your selected model during chat and code execution. Use `/debug` to inspect real-time routing diagnostics.
130
145
 
@@ -136,14 +151,13 @@ Background tasks automatically route to dedicated auxiliary models with native `
136
151
  | --------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |
137
152
  | `/config-key` | Configure custom Google AI Studio API key (BYOK mode) |
138
153
  | `/profile` | View, inspect, delete, or reset global adaptive persona memory and AI side-notes |
139
- | `/models` | Hot-swap the active model |
140
- | `/plan` | Toggle plan mode to review implementation strategies |
154
+ | `/models` | Hot-swap the active model or configure its native reasoning thinking level (`Low`, `Medium`, `High`) |
141
155
  | `/paste` | Multi-line input mode (cancel with Ctrl+C) |
142
156
  | `/clear` | Clear conversation history |
143
157
  | `/debug` | Expose internal agent diagnostics |
144
158
  | `/auto-approve` | Toggle skipping confirmation prompts for commands |
145
159
  | `/sub-agents` | Toggle the MMAAK Engine for parallel investigation and execution (concurrency limited to 2) |
146
- | `/stats` | View session and all-time statistics, plus configurations |
160
+ | `/stats` | View session and all-time statistics, token telemetry, active model settings, and live thinking level runtime telemetry |
147
161
  | `/commit` | Generate a conventional commit message from your diff |
148
162
  | `/revert` | Undo changes from the last turn, or toggle the revert logger |
149
163
  | `/chats` | View, resume, rename, or delete previous chat sessions (with centralized token telemetry, Git branch, auto-approve status, and sub-agent state) |
@@ -152,6 +166,54 @@ Background tasks automatically route to dedicated auxiliary models with native `
152
166
 
153
167
  ---
154
168
 
169
+ ## 🏷️ @ Context Mentions & Interactive Autocomplete
170
+
171
+ Minovative Mind CLI features real-time, interactive **@ Context Mentions** directly in your terminal prompt. Type `@` anywhere while writing a prompt to trigger fuzzy-filtered autocomplete and inject targeted codebase context, AST symbols, Git status/diffs, diagnostics, or cross-workspace files directly into the model's reasoning loop without manual copy-pasting or extra discovery tool turns.
172
+
173
+ ### Interactive Autocomplete & Keyboard Navigation
174
+
175
+ When typing `@`, the interactive terminal autocomplete popup immediately renders:
176
+ - **10-Option Pagination**: Displays up to 10 ranked suggestions per page with dynamic page indexing `(1/10)`.
177
+ - **Cyan Navigation Helper**: Highlights the action footer in light blue (`Tab to insert • ↑/↓ navigate • Esc dismiss`) for clear guidance.
178
+ - **Keyboard Controls**:
179
+ - `↑` / `↓` (Up / Down Arrows): Cycle smoothly through ranked suggestions with automatic window scrolling.
180
+ - `Tab` or `Enter`: Select and insert the highlighted mention directly at the cursor.
181
+ - `Esc`: Dismiss the autocomplete dropdown.
182
+ - `Backspace` / Alphanumeric keys: Filter suggestions in real-time with fuzzy matching.
183
+
184
+ ### Supported Mention Types
185
+
186
+ | Mention Syntax | Category Badge | Type | What it Resolves & Injects |
187
+ | :--- | :--- | :--- | :--- |
188
+ | `@<path>` or `@file:<path>` | `[file]` | **File** | Injects the complete content of a workspace file (e.g. `@src/index.ts` or `@file:package.json`). |
189
+ | `@<path>:<start>-<end>` | `[lines]` | **Line Range Slicing** | Surgically slices and injects only the specified line numbers (e.g. `@src/utils/config.ts:10-50`), saving tokens. |
190
+ | `@symbol:<name>` or `@#<name>` | `[sym]` | **AST Symbol** | Injects exact definitions of functions, classes, interfaces, types, methods, or structs (e.g. `@symbol:getUser` or `@#AuthService`) using polyglot AST extraction. |
191
+ | `@symbol:<path>:<name>` | `[sym]` | **Scoped Symbol** | Injects a specific symbol definition directly from a designated source file (e.g. `@symbol:src/services/auth.ts:validateToken`). |
192
+ | `@git:diff` or `@diff` | `[git]` | **Git Diff** | Injects the active unstaged working tree diff. |
193
+ | `@git:staged` | `[git]` | **Git Staged** | Injects currently staged git changes (`git diff --staged`). |
194
+ | `@git:status` | `[git]` | **Git Status** | Injects the current branch state and working tree status (`git status --short`). |
195
+ | `@git:branch` | `[git]` | **Git Branch** | Injects the current active Git branch and upstream tracking info. |
196
+ | `@git:log` | `[git]` | **Git Commit Log** | Injects the recent commit history (last 10 commits with hashes, authors, and messages). |
197
+ | `@diagnostics` / `@problems` / `@errors` | `[diag]` / `[prob]` | **Diagnostics** | Injects active compiler, linter, or syntax error diagnostics. |
198
+ | `@terminal` / `@console` | `[term]` | **Terminal Context** | Injects recent terminal environment context, shell environment, and command execution state. |
199
+ | `@<alias>/<path>` | `[ws]` | **Cross-Workspace File** | Injects file contents from registered external workspaces (e.g. `@backend/src/routes.ts` or `@frontend/src/App.tsx`). |
200
+ | `@<alias>` | `[ws]` | **Workspace Summary** | Injects configuration, manifest overview, and path details for a registered external workspace. |
201
+
202
+ ### Visual Terminal Indicators & Status Tracking
203
+
204
+ When a prompt with `@` context mentions is submitted, the CLI provides real-time, high-contrast visual confirmation indicators in the terminal:
205
+ - **Success Indicators (`✔`)**: High-contrast green checkmark with dim status summary confirming successful extraction (e.g. `✔ Context @src/index.ts:1-25 (lines 1-25, 420 chars)`, `✔ Context @symbol:startServer (src/index.ts, 12 lines)`, `✔ Context @git:status (short status, clean)`, `✔ Context @diagnostics (syntax scan clean)`, `✔ Context @terminal (Darwin arm64, node v20.x)`, `✔ Context @backend (external workspace)`).
206
+ - **Failure Indicators (`✖`)**: Clear red indicator with explicit error reasoning when resolution fails (e.g. `✖ Context @missing.ts (File does not exist)`, `✖ Context @symbol:unknownFunc (Could not find declaration for symbol)`).
207
+ - **Structured Metadata Status Tracking**: Every resolved mention produces a rich `metadata` envelope (capturing line counts, char counts, symbol kind, git diff stats, and syntax scan metrics) powering both visual indicators and token-budgeted prompt injection.
208
+
209
+ ### Context Resolution & Safety Architecture
210
+
211
+ - **Token Budgeting & Safety Allocation**: All parsed mentions are resolved into structured XML blocks (`<context_mentions>`) wrapped in CDATA sections with strict token budgeting and prompt injection defenses.
212
+ - **Read-Guard Pre-Registration (`fileReadGuard`)**: Files referenced via `@` mentions are automatically registered in the system's `fileReadGuard`. This allows the AI agent to immediately invoke file modifications (`modify_file`, `write_file`) without redundant `read_file` roundtrips, accelerating execution speed.
213
+ - **Multi-Workspace Path Resolution**: Automatically validates boundaries across registered workspaces via `resolveAndValidateMultiWorkspacePath`, preventing directory traversal escapes (`../`).
214
+
215
+ ---
216
+
155
217
  ## 🌐 Multi-Workspace, Sub-Path Focusing & Security Guardrails
156
218
 
157
219
  Minovative Mind CLI doesn't restrict you to a single repository. You can logically group multiple external repositories into **Master Workspaces** (Profiles) containing dedicated **Sub-Workspaces** (mapped to short aliases like `@backend` or `@frontend`).
@@ -165,30 +227,30 @@ Minovative Mind CLI doesn't restrict you to a single repository. You can logical
165
227
 
166
228
  ## 🌐 Supported Languages
167
229
 
168
- Minovative Mind CLI fundamentally supports **ALL programming languages** for chat, code generation, planning, and execution, as it relies on Gemini's vast training data.
169
-
170
- However, the PCV engine features deep, context-aware analysis across **12 major programming language families**. Our core advanced engines—**Smart Dependency Tracing**, **Property-Based & Mutation Verification**, **Performance Auditing** (across 9 language families), and **Ephemeral Analysis Scripts**—provide tailored support depending on the language's syntax and runtime model:
171
-
172
- | Language Family | Supported Extensions | Dependency Tracing | Performance Auditing | Ephemeral Analysis |
173
- | :--------------------------- | :------------------------------------------- | :----------------: | :------------------: | :----------------: |
174
- | **JavaScript / TypeScript** | `.js`, `.jsx`, `.ts`, `.tsx`, `.mjs`, `.cjs` | ✅ | ✅ | ✅ |
175
- | **Python** | `.py`, `.pyw` | ✅ | ✅ | ✅ |
176
- | **Rust** | `.rs` | ✅ | ✅ | ✅ |
177
- | **Go** | `.go` | ✅ | ✅ | ✅ |
178
- | **C / C++** | `.c`, `.h`, `.cpp`, `.hpp`, `.cc`, `.cxx` | ✅ | ✅ | ⚠️ \* |
179
- | **C#** | `.cs` | ✅ | ✅ | ❌ |
180
- | **Java / Kotlin** | `.java`, `.kt`, `.kts` | ✅ | ✅ | ⚠️ \* |
181
- | **PHP** | `.php` | ✅ | ✅ | ❌ |
182
- | **Ruby** | `.rb` | ✅ | ✅ | ❌ |
183
- | **CSS / SCSS / SASS / LESS** | `.css`, `.scss`, `.sass`, `.less` | ✅ | ❌ | ❌ |
184
- | **Swift** | `.swift` | ✅ | ❌ | ❌ |
185
- | **Dart** | `.dart` | ✅ | ❌ | ❌ |
230
+ Minovative Mind CLI fundamentally supports **ALL programming languages** for chat, code generation, and execution, as it relies on Gemini's vast training data.
231
+
232
+ However, the PCV engine features deep, context-aware analysis across **12 major programming language families**. Our core advanced engines—**Smart Dependency Tracing**, **AST Symbol Extraction & Chunking**, **Property-Based & Mutation Verification**, **Performance Auditing** (across 9 language families), and **Ephemeral Analysis Scripts**—provide tailored support depending on the language's syntax and runtime model:
233
+
234
+ | Language Family | Supported Extensions | Dependency Tracing | AST Extraction | Performance Auditing | Ephemeral Analysis |
235
+ | :--------------------------- | :------------------------------------------- | :----------------: | :------------: | :------------------: | :----------------: |
236
+ | **JavaScript / TypeScript** | `.js`, `.jsx`, `.ts`, `.tsx`, `.mjs`, `.cjs` | ✅ | ✅ | ✅ | ✅ |
237
+ | **Python** | `.py`, `.pyw` | ✅ | ✅ | ✅ | ✅ |
238
+ | **Rust** | `.rs` | ✅ | ✅ | ✅ | ✅ |
239
+ | **Go** | `.go` | ✅ | ✅ | ✅ | ✅ |
240
+ | **C / C++** | `.c`, `.h`, `.cpp`, `.hpp`, `.cc`, `.cxx` | ✅ | ✅ | ✅ | ⚠️ \* |
241
+ | **C#** | `.cs` | ✅ | ✅ | ✅ | ❌ |
242
+ | **Java / Kotlin** | `.java`, `.kt`, `.kts` | ✅ | ✅ | ✅ | ⚠️ \* |
243
+ | **PHP** | `.php` | ✅ | ✅ | ✅ | ❌ |
244
+ | **Ruby** | `.rb` | ✅ | ✅ | ✅ | ❌ |
245
+ | **CSS / SCSS / SASS / LESS** | `.css`, `.scss`, `.sass`, `.less` | ✅ | ❌ | ❌ | ❌ |
246
+ | **Swift** | `.swift` | ✅ | ✅ | ❌ | ❌ |
247
+ | **Dart** | `.dart` | ✅ | ✅ | ❌ | ❌ |
186
248
 
187
249
  _⚠️\*Support is limited or requires custom local system tooling/environment setup._
188
250
 
189
251
  ### Why do some features only support specific languages?
190
252
 
191
- 1. **Dependency Tracing:** Fully supported across language families. It uses lightning-fast static regex pattern matching to resolve local import structures and determine the "blast radius" of code changes without requiring local compilations.
253
+ 1. **Dependency Tracing & AST Symbol Extraction:** Fully supported across major language families. It uses lightning-fast static regex pattern matching and AST outline parsers to resolve local import structures, extract targeted symbol definitions (`targetElements`), and determine the "blast radius" of code changes without requiring heavy compilations.
192
254
  2. **Performance Auditing:** Executed natively across 9 major language families (JavaScript/TypeScript, Python, Go, Rust, PHP, C#, Java, C/C++, and Ruby). It uses zero-dependency, ultra-fast (<50ms) language-aware regex heuristics with comment/string stripping and line-preserving offset tracking to detect severe runtime anti-patterns (such as unbounded loops, synchronous I/O, chained array allocations, unnecessary allocations, and unclosed resources).
193
255
  3. **Ephemeral Analysis & Property-Based Probing:** Defaults to Node.js as a safe baseline, but natively leverages host-installed runtimes (Python, Rust, Go compilers) and standard libraries whenever available in the workspace.
194
256
 
@@ -9,7 +9,7 @@ import { Command } from '@oclif/core';
9
9
  export default class DefaultCommand extends Command {
10
10
  /**
11
11
  * The description displayed in the CLI help output.
12
- * Details all supported slash commands (/config-key, /profile, /paste, /plan, /clear, /models,
12
+ * Details all supported slash commands (/config-key, /profile, /paste, /clear, /models,
13
13
  * /debug, /auto-approve, /sub-agents, /stats, /revert, /chats, /workspaces, /commit)
14
14
  * along with interactive chat controls.
15
15
  */
@@ -18,7 +18,7 @@ import { optimizeWorkspaceIDESettings } from '../services/ideOptimization.js';
18
18
  export default class DefaultCommand extends Command {
19
19
  /**
20
20
  * The description displayed in the CLI help output.
21
- * Details all supported slash commands (/config-key, /profile, /paste, /plan, /clear, /models,
21
+ * Details all supported slash commands (/config-key, /profile, /paste, /clear, /models,
22
22
  * /debug, /auto-approve, /sub-agents, /stats, /revert, /chats, /workspaces, /commit)
23
23
  * along with interactive chat controls.
24
24
  */
@@ -28,7 +28,6 @@ Inside the chat session, you can use the following commands in the slash menu:
28
28
  /config-key - BYOK — Configure, clear, or view status of custom Google AI Studio API key
29
29
  /profile - View, inspect, delete, or reset global adaptive persona memory and AI side-notes
30
30
  /paste - Enter multi-line paste mode for long code snippets and prompts
31
- /plan - Toggle plan mode to review step-by-step implementation strategies
32
31
  /clear - Clear conversation history, reset terminal screen, and display logo
33
32
  /models - Select or hot-swap the active Gemini model for the session
34
33
  /debug - Toggle internal agent telemetry, diagnostic logging, and execution state
@@ -17,8 +17,8 @@ import { ProxyClient, getAndResetTurnUsage } from '../proxyClient.js';
17
17
  import { checkByokSubscription } from '../auth.js';
18
18
  import { GEMINI_MODELS, isByokEnabled } from '../../utils/config.js';
19
19
  import { loadCredentials, updateCredentialField } from '../../utils/credentialStore.js';
20
- import { getGlobalActiveModel, setGlobalActiveModel, ProxyChatSession } from '../ai.js';
21
- import { loadUserProfile, deleteSideNote, clearUserProfile, getUserProfilePath, } from '../userProfileService.js';
20
+ import { getGlobalActiveModel, setGlobalActiveModel, getModelThinkingLevel, setModelThinkingLevel, ProxyChatSession } from '../ai.js';
21
+ import { loadUserProfile, deleteSideNote, clearUserProfile, getUserProfilePath } from '../userProfileService.js';
22
22
  /**
23
23
  * @file slashCommands.ts
24
24
  * @description Interactive slash command handler module for Minovative Mind CLI.
@@ -27,7 +27,6 @@ import { loadUserProfile, deleteSideNote, clearUserProfile, getUserProfilePath,
27
27
  * - `/config-key` : Configure, validate, toggle, or clear Bring Your Own Key (BYOK) Google AI Studio API credentials.
28
28
  * - `/profile` : View, inspect, delete, or reset global adaptive persona memory and AI side-notes.
29
29
  * - `/paste` : Enter multi-line paste mode using EOF tracking (`Ctrl+D` submission).
30
- * - `/plan` : Toggle AI step-by-step implementation planning mode.
31
30
  * - `/clear` : Clear conversation history, wipe terminal screen, and reset CLI header.
32
31
  * - `/models` : Hot-swap the active generative AI model (Gemini 3.1 Pro, Gemini 3.7 Flash, Gemini 3.6 Flash, Gemini 3.5 Flash-Lite, Auto routing).
33
32
  * - `/debug` : Toggle internal agent telemetry and diagnostic logging.
@@ -75,19 +74,6 @@ export async function handleSlashCommand(command, context) {
75
74
  return { shouldContinue: true, isRawPasteMode: false };
76
75
  }
77
76
  }
78
- /**
79
- * `/plan` - Toggles step-by-step AI implementation planning mode.
80
- */
81
- if (lowerCommand === '/plan') {
82
- const newPlanMode = !context.isPlanMode;
83
- if (newPlanMode) {
84
- p.log.info(pc.cyan('Plan mode enabled. The AI will formulate a step-by-step plan instead of executing code. Type /plan again to exit.'));
85
- }
86
- else {
87
- p.log.info(pc.cyan('Plan mode disabled. Returning to normal execution.'));
88
- }
89
- return { shouldContinue: true, isPlanModeOverride: newPlanMode };
90
- }
91
77
  /**
92
78
  * `/clear` - Resets chat conversation history, clears the terminal screen, and reprints CLI header.
93
79
  */
@@ -153,7 +139,41 @@ export async function handleSlashCommand(command, context) {
153
139
  if (!p.isCancel(selectedModel)) {
154
140
  chat.setModel(selectedModel);
155
141
  setGlobalActiveModel(selectedModel);
156
- p.log.success(`Model successfully switched to ${pc.cyan(selectedModel)}`);
142
+ const activeModelThinking = getModelThinkingLevel(selectedModel);
143
+ const selectedThinking = await p['select']({
144
+ message: `Configure Thinking Level for ${pc.cyan(selectedModel)} (Current: ${pc.cyan(activeModelThinking)})`,
145
+ initialValue: activeModelThinking,
146
+ options: [
147
+ {
148
+ value: 'LOW',
149
+ label: 'Low',
150
+ hint: 'Quick reasoning with low token overhead',
151
+ },
152
+ {
153
+ value: 'MEDIUM',
154
+ label: 'Medium',
155
+ hint: 'Balanced reasoning for everyday coding and debugging',
156
+ },
157
+ {
158
+ value: 'HIGH',
159
+ label: 'High',
160
+ hint: 'Deepest reasoning for complex architectural tasks',
161
+ },
162
+ ],
163
+ });
164
+ if (!p.isCancel(selectedThinking)) {
165
+ setModelThinkingLevel(selectedModel, selectedThinking);
166
+ if (typeof chat.setThinkingLevel === 'function') {
167
+ chat.setThinkingLevel(selectedThinking);
168
+ }
169
+ p.log.success(`Model successfully switched to ${pc.cyan(selectedModel)} with thinking level ${pc.cyan(selectedThinking)}`);
170
+ }
171
+ else {
172
+ if (typeof chat.setThinkingLevel === 'function') {
173
+ chat.setThinkingLevel(activeModelThinking);
174
+ }
175
+ p.log.success(`Model successfully switched to ${pc.cyan(selectedModel)}`);
176
+ }
157
177
  }
158
178
  return { shouldContinue: true };
159
179
  }
@@ -163,7 +183,10 @@ export async function handleSlashCommand(command, context) {
163
183
  if (lowerCommand === '/debug') {
164
184
  const debugMode = toggleDebugMode();
165
185
  if (debugMode) {
166
- p.log.info('Debug mode enabled. Internal logs will now be shown.');
186
+ const currentModel = chat.getModel();
187
+ const currentThinkingLevel = (typeof chat.getThinkingLevel === 'function' ? chat.getThinkingLevel() : undefined) ||
188
+ getModelThinkingLevel(currentModel);
189
+ p.log.info(`Debug mode enabled. Active Model: ${pc.cyan(currentModel)} (thinking: ${pc.cyan(currentThinkingLevel)}). Internal logs will now be shown.`);
167
190
  }
168
191
  else {
169
192
  p.log.info('Debug mode disabled.');
@@ -224,16 +247,17 @@ export async function handleSlashCommand(command, context) {
224
247
  else {
225
248
  displayModel = modelStatsStr || currentModel;
226
249
  }
250
+ const currentThinkingLevel = (typeof chat.getThinkingLevel === 'function' ? chat.getThinkingLevel() : undefined) ||
251
+ getModelThinkingLevel(currentModel);
227
252
  const autoApprove = getApprovalMode() === 'skip-all' ? 'Enabled' : 'Disabled';
228
253
  const subAgents = isSubAgentsEnabled() ? 'Enabled' : 'Disabled';
229
- const planMode = context.isPlanMode ? 'Enabled' : 'Disabled';
230
254
  const byokEnabled = (await isByokEnabled()) ? 'Enabled' : 'Disabled';
231
255
  p.log.step(pc.magenta('📊 Session Statistics & Status'));
232
256
  console.log(pc.dim('----------------------------------------'));
233
257
  console.log(`${pc.bold('AI Model:')} ${pc.cyan(displayModel)}`);
258
+ console.log(`${pc.bold('Thinking Level:')} ${pc.cyan(currentThinkingLevel)}`);
234
259
  console.log(`${pc.bold('Auto-Approve:')} ${autoApprove === 'Enabled' ? pc.green(autoApprove) : pc.yellow(autoApprove)}`);
235
260
  console.log(`${pc.bold('Sub-Agents:')} ${subAgents === 'Enabled' ? pc.green(subAgents) : pc.yellow(subAgents)}`);
236
- console.log(`${pc.bold('Plan Mode:')} ${planMode === 'Enabled' ? pc.green(planMode) : pc.yellow(planMode)}`);
237
261
  console.log(`${pc.bold('BYOK:')} ${byokEnabled === 'Enabled' ? pc.green(byokEnabled) : pc.yellow(byokEnabled)}`);
238
262
  const debugMode = isDebugOn() ? 'Enabled' : 'Disabled';
239
263
  console.log(`${pc.bold('Debug Log:')} ${debugMode === 'Enabled' ? pc.green(debugMode) : pc.yellow(debugMode)}`);
@@ -1040,10 +1064,10 @@ Output ONLY the raw commit message text. Absolutely NO conversational preambles,
1040
1064
 
1041
1065
  Strict Formatting Rules:
1042
1066
  1. First line must follow Conventional Commits format: type(scope): description
1043
- - Allowed types: feat, fix, refactor, test, docs, chore, perf, style
1044
- - Subject line must be in imperative mood (e.g. "add support for...", "fix bug in...") and strictly under 50 characters.
1067
+ - Allowed types: feat, fix, refactor, test, docs, chore, perf, style, etc
1068
+ - Subject line must be in imperative mood (e.g. "added support for...", "fixed bug in...") and strictly under limited characters.
1045
1069
  2. Leave a single blank line after the subject.
1046
- 3. Provide a concise bulleted list (using '-' or '*') explaining the architectural "what" and "why" of the changes based on the provided diff. If diff spans multiple areas, prioritize the primary architectural change.`;
1070
+ 3. Provide a concise bulleted list (using '-' or '*') explaining the architectural "what" and "why" of the changes based on the provided diff.`;
1047
1071
  const commitAgent = new ProxyChatSession(GEMINI_MODELS.FLASH_LITE, commitSystemPrompt, [], {});
1048
1072
  const commitResult = await commitAgent.sendMessage(prompt);
1049
1073
  let commitMsg = commitResult.response.text().trim();
@@ -1,6 +1,7 @@
1
1
  import { ProxyChatSession } from '../ai.js';
2
2
  import { GEMINI_MODELS, MAX_OUTPUT_TOKENS } from '../../utils/config.js';
3
3
  import { localValidate } from '../../utils/localSyntaxValidator.js';
4
+ import { debugLog } from '../../utils/logger.js';
4
5
  /**
5
6
  * Extracts a numeric character position from a syntax error message if present.
6
7
  */
@@ -100,6 +101,9 @@ Your job is to fix syntax errors in source code snippets extracted from large fi
100
101
  const snippetChat = new ProxyChatSession(model, snippetSystemInstruction, [], {
101
102
  maxOutputTokens: MAX_OUTPUT_TOKENS,
102
103
  temperature: 0.1,
104
+ thinkingConfig: {
105
+ thinkingLevel: 'LOW',
106
+ },
103
107
  });
104
108
  const snippetPrompt = `File Path: ${filePath}
105
109
  Line Range: Lines ${win.startLine} to ${win.endLine} (Error near position ${errorPos})
@@ -109,6 +113,7 @@ Code Snippet to Repair:
109
113
  ${win.snippet}
110
114
 
111
115
  Please fix the syntax error in the snippet above and return ONLY the raw repaired code snippet:`;
116
+ debugLog(`Attempting AI snippet syntax repair for ${filePath} with model ${model} (thinking: LOW)...`);
112
117
  try {
113
118
  const result = await snippetChat.sendMessage(snippetPrompt, undefined, abortSignal);
114
119
  const repairedSnippet = cleanOutput(result.response.text());
@@ -145,6 +150,9 @@ Your sole job is to read source code and verify or repair its syntax.
145
150
  const fullChat = new ProxyChatSession(model, fullSystemInstruction, [], {
146
151
  maxOutputTokens: MAX_OUTPUT_TOKENS,
147
152
  temperature: 0.1,
153
+ thinkingConfig: {
154
+ thinkingLevel: 'LOW',
155
+ },
148
156
  });
149
157
  const fullPrompt = `File Path: ${filePath}
150
158
 
@@ -153,6 +161,7 @@ ${effectiveError}
153
161
 
154
162
  Content:
155
163
  ${content}`;
164
+ debugLog(`Attempting AI full syntax repair for ${filePath} with model ${model} (thinking: LOW)...`);
156
165
  try {
157
166
  const result = await fullChat.sendMessage(fullPrompt, undefined, abortSignal);
158
167
  const output = cleanOutput(result.response.text());
@@ -215,6 +224,9 @@ Your primary job is to perform fuzzy search matching and replacement on source c
215
224
  const chat = new ProxyChatSession(model, systemInstruction, [], {
216
225
  maxOutputTokens: MAX_OUTPUT_TOKENS,
217
226
  temperature: 0.1,
227
+ thinkingConfig: {
228
+ thinkingLevel: 'LOW',
229
+ },
218
230
  });
219
231
  const prompt = `File Path: ${filePath}
220
232
 
@@ -226,6 +238,7 @@ ${replaceContent}
226
238
 
227
239
  File Content:
228
240
  ${fileContent}`;
241
+ debugLog(`Attempting AI fuzzy search and replace for ${filePath} with model ${model} (thinking: LOW)...`);
229
242
  try {
230
243
  const response = await chat.sendMessage(prompt, undefined, options.abortSignal);
231
244
  const rawOutput = response.response.text();
@@ -21,8 +21,6 @@ export interface SlashCommandContext {
21
21
  version: string;
22
22
  /** Flag indicating whether raw paste mode is currently enabled. */
23
23
  isRawPasteMode: boolean;
24
- /** Flag indicating whether step-by-step implementation planning mode is currently active. */
25
- isPlanMode: boolean;
26
24
  /** Session state tracking tokens, credits, usage metadata, and model turn counts. */
27
25
  chatSessionState: {
28
26
  id: string;
@@ -46,6 +44,4 @@ export interface SlashCommandResult {
46
44
  userInputOverride?: string;
47
45
  /** Optional override flag to enable or disable raw paste mode. */
48
46
  isRawPasteMode?: boolean;
49
- /** Optional override flag to enable or disable implementation planning mode. */
50
- isPlanModeOverride?: boolean;
51
47
  }
@@ -87,7 +87,7 @@ export declare function consumeSkipOnce(): void;
87
87
  * @param targetElements - Optional array of specific symbol or function names to extract.
88
88
  * @returns A promise resolving to a {@link ToolResult} containing the file content or error details.
89
89
  */
90
- export declare function readFile(workspaceRoot: string, filePath: string, startLine?: number, endLine?: number, targetElements?: string[]): Promise<ToolResult>;
90
+ export declare function readFile(workspaceRoot: string, filePath: string, startLine?: number, endLine?: number, targetElements?: string[], outlineOnly?: boolean): Promise<ToolResult>;
91
91
  /**
92
92
  * Creates a new file or completely overwrites an existing file with the provided content,
93
93
  * performing local syntax validation and iterative AI syntax auto-correction if validation fails.
@@ -570,7 +570,7 @@ async function getIgnoredPaths(workspaceRoot) {
570
570
  * @param targetElements - Optional array of specific symbol or function names to extract.
571
571
  * @returns A promise resolving to a {@link ToolResult} containing the file content or error details.
572
572
  */
573
- export async function readFile(workspaceRoot, filePath, startLine, endLine, targetElements) {
573
+ export async function readFile(workspaceRoot, filePath, startLine, endLine, targetElements, outlineOnly) {
574
574
  try {
575
575
  const absPath = resolveAndValidatePath(workspaceRoot, filePath);
576
576
  // Check if file is explicitly ignored
@@ -1809,7 +1809,7 @@ export async function executeTool(workspaceRoot, toolName, args, abortSignal) {
1809
1809
  break;
1810
1810
  }
1811
1811
  case 'read_file':
1812
- result = await readFile(effectiveRoot, resolvedArgs.filePath, resolvedArgs.startLine, resolvedArgs.endLine, resolvedArgs.targetElements);
1812
+ result = await readFile(effectiveRoot, resolvedArgs.filePath, resolvedArgs.startLine, resolvedArgs.endLine, resolvedArgs.targetElements, resolvedArgs.outlineOnly);
1813
1813
  // Record successful reads so the file-read guard allows subsequent modify_file calls
1814
1814
  if (!result.error) {
1815
1815
  recordFileRead(resolvedArgs.filePath);
@@ -92,9 +92,6 @@ export declare function startAgentLoop(workspaceRoot: string, version: string):
92
92
  * @param chat - The active ProxyChatSession instance maintaining message history.
93
93
  * @param inputHandler - The AsyncInputHandler instance for managing keyboard interrupts and queueing.
94
94
  * @param chatSessionState - Object tracking session statistics, token counts, credit usage, and model metrics.
95
- * @param isPlanMode - Flag indicating whether plan mode (read-only architecture planning) is active.
96
- * @param cachedContextResult - Optional pre-gathered context result to bypass duplicate investigation turns.
97
- * @returns An object containing optional plan mode actions or context results, or void.
98
95
  */
99
96
  export declare function executeSingleTurn(workspaceRoot: string, userInput: string, chat: any, inputHandler: AsyncInputHandler, chatSessionState: {
100
97
  id: string;
@@ -106,10 +103,7 @@ export declare function executeSingleTurn(workspaceRoot: string, userInput: stri
106
103
  latestUsageMetadata?: any;
107
104
  previousUsageMetadata?: any;
108
105
  modelUsageCounts?: Record<string, number>;
109
- }, isPlanMode: boolean, cachedContextResult?: any): Promise<{
110
- planModeReturn?: string;
111
- contextResult?: any;
112
- } | void>;
106
+ }): Promise<void>;
113
107
  /**
114
108
  * Raw chat history entry count threshold to trigger chat history summarization.
115
109
  * 2 entries = 1 complete conversational user/model turn.