Skip to content

Enhance application features, indexing, and task management - #20

Merged
codewithshinde merged 68 commits into
mainfrom
v3.8.x
Aug 29, 2026
Merged

Enhance application features, indexing, and task management#20
codewithshinde merged 68 commits into
mainfrom
v3.8.x

Conversation

@codewithshinde

Copy link
Copy Markdown
Member

This pull request introduces significant improvements to the Mitii CLI, focusing on a much more robust and user-friendly onboarding experience, enhanced command-line argument parsing, and expanded documentation. The CLI now supports a guided setup command, improved session UI, and new options for configuring execution policy and model providers. The documentation has been updated to match these changes, offering clearer instructions for new users and advanced configuration options.

The most important changes are:

CLI Usability and Onboarding Improvements:

  • Added a new setup command to the CLI for interactive or flag-driven provider/model configuration, including support for writing config files, showing current settings, and probing the provider (apps/cli/src/cli.ts, apps/cli/README.md). [1] Ff313013L145R145, Ff313013L274R274, [2] [3]
  • Introduced a session banner and improved session header output to guide users, including hints for first-time setup and clear mode indicators (apps/cli/src/banner.ts).

Command-line Argument Parsing and Validation:

  • Refactored and expanded CLI argument parsing to support new options such as --mode, --loop-policy-json, --no-loop-policy, and all setup-related flags, with strict error handling for unknown or malformed options (apps/cli/src/cli.ts). [1] [2] [3] [4]

Documentation Updates:

  • Updated README.md and apps/cli/README.md with improved quick start instructions, detailed setup steps for new users, environment variable guidance, troubleshooting, and advanced configuration for loop/stall policy and model providers (README.md, apps/cli/README.md). [1] [2] [3] [4] [5] [6]

Model and Provider Support:

  • Added native Anthropic (Claude) and Gemini adapter support, and clarified OpenAI-compatible provider configuration in both code and documentation (README.md, apps/cli/README.md). [1] [2]

Versioning and Dependency Updates:

  • Bumped the CLI version to 2.8.69 and added optional dependencies for onnxruntime-node and onnxruntime-web (apps/cli/package.json, README.md). [1] [2] [3]

These changes collectively make the CLI easier to use for new and advanced users, improve error handling, and set the foundation for more extensible and maintainable CLI development.

codewithshinde and others added 30 commits August 1, 2026 17:57
…ication

- Implemented semantic index enablement logic in CLI and VS Code settings.
- Added tests for semantic index settings and enablement.
- Improved approval handling in the agent engine, allowing for approval mode overrides.
- Updated UI components to display command and arguments for approvals.
- Refactored related code for better clarity and maintainability.
- Updated core system prompt with additional guidelines for handling user corrections and repository evidence.
- Introduced markers for user messages and host context in the InjectionBoundary module to improve context separation.
- Added tests to ensure proper wrapping of host-injected context as untrusted evidence.
- Enhanced context candidate preparation to exclude specific file names and paths, including logs and package manager artifacts.
- Implemented a new WorkspaceIgnorePolicy to ignore certain files and directories, with corresponding tests.
- Improved intent routing to skip LLM calls for explicit intents and preserve task hints from LLM classifications.
- Added support for merging LLM task hints into deterministic analysis in the TaskAnalyzer.
- Updated skills selection logic to soft-boost applicable skills based on recommended skill tags.
- Added tests to validate the behavior of skills selection with respect to recommended skill tags.
- Introduced a new model selection dropdown in the App component with custom model support.
- Added event listeners for closing the model menu on outside clicks and Escape key press.
- Updated styles for the new dropdown to improve user experience.
- Refactored TokenMeter to provide clearer token usage information and updated labels.
- Implemented context selection budget scaling based on model context window in the repository context module.
- Added tests for new functionality including context selection budget derivation and session log behavior for large context models.
- Updated various constants and policies related to output token limits and repository context handling.
…ning actions

- Introduced tests for `looksLikeWorkspaceBugReport` to validate various scenarios including exact matches, typos, and failure language.
- Enhanced `DraftPlan` to improve objective building logic, ensuring better handling of requested outcomes and target summaries.
- Updated `RulePatterns` to include additional error types and failure language for intent classification.
- Added functions to extract current user requests while ignoring prior-turn context in `extractPrimaryUserMessage`.
- Implemented new target extraction methods in `TaskTargetExtractor` for handling workspace paths and error symbols.
- Enhanced `SkillsPipeline` to prevent applying intent-matched skills on incompatible routes.
- Created tests for `clearPendingPlan` and `planViewFromArtifact` to ensure proper functionality and data handling.
- Added session log tests to verify metadata persistence without full plan dumping.
- Implemented DotnetProjectReader for .NET project files (.csproj, .fsproj, .vbproj).
- Implemented GemfileReader for Ruby Gemfiles.
- Implemented PyprojectReader for Python pyproject.toml files.
- Added corresponding index files for each reader to facilitate exports.
- Updated the main index file to include new readers.
- Enhanced vitest configuration to include tests for the new readers.
- Updated pnpm-lock.yaml to include new dependencies: fast-xml-parser and smol-toml.
- Introduced unit tests for RepoGraphBuilder to validate call edges between caller and callee symbols.
- Added tests for TextIndexIdentifierFts to ensure camelCase queries match snake_case and PascalCase identifiers.
- Enhanced SqliteCodeIndexAdapter to include reference kind in the references.
- Updated schema and constants for text indexing to support identifier-aware full-text search.
- Implemented logic to handle identifier FTS migration and updated related SQL triggers.
- Improved text query normalization to split code identifiers for better search results.
- Adjusted RepoGraphBuilder to track call edges and updated statistics accordingly.
- Refactored text index writer to handle FTS document management more effectively.
…sitory state

- Improved path validation in `deriveContextFocusFromUnderstanding` to reject absolute paths and ensure workspace-relative paths.
- Added new functions for splitting and expanding code identifiers in `codeIdentifiers.ts`, enhancing identifier handling.
- Updated `TextQueryNormalizer` and `SqliteTextIndexWriter` to utilize new identifier expansion functions.
- Introduced `REPOSITORY_INDEX_FORMAT` to manage index format upgrades and ensure compatibility with text-index schema changes.
- Enhanced tests for `RepoGraphRetrievalSource` to ensure stability with dense call graphs.
- Added a script for staging Tree-sitter WASM grammars for improved language support.
- Updated README files to reflect changes in indexing and context handling.
… contracts, and pipeline

- Added constants for code navigation operations, statuses, providers, and error codes.
- Implemented CodeNavigationError class for structured error handling.
- Created input and output schemas for code navigation requests and responses.
- Developed CodeNavigationPipeline to handle navigation logic using injected ports.
- Added default configurations for maximum locations and hover character limits.
- Implemented tests for CodeNavigationPipeline to ensure correct behavior and error handling.
- Updated architecture tests to include new code navigation module.
…ved import resolution

- Added support for `anchorFilePaths` in hybrid retrieval requests to allow for additional file-node anchors.
- Updated the retrieval pipeline to collect and forward editor and git references as graph anchors.
- Introduced a new `InRepoLanguageImportResolver` to handle non-relative import specifiers for various languages.
- Enhanced the `CodeIndexImportResolver` to utilize the new language resolver for improved import resolution.
- Added tests for the new functionality, ensuring correct behavior for various import scenarios and anchor handling.
…ace schema

- Introduced a new reason code "grant_narrowed" to indicate when a grant has been narrowed.
- Added decisionTraceSchema to capture detailed decision-making information including route priority, grant profile, mutation profile, and signals used.
- Updated ExecutionDecision schema to include an optional trace field.
- Enhanced DecisionPolicyPipeline to build and include decision traces in execution decisions.
- Implemented logic to narrow tool grants based on discovered paths and residual risk, adjusting approval modes and mutation budgets accordingly.
- Updated tests to validate new functionality and ensure correct behavior of the narrowing process.

feat(skills): enhance skills catalog with resource management

- Added support for skill resources in the skills catalog, allowing skills to define associated resources.
- Updated the SkillsPipeline to hydrate selected skills with their resource content.
- Modified the scoring and matching logic to account for new skill metadata, including languages and project kinds.
- Increased the default token budget for skills to accommodate the new resource management features.
- Enhanced tests to verify the correct hydration of skill bodies and resource handling.
- Implemented AnthropicLlmPort and GeminiLlmPort adapters for model gateway.
- Updated constants to include new model IDs and defaults for Anthropic and Gemini.
- Refactored OpenAiCompatibleLlmPort to utilize shared HTTP utility functions for retries and error handling.
- Added tests for Anthropic and Gemini LLM ports to ensure correct functionality and error handling.
- Updated model provider support matrix to reflect new adapters.
- Enhanced architecture tests to include new LLM ports in module boundaries.
… fields

- Added profile management features including profile switching and creation.
- Introduced a new NumberField component for numeric inputs with validation.
- Updated SettingsPanel to utilize new icons and improved layout for better UX.
- Refactored settings saving logic and integrated profile data into the settings state.
- Enhanced CSS styles for better responsiveness and visual consistency.
- Add `deriveTaskListFromPlan` function to create a task list from a plan artifact.
- Introduce `serializeTaskListMarkdown` and related functions for task list serialization.
- Create `TaskListPipeline` class to manage task list operations including apply and derive.
- Define schemas and types for task list operations, including input and output contracts.
- Implement error handling with `TaskListError` for better error reporting.
- Add constants and defaults for task list management.
- Create unit tests for task list functionalities, ensuring proper behavior and validation.
- Update architecture tests to include task-list module boundaries.
- Add integration tests for task view mapping from task lists.
…reakdown methodology

feat(planning): update PlanningPipeline tests for request-specific PlanArtifact drafting

feat(prompt-construction): add analyze_change_impact tool guidance in BuildSystemAndConversation

docs(task-list): clarify task list behavior and update guidance on task management

fix(task-list): ensure sourceRef is preserved through task list updates

feat(task-list): enhance task list derivation to prioritize executable phases and activate first task

test(task-list): add tests for task list derivation and ensure correct task activation

test(task-list): validate serialization of task list and guidance messages

chore(tests): include change-impact module in vitest configuration and architecture tests
- Introduced  function to extract language and project kind tags from host projects and paths, improving skill matching capabilities.
- Updated  to utilize the new evidence derivation, enriching the skill evidence with derived languages and project kinds.
- Implemented a structural shadow authorizer in the tool runtime, allowing for detailed audit and decision-making processes regarding tool grants.
- Enhanced the  function to incorporate shadow authorization checks, enabling more robust tool permission handling.
- Added tests for the new skill evidence derivation and shadow authorization functionalities to ensure correctness and reliability.
- Updated documentation to reflect changes in decision-making processes and the introduction of shadow authorization features.
Keep both selectedSkillIds and taskListRef on the agent tool loop, and take remote package versions 2.8.25.

Co-authored-by: Cursor <cursoragent@cursor.com>
…lity and structure

feat(skills): update README to clarify module responsibilities and structure

feat(task-list): improve README to define module functionality and provide example flows

fix(task-list): refine task list derivation logic to prefer concrete file-scoped steps

fix(task-list): update serialization logic to clarify handling of process labels

feat(task-list): add support for common tool name misspellings in constants

fix(task-list): enhance policy to prevent auto-advancing on non-concrete tasks

test(task-list): add tests for handling package-wide objectives and preferred work phases

feat(verification): expand README to detail module functionality and provide example flows
- Introduced `taskListPurposeSchema` to define purposes for task lists.
- Updated `TaskList` type to include an optional `purpose` field.
- Enhanced task list creation and derivation functions to support new purpose.
- Modified tests to validate the new purpose functionality.

feat(verification): implement repo build state capture and comparison

- Added `captureRepoBuildState` and `compareRepoBuildStates` functions.
- Created schemas for `RepoBuildState` and `RepoBuildStateComparison`.
- Updated `VerificationPipeline` to include methods for capturing and comparing build states.
- Enhanced tests to validate the new functionality for build state management.

fix(vscode): improve handling of pending plan strategies

- Updated `clearPendingPlan` and related functions to manage `pendingPlanStrategy`.
- Ensured that stale shapes are dropped on reload.
- Added tests to verify the persistence and handling of pending plan strategies.

chore(tests): refactor and add tests for new features

- Added unit tests for `normalizeDiagnostics` to ensure correct path resolution.
- Enhanced `VerificationPipeline` tests to cover new build state functionality.
- Removed obsolete `taskView.test.ts` as it was no longer relevant.
…indows

- Introduced a new module for managing window budgets, allowing proportional token allocation based on context window size.
- Added `deriveWindowPolicy` function to calculate output and input token distribution.
- Created schemas for input and output validation using Zod.
- Implemented default policies and error handling for invalid inputs.
- Updated existing modules to utilize the new window budget policies, including planning, verification, and prompt construction.
- Added comprehensive tests to ensure correct behavior of the window budget calculations and policies.
…ummaries

- Added `BuildVerificationRecord` and `BuildVerificationUserSummary` actions to create and summarize verification records.
- Implemented `FileVerificationRecordStore` and `InMemoryVerificationRecordStore` for persistent and in-memory storage of verification records.
- Enhanced `VerificationPipeline` to support record persistence and loading.
- Updated schemas and contracts to include verification record structures and statuses.
- Introduced new constants for verification record schema version and reason codes.
- Added tests for verification record creation, persistence, and user summary generation.
- Updated architecture tests to include verification record schema in module boundaries.
docs: update README for tool-runtime to clarify file/directory handling

refactor: streamline file search logic in ExecuteSearchFiles action

feat: improve NodeFileSystemAdapter to handle file and directory roots

feat: extend WorkspaceFileSystemPort to support reading text files from files

test: add unit tests for NodeFileSystemAdapter file reading behavior

test: enhance ReadEfficiencyTools tests for single file search functionality

docs: clarify decision policy behavior regarding grant narrowing

feat: implement tool grants equivalence check for decision policy

refactor: simplify decision policy pipeline by using tool grants equivalence

test: add unit tests for tool grants equivalence logic

docs: update skills module documentation for budget packing behavior

feat: implement rank-preserving budget packing in skill application

feat: add constants for minimum useful skill tokens in skills module

test: enhance SkillsPipeline tests for compact metadata injection

test: add unit tests for applySkillBudget function in skills module

docs: update verification module documentation for discovery warnings

feat: enhance discover applicable checks to suppress redundant warnings

test: add tests for discover applicable checks with projectId warnings

refactor: clean up window budget module exports

test: update architecture tests to include window-budget module
- Replaced AgentActivityPanel and AgentThinkingPanel with a new AgentTimeline component for improved activity display.
- Enhanced the AgentTimeline to support streaming events and provide better formatting for thinking labels and tool titles.
- Added LiveStatus component to indicate the current phase of activity, integrating it into MessageList for real-time updates.
- Updated FileChangesCard to include an optional dismiss action and adjusted its compact mode.
- Improved CSS styles for better layout and visual consistency across components, including timeline and bubble styles.
- Refactored MessageList to utilize new segment grouping for better handling of text and activity events.
…lished facts management

- Introduced `isExplorationRereadHeavy` function to identify excessive file reads.
- Added `isExplorationStalled` method in `RunBudgetTracker` to detect exploration stalls based on file read ratios.
- Implemented established facts management with `extractEstablishedFact`, `upsertEstablishedFact`, and `dropEstablishedFactsForPaths`.
- Integrated established facts into the tool call cache for deduplication of read-only tool results.
- Updated `AgentEnginePipeline` to handle exploration stall nudges and established facts reinjection.
- Enhanced verification repair process to allow a single repair attempt after a verification failure.
- Added tests for new functionalities including exploration stall detection and established facts handling.
codewithshinde and others added 23 commits August 18, 2026 19:36
… updates from plans

- Added  function to stream unused plan steps onto the live task list after earlier items complete.
- Introduced  utility to extract paths from task items, enhancing task management.
- Updated  to include working set details for active tasks.
- Enhanced task item schema to support write, mustRead, and affected paths.
- Adjusted task list constants and defaults to accommodate new maximum task limits.
- Implemented tests for  and  to ensure functionality.
- Updated window budget policies to include task list configurations.
…ve file system adapters

- Updated decision policy to route agent "run tests" requests to diagnose with process tools.
- Implemented logic to skip ".mitii" logs during file system operations in both InMemoryFileSystemAdapter and NodeFileSystemAdapter.
- Introduced a new utility function `shouldSkipSearchWalkEntry` to manage ignored directories and file extensions.
- Enhanced mutation budget resolution to allow widening of scopes after path_out_of_scope or compiler errors.
- Added tests to verify the new behavior for agent test requests and file system operations.
- Updated documentation to reflect changes in decision policy and verification processes.
…ned stages

Keep AgentEnginePipeline as a thin start/resume facade and move run sequencing into named stages (start, resume, loop, tool, pin/discovery, verification) plus mapping actions, without changing public contracts.

Co-authored-by: Cursor <cursoragent@cursor.com>
- Introduced  to complete diagnostic batches when errors are resolved.
- Updated  to handle task list advancement based on completed plan steps.
- Added  to track completed steps during tool execution.
- Enhanced  to skip re-adding completed step IDs.
- Implemented path normalization and matching for checklist items.
- Added tests for new functionality, ensuring proper behavior of task advancement and completion logic.
…h and effort

- Added thoroughness.ts to manage thoroughness presets and related functions.
- Introduced types for Agent UI depth, effort, and thoroughness.
- Implemented functions to resolve thoroughness presets, infer thoroughness from depth and effort, and normalize intensity settings.
- Updated tests to cover new thoroughness functionality and ensure correct behavior of intensity overrides.
- Modified existing tests to reflect changes in mode defaults to include thoroughness.
- Introduced exploration depth options in  to allow for quick, deep, or auto exploration.
- Updated  to reflect changes in planning strategies and discovery processes.
- Implemented logic to skip rediscovery when known file paths are provided, improving efficiency.
- Added handling for thin discovery briefs to prevent unnecessary model drafts.
- Refactored discovery and diagnostic step functions into separate modules for better organization.
- Enhanced  to treat read project config modules as change surfaces.
- Added tests to ensure correct behavior of new planning strategies and discovery logic.
- Updated README.md to include new user setup instructions and CLI commands.
- Expanded apps/cli/README.md with detailed first run steps and command descriptions.
- Introduced MITII_BANNER in banner.ts for a visual header in the session.
- Modified cli.ts to integrate session header formatting and handle setup command.
- Implemented setup.ts for interactive and flag-driven provider setup, including config persistence.
- Enhanced config.ts to support saving and loading host configurations securely.
- Updated help.ts to reflect new commands and options for setup and session.
- Added tests for CLI argument parsing, session banner formatting, and setup functionality.
- Refactored index.status.spec.ts to improve capability checks in CLI commands.
- Introduced new test cases for medium difficulty in , covering various scenarios related to bug fixes and test infrastructure setup.
- Created a new suite configuration in  for the testing agent benchmark, detailing expected counts and gates for different difficulty levels.
- Updated the template for new test cases in  to reflect changes in structure and requirements.
- Enhanced load tests in  to validate domain structures and case counts.
- Added report generation tests in  to ensure proper creation of case reports in JSON and Markdown formats.
- Removed placeholder  files from contract, integration, and e2e test directories as they are no longer needed.
- Updated  to clarify the purpose of the tests and added specific benchmark scripts for frontend, backend, cicd, and testing.
- Cleaned up TypeScript configuration to include only relevant test directories and updated Vitest configuration for better test organization.
- Introduced a new setup file  to mock VSCode environment for testing purposes.
- Implemented  to compact JSON output for CLI with truncation for long strings.
- Updated CLI commands to use the new serialization method for JSON output.
- Added  script to clean up fixture installations and workspace artifacts.
- Enhanced documentation for fixture management and reset procedures.
- Introduced new tests for path containment and JSON serialization.
- Improved  to include workspace directories and updated README files for clarity.
- Introduced LoopPolicyEditor component for managing loop/stall policy settings.
- Updated SettingsPanel to include Loop Policy section with toggle and reset functionality.
- Enhanced protocol to support loop policy settings in UiSettingsSnapshot.
- Implemented agent engine threshold overrides for loop/stall policies.
- Added validation and resolution logic for agent engine thresholds.
- Updated various engine actions to utilize new loop policy thresholds.
- Created tests for resolving agent engine thresholds and validating overrides.
- Added LoopPolicyBandSnapshot interface to represent different window bands.
- Enhanced LoopPolicySettingsSnapshot to include band thresholds and effective thresholds.
- Implemented resolveLoopPolicyThresholds and resolveLoopPolicyBandThresholds functions to manage loop policy thresholds based on context window size and optional lab overrides.
- Updated agent engine input schema to support loop policy lab overrides.
- Created loopPolicyBands.ts to define and manage window-specific thresholds and their overrides.
- Added tests for loop policy thresholds resolution and band selection.
- Updated documentation to reflect changes in loop policy handling and configuration.
- Introduced model I/O logging feature, allowing for the logging of model requests and responses.
- Updated configuration settings to include  for enabling/disabling model I/O logging.
- Enhanced the  function to wrap LLM ports with model I/O logging capabilities.
- Implemented shareable diagnostics that include sanitized model I/O logs.
- Added tests for model I/O logging to ensure proper functionality and redaction of sensitive information.
- Updated UI components to reflect the new model I/O logging settings and descriptions.
- Added  to enforce file-backed discovery evidence before a plan is considered ready.
- Introduced  to validate the adequacy of discovery evidence.
- Updated  to handle quality floor checks and fallback to clarification when evidence is insufficient.
- Enhanced  to suppress generic open questions when discovery is file-backed.
- Added tests for new functionalities in  and integrated checks in existing pipelines.
- Updated decision policies to route follow-up questions about implementation to the appropriate responses.
- Added tests for applying patches using flat path/oldText/newText format and stringified patches arrays.
- Updated decision policy to route pasted console runtime dumps to diagnose instead of executing.
- Implemented handling for workspace symptoms in agent mode, ensuring proper diagnosis.
- Clarified decision-making process for ambiguous mutation requests in agent mode.
- Introduced new utility functions for truncating user requests while retaining context.
- Enhanced prompt construction to manage large user requests without blocking the prompt.
- Updated README and constants to reflect new decision policy behaviors and thresholds.
- Introduced new JSONL files for retrieval and testing cases in the frontend benchmark suite.
- Updated suite.json to reflect the new structure and expected counts for cases.
- Modified the new-case template to align with the new routing structure.
- Enhanced load and report tests to validate the new case structure and ensure proper reporting.
- Implemented usage extraction from JSONL end events in the runner.
@codewithshinde codewithshinde self-assigned this Aug 29, 2026
@codewithshinde codewithshinde linked an issue Aug 29, 2026 that may be closed by this pull request
karthik added 2 commits August 29, 2026 11:25
- Increased the maximum unfulfilled execute recoveries from 1 to 2 in policy.ts.
- Modified resolveLoopTurnOutcome tests to reflect new recovery logic and added new test cases for handling clear mutation blockers and specific reason codes.
- Enhanced the runModelToolLoop function to include reason codes and file read calls in the recovery process.
- Updated decision policy to recognize additional phrasing for mutation requests.
- Adjusted benchmark test cases to clarify prompts and expected outcomes for bugfix and documentation tasks.
- Improved snapshot and runner scripts to handle ignored entries more effectively.
@codewithshinde
codewithshinde merged commit 2f1e85e into main Aug 29, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Frontend benchmark is replaced with the 70-case agent core. Old 276 cases are gone. SDK for Mitii Core Features

1 participant