Skip to content

[#239] 🔧 - Improve asking#272

Merged
efraespada merged 31 commits intodevelopfrom
chore/239-improve-asking
Nov 8, 2025
Merged

[#239] 🔧 - Improve asking#272
efraespada merged 31 commits intodevelopfrom
chore/239-improve-asking

Conversation

@efraespada
Copy link
Member

@efraespada efraespada commented Nov 8, 2025

#239

What does this PR do?

This pull request addresses the issue where the "Ask" feature is not yet functional. The changes included in this PR aim to implement the necessary components and logic to ensure the feature operates as expected. By completing this task, the feature will be ready for use, providing the intended functionality to users. This enhancement aligns with the expected impact of having a fully working feature, resolving the current inefficiency where the feature is non-operational.

Summary of Changes

  • .github/workflows/gbf_commit.yml: Removed the classic-token input from the workflow.
  • .github/workflows/gbf_issue.yml: Removed unused classic-token input from GitHub workflow.
  • .github/workflows/gbf_issue_comment.yml: Removed the 'classic-token' input from the workflow.
  • .github/workflows/gbf_pull_request.yml: Removed the classic-token input from the workflow.
  • .github/workflows/gbf_pull_request_review_comment.yml: Removed the classic-token input from the workflow.
  • .github/workflows/gbf_update_ai_knowledge.yml: Simplified the GitHub workflow by removing unnecessary environment variables and the DOCKER_HOST setup step.
  • .github/workflows/release_workflow.yml: Removed the 'compile-vector-server' job and simplified the workflow dependencies.
  • action.yml: Removed deprecated Docker and classic token configurations.
  • docs/ai-container-system.md: Updated GitHub Actions workflow to use a new action name.
  • package.json: Updated the binary command name in bin configuration.
  • src/actions/github_action.ts: Removed Docker-related configurations and classic token from the GitHub action setup.
  • src/actions/local_action.ts: Removed Docker-related configuration and classic token support.
  • src/cli.ts: Refactored CLI commands and improved AI-related functionality.
  • src/data/model/ai_response_schema.ts: Added JSON schema for enforcing structured AI responses.
  • src/data/model/chunked_file.ts: Removed the ChunkedFile class.
  • src/data/model/chunked_file_chunk.ts: Entire file removed, including the ChunkedFileChunk class and its associated logic.
  • src/data/model/codebase_analysis_schema.ts: Added JSON schema for codebase analysis responses.
  • src/data/model/docker_config.ts: Entire DockerConfig class has been removed.
  • src/data/model/execution.ts: Removed DockerConfig-related code and dependencies.
  • src/data/model/single_action.ts: Updated SingleAction class to replace VECTOR related actions with AI_CACHE and THINK actions.
  • src/data/model/think_response.ts: Added new interfaces for modeling responses and todos in the think system.
  • src/data/model/think_response_schema.ts: Added a JSON schema for structured AI reasoning and analysis responses.
  • src/data/model/tokens.ts: Simplified the Tokens class by removing the classicToken property.
  • src/data/repository/ai_repository.ts: Enhanced AI repository with support for JSON schema-based responses and added new askThinkJson method.
  • src/data/repository/docker_repository.ts: Removed the entire DockerRepository class and related functionality.
  • src/data/repository/file_repository.ts: Removed chunked content processing functionality.
  • src/data/repository/supabase_repository.ts: Refactored SupabaseRepository to focus on AI file caching, replacing chunk-based operations with file cache operations.
  • src/usecase/actions/prepare_ai_container_use_case.ts: The file has been removed entirely.
  • src/usecase/actions/vector_action_removal_use_case.ts: Renamed method and updated terminology for clarity and consistency.
  • src/usecase/actions/vector_action_use_case.ts: Refactored VectorActionUseCase to use AI repositories and services for file analysis and caching, replacing Docker-based chunk processing.
  • src/usecase/issue_comment_use_case.ts: Replaced AskActionUseCase with ThinkUseCase.
  • src/usecase/single_action_use_case.ts: Refactored SingleActionUseCase to remove unused imports, modify action logic, and add a new use case.
  • src/usecase/steps/common/ask_ai_use_case.ts: Entire file AskActionUseCase has been removed.
  • src/usecase/steps/common/services/codebase_analyzer.ts: Added a new service for analyzing codebase structure, generating file descriptions, and managing file relationships using AI and caching.
  • src/usecase/steps/common/services/comment_formatter.ts: Added a new service for formatting GitHub comments and code changes.
  • src/usecase/steps/common/services/file_cache_manager.ts: Added a new service FileCacheManager to handle AI file caching in Supabase.
  • src/usecase/steps/common/services/file_import_analyzer.ts: Added a new service for analyzing file imports and building file relationship maps across multiple programming languages.
  • src/usecase/steps/common/services/file_search_service.ts: Added a new FileSearchService class for building file indexes and searching files.
  • src/usecase/steps/common/services/types.ts: Added shared types for codebase analysis services.
  • src/usecase/steps/common/think_code_manager.ts: Added a new class ThinkCodeManager to manage virtual code state by applying proposed changes and tracking modifications.
  • src/usecase/steps/common/think_todo_manager.ts: Added a new class ThinkTodoManager to manage TODO list functionality for the reasoning process, including creation, updating, and tracking of TODOs.
  • src/usecase/steps/common/think_use_case.ts: Added a new 'ThinkUseCase' class for advanced code analysis and reasoning.
  • src/usecase/steps/issue/close_issue_after_merging_use_case.ts: Updated method name and error message for removing AI file cache.
  • src/usecase/steps/issue/prepare_branches_use_case.ts: Renamed method and function for clarity, updated related function calls.
  • src/usecase/steps/issue_comment/check_issue_comment_language_use_case.ts: Added logging for issue number before updating the comment.
  • src/utils/constants.ts: Updated constants for command name, removed Docker-related keys, and added AI-related actions and prompts.
  • supabase/migrations/20240322000000_create_ai_file_cache_table.sql: Added a new SQL migration script to create and manage the ai_file_cache table for storing AI-generated file descriptions and relationships.

Detailed Changes

action.yml

Removed deprecated Docker and classic token configurations.

Changes:

  • Removed the classic-token input field.
  • Removed all Docker-related input fields: docker-container-name, docker-domain, docker-port, docker-cache-os, and docker-cache-arch.

package.json

Updated the binary command name in bin configuration.

Changes:

  • Changed binary command name from git-board-flow to giik.

.github/workflows

.github/workflows/gbf_commit.yml

Removed the classic-token input from the workflow.

Changes:

  • Removed the classic-token input, which was previously sourced from secrets.CLASSIC_TOKEN.

.github/workflows/gbf_issue.yml

Removed unused classic-token input from GitHub workflow.

Changes:

  • Deleted classic-token: ${{ secrets.CLASSIC_TOKEN }}.

.github/workflows/gbf_issue_comment.yml

Removed the 'classic-token' input from the workflow.

Changes:

  • Deleted the line classic-token: ${{ secrets.CLASSIC_TOKEN }}.

.github/workflows/gbf_pull_request.yml

Removed the classic-token input from the workflow.

Changes:

  • Deleted the classic-token: ${{ secrets.CLASSIC_TOKEN }} line.
  • The classic-token is no longer required for the job configuration.

.github/workflows/gbf_pull_request_review_comment.yml

Removed the classic-token input from the workflow.

Changes:

  • Deleted the classic-token: ${{ secrets.CLASSIC_TOKEN }} line.

.github/workflows/gbf_update_ai_knowledge.yml

Simplified the GitHub workflow by removing unnecessary environment variables and the DOCKER_HOST setup step.

Changes:

  • Removed the Set up DOCKER_HOST as output step.
  • Removed the DOCKER_HOST and RUNNER_TEMP environment variables from the Update AI knowledge step.
  • Removed the classic-token input from the Update AI knowledge step.

.github/workflows/release_workflow.yml

Removed the 'compile-vector-server' job and simplified the workflow dependencies.

Changes:

  • Removed the 'compile-vector-server' job entirely.
  • Updated the 'tag' job to depend only on 'prepare-compiled-files' instead of both 'prepare-compiled-files' and 'compile-vector-server'.

docs

docs/ai-container-system.md

Updated GitHub Actions workflow to use a new action name.

Changes:

  • Changed single-action value from vector_action to ai_cache_action in the GitHub Actions workflow.

src/actions

src/actions/github_action.ts

Removed Docker-related configurations and classic token from the GitHub action setup.

Changes:

  • Removed import of DockerConfig.
  • Removed Docker-related input configurations: dockerContainerName, dockerDomain, dockerPort, dockerCacheOs, dockerCacheArch.
  • Removed classicToken from token configurations.
  • Removed DockerConfig instantiation from Execution object initialization.

src/actions/local_action.ts

Removed Docker-related configuration and classic token support.

Changes:

  • Removed DockerConfig import and Docker-related configuration (dockerContainerName, dockerDomain, dockerPort, dockerCacheOs, dockerCacheArch).
  • Removed classicToken from the Tokens configuration.

src

src/cli.ts

Refactored CLI commands and improved AI-related functionality.

Changes:

  • Removed compile-vector-server command.
  • Updated build-ai command: renamed action to AI_CACHE_LOCAL, added OpenRouter API key and model support, and removed classic token option.
  • Renamed ask-ai command to think and updated its description for deep code analysis.
  • Added argument cleaning helper function for CLI arguments.
  • Improved error handling for missing questions in the think command.
  • Refactored issue context setup in the think command to handle both issue and non-issue scenarios.
  • Updated welcome messages and titles for better clarity.
  • Removed unused dependencies and simplified logic in the think command.

src/data/model

src/data/model/ai_response_schema.ts

Added JSON schema for enforcing structured AI responses.

Changes:

  • Defined AI_RESPONSE_JSON_SCHEMA to validate AI responses.
  • Included properties text_response, action, related_files, and complete.
  • Specified action as an enum with values 'none' and 'analyze_files'.
  • Marked all properties as required and restricted additional properties.

src/data/model/chunked_file.ts

Removed the ChunkedFile class.

Changes:

  • Deleted the entire ChunkedFile class definition.
  • Removed properties: path, index, type, content, chunks, shasum, and vector.
  • Removed the constructor for initializing the class.

src/data/model/chunked_file_chunk.ts

Entire file removed, including the ChunkedFileChunk class and its associated logic.

Changes:

  • Removed ChunkedFileChunk class.
  • Removed constructor and all class properties.
  • Removed import statement for 'crypto'.

src/data/model/codebase_analysis_schema.ts

Added JSON schema for codebase analysis responses.

Changes:

  • Defined a new CODEBASE_ANALYSIS_JSON_SCHEMA constant.
  • Schema describes an array of file analyses with descriptions and relationships.
  • Each item in the array includes path, description, and relationships properties.
  • Set path and description as required properties.
  • Added additionalProperties: false to enforce strict schema validation.

src/data/model/docker_config.ts

Entire DockerConfig class has been removed.

Changes:

  • Removed the DockerConfig class and all its associated methods and properties.

src/data/model/execution.ts

Removed DockerConfig-related code and dependencies.

Changes:

  • Removed import statement for DockerConfig from './docker_config'.
  • Removed the dockerConfig field from the Execution class.
  • Removed the dockerConfig parameter from the Execution class constructor.

src/data/model/single_action.ts

Updated SingleAction class to replace VECTOR related actions with AI_CACHE and THINK actions.

Changes:

  • Replaced ACTIONS.COMPILE_VECTOR_SERVER, ACTIONS.VECTOR, ACTIONS.VECTOR_LOCAL, and ACTIONS.VECTOR_REMOVAL with ACTIONS.AI_CACHE, ACTIONS.AI_CACHE_LOCAL, and ACTIONS.THINK in the actions array.
  • Updated actionsThrowError array to include ACTIONS.AI_CACHE instead of ACTIONS.VECTOR.
  • Updated actionsWithoutIssue array to include ACTIONS.AI_CACHE, ACTIONS.AI_CACHE_LOCAL, and ACTIONS.THINK instead of ACTIONS.VECTOR, ACTIONS.VECTOR_LOCAL, and ACTIONS.COMPILE_VECTOR_SERVER.
  • Removed isCompileVectorServerAction, isVectorAction, isVectorLocalAction, and isVectorRemovalAction methods.
  • Added isAiCacheAction, isAiCacheLocalAction, and isThinkAction methods.

src/data/model/think_response.ts

Added new interfaces for modeling responses and todos in the think system.

Changes:

  • Defined FileAnalysis interface for file analysis results.
  • Defined ProposedChange interface for code change proposals.
  • Defined ThinkResponse interface for encapsulating response data.
  • Defined ThinkStep interface for tracking steps in the think process.
  • Defined ThinkTodoItem interface for individual todo items.
  • Defined ThinkTodoList interface for managing a collection of todo items.

src/data/model/think_response_schema.ts

Added a JSON schema for structured AI reasoning and analysis responses.

Changes:

  • Defined a JSON schema for the ThinkResponse interface.
  • Included properties like reasoning, action, files_to_search, files_to_read, analyzed_files, proposed_changes, complete, final_analysis, and todo_updates.
  • Specified required fields such as reasoning, action, and complete.
  • Added enum constraints for action, relevance, change_type, and status fields.
  • Ensured schema does not allow additional properties.

src/data/model/tokens.ts

Simplified the Tokens class by removing the classicToken property.

Changes:

  • Removed the 'classicToken' property from the Tokens class.
  • Removed the 'classicToken' parameter from the constructor.

src/data/repository

src/data/repository/ai_repository.ts

Enhanced AI repository with support for JSON schema-based responses and added new askThinkJson method.

Changes:

  • Removed unused OpenRouterResponse interface.
  • Added AI_RESPONSE_JSON_SCHEMA and THINK_RESPONSE_JSON_SCHEMA imports.
  • Uncommented debugging log in ask method.
  • Commented out success logging in ask method.
  • Refactored askJson method to support optional schema input and schema name.
  • Added askThinkJson method to handle responses using THINK_RESPONSE_JSON_SCHEMA.
  • Removed manual JSON cleaning in askJson and directly parsed the API response.
  • Added response format configuration in askJson and askThinkJson methods to enforce JSON schema validation.

src/data/repository/docker_repository.ts

Removed the entire DockerRepository class and related functionality.

Changes:

  • Deleted DockerRepository class which handled Docker container lifecycle management.
  • Removed methods for preparing local vector servers, checking multi-architecture images, and managing Docker containers.
  • Eliminated utility functions for Docker Buildx, image tagging, and registry authentication.
  • Removed helpers for checking system architecture, container status, and cleanup operations.

src/data/repository/file_repository.ts

Removed chunked content processing functionality.

Changes:

  • Removed import of ChunkedFile from '../model/chunked_file'.
  • Removed getChunkedRepositoryContent function.
  • Removed getChunksByLines function.
  • Removed getChunksByBlocks function.

src/data/repository/supabase_repository.ts

Refactored SupabaseRepository to focus on AI file caching, replacing chunk-based operations with file cache operations.

Changes:

  • Removed ChunkedFile and ChunkedFileChunk imports and related functions.
  • Added AICachedFileInfo interface to define AI file cache structure.
  • Changed CHUNKS_TABLE to AI_FILE_CACHE_TABLE for AI file cache operations.
  • Removed chunk-specific methods like setChunkedFile, removeChunksByShasum, getChunkedFileByShasum, getChunks, getChunksByShasum, updateVector, matchChunks, duplicateChunksByBranch, removeChunksByBranch, removeChunksByPath, and getVectorOfChunkContent.
  • Added new methods for AI file cache management: setAIFileCache, getAIFileCache, getAIFileCachesByBranch, removeAIFileCacheByPath, duplicateAIFileCacheByBranch, and removeAIFileCacheByBranch.
  • Modified getShasumByPath and getDistinctPaths to use AI file cache data.
  • Refactored error handling and logging to align with new AI file cache operations.

src/usecase/actions

src/usecase/actions/prepare_ai_container_use_case.ts

The file has been removed entirely.

Changes:

  • Removed the PrepareAIContainerUseCase class.
  • Removed the invoke method which handled Docker image preparation logic.
  • Removed imports for Execution, Result, DockerRepository, logError, logInfo, and ParamUseCase.
  • Removed the commented-out buildAndPushImage method.

src/usecase/actions/vector_action_removal_use_case.ts

Renamed method and updated terminology for clarity and consistency.

Changes:

  • Renamed method removeChunksByBranch to removeAICacheByBranch.
  • Updated method call in invoke to use removeAICacheByBranch.
  • Updated SupabaseRepository method call from removeChunksByBranch to removeAIFileCacheByBranch.
  • Updated success message from 'Removed chunks' to 'Removed AI cache'.

src/usecase/actions/vector_action_use_case.ts

Refactored VectorActionUseCase to use AI repositories and services for file analysis and caching, replacing Docker-based chunk processing.

Changes:

  • Removed DockerRepository dependency and replaced with AiRepository.
  • Added new services: FileImportAnalyzer, FileCacheManager, and CodebaseAnalyzer.
  • Replaced chunk-based processing with file-level AI cache management.
  • Updated methods to handle AI cache instead of chunks: checkAICacheInSupabase, uploadAICacheToSupabase, duplicateAICacheToBranch.
  • Added AI configuration validation in the invoke method.
  • Introduced relationship mapping for file dependencies.
  • Removed chunk-related logic and constants (CODE_INSTRUCTION_BLOCK, CODE_INSTRUCTION_LINE).
  • Updated logging to reflect AI cache operations instead of chunk processing.

src/usecase

src/usecase/issue_comment_use_case.ts

Replaced AskActionUseCase with ThinkUseCase.

Changes:

  • Changed import from AskActionUseCase to ThinkUseCase.
  • Replaced AskActionUseCase invocation with ThinkUseCase in the invoke method.

src/usecase/single_action_use_case.ts

Refactored SingleActionUseCase to remove unused imports, modify action logic, and add a new use case.

Changes:

  • Removed unused import AskActionUseCase.
  • Removed unused import PrepareAIContainerUseCase.
  • Added import ThinkUseCase for new action handling.
  • Removed logic for isCompileVectorServerAction.
  • Replaced isVectorAction with isAiCacheAction.
  • Added new condition to handle isThinkAction using ThinkUseCase.

src/usecase/steps/common

src/usecase/steps/common/ask_ai_use_case.ts

Entire file AskActionUseCase has been removed.

Changes:

  • Removed the AskActionUseCase class and its implementation.
  • Removed dependencies such as AiResponse, ChunkedFileChunk, Execution, Result, and various repositories.
  • Removed utility functions like logDebugInfo, logError, logInfo, and logSingleLine.
  • Removed the getRelatedFiles method used for file retrieval.

src/usecase/steps/common/think_code_manager.ts

Added a new class ThinkCodeManager to manage virtual code state by applying proposed changes and tracking modifications.

Changes:

  • Introduced ThinkCodeManager class to handle virtual code state.
  • Added methods to initialize with original files, apply changes, and retrieve file content.
  • Implemented change tracking for creating, modifying, deleting, and refactoring files.
  • Added logging for tracking actions and errors during change application.
  • Included utility methods to check for duplicate changes, summarize applied changes, and provide context for AI.
  • Added a similarity check for change descriptions to avoid duplicates.
  • Provided statistics on total files, modified files, and total changes.

src/usecase/steps/common/think_todo_manager.ts

Added a new class ThinkTodoManager to manage TODO list functionality for the reasoning process, including creation, updating, and tracking of TODOs.

Changes:

  • Added ThinkTodoManager class to manage TODOs.
  • Implemented initialize method to start with optional initial TODOs.
  • Implemented createTodo method to add new TODOs.
  • Implemented updateTodo method to modify existing TODOs.
  • Added methods to retrieve TODOs: getAllTodos, getTodosByStatus, getActiveTodos.
  • Implemented getStats method for TODO completion statistics.
  • Added getContextForAI method to format TODO list for AI context.
  • Implemented linkTodoToChanges method to associate TODOs with changes.
  • Added autoUpdateFromChanges method to automatically update TODO status based on progress.
  • Implemented getSummary method to generate a report of TODOs.

src/usecase/steps/common/think_use_case.ts

Added a new 'ThinkUseCase' class for advanced code analysis and reasoning.

Changes:

  • Implements a 'ParamUseCase' for handling complex code analysis tasks.
  • Incorporates various services like 'FileImportAnalyzer', 'FileCacheManager', 'CodebaseAnalyzer', 'FileSearchService', and 'CommentFormatter'.
  • Supports iterative reasoning with a maximum of 30 iterations and a limit of 50 files to analyze.
  • Provides functionalities for searching, reading, analyzing files, proposing changes, and managing TODOs.
  • Includes mechanisms to detect and prevent stagnation in reasoning iterations.
  • Generates a comprehensive final analysis summarizing discovered insights, proposed changes, and recommendations.
  • Supports posting formatted comments to GitHub issues with the reasoning process and analysis results.

src/usecase/steps/common/services

src/usecase/steps/common/services/codebase_analyzer.ts

Added a new service for analyzing codebase structure, generating file descriptions, and managing file relationships using AI and caching.

Changes:

  • Created the CodebaseAnalyzer class to handle codebase analysis.
  • Implemented generateCodebaseAnalysis method to analyze and describe code files, using AI for descriptions and caching for efficiency.
  • Added support for filtering relevant code files based on extensions and directory structure.
  • Integrated FileImportAnalyzer and FileCacheManager for building relationship maps and managing cache.
  • Implemented batching logic to process files in groups of 20 for AI analysis.
  • Added fallback mechanisms for generating basic descriptions when AI analysis fails.
  • Included methods for formatting the analysis results for inclusion in AI context.
  • Utilized logging for debugging and tracking analysis progress.

src/usecase/steps/common/services/comment_formatter.ts

Added a new service for formatting GitHub comments and code changes.

Changes:

  • Introduced CommentFormatter class to handle GitHub comment formatting.
  • Added formatReasoningComment method to generate comprehensive analysis comments.
  • Implemented formatProposedChange for detailed formatting of individual changes.
  • Added detectLanguageFromPath to determine programming language from file extensions.
  • Included helper methods getActionEmoji, formatActionName, and getChangeTypeEmoji for emoji-based UI enhancements.
  • Supported truncated comments to handle GitHub's comment length limits.
  • Integrated TODO list summaries and detailed reasoning steps in a collapsible section.
  • Added file analysis and proposed changes summaries.

src/usecase/steps/common/services/file_cache_manager.ts

Added a new service FileCacheManager to handle AI file caching in Supabase.

Changes:

  • Implemented normalizePath method to standardize file paths.
  • Added calculateFileSHA method to compute SHA256 hash of file content.
  • Created initSupabaseRepository method to initialize Supabase repository.
  • Implemented loadAICache method to load AI cache from Supabase.
  • Added getCachedFile method to retrieve cached file info by path.
  • Implemented saveAICacheEntry method to save cache entries to Supabase.
  • Integrated logging using logInfo, logDebugInfo, and logError for better visibility.

src/usecase/steps/common/services/file_import_analyzer.ts

Added a new service for analyzing file imports and building file relationship maps across multiple programming languages.

Changes:

  • Implemented extractImportsFromFile method to extract imports from files in various programming languages (e.g., TypeScript, Python, Java, Go, Rust, Ruby, PHP, Swift, Dart).
  • Added resolveRelativePath method to resolve relative import paths to absolute paths.
  • Implemented buildRelationshipMap method to construct a map of file relationships (consumes and consumed_by) by analyzing imports across all files in a repository.
  • Supported multiple file extensions and import syntaxes for each programming language.

src/usecase/steps/common/services/file_search_service.ts

Added a new FileSearchService class for building file indexes and searching files.

Changes:

  • Added buildFileIndex method to create a file index for quick lookup by filename or directory.
  • Added searchFiles method to search files using search terms (filename, directory, or pattern).
  • Implemented support for exact filename matches, directory matches, and simple pattern matching.

src/usecase/steps/common/services/types.ts

Added shared types for codebase analysis services.

Changes:

  • Added CachedFileInfo interface to store file-related information including path, SHA, description, and relationships.
  • Added FileRelationshipMap interface to manage relationships between files using Maps.

src/usecase/steps/issue

src/usecase/steps/issue/close_issue_after_merging_use_case.ts

Updated method name and error message for removing AI file cache.

Changes:

  • Renamed method removeChunksByBranch to removeAIFileCacheByBranch.
  • Updated error message from 'Error removing chunks' to 'Error removing AI cache'.

src/usecase/steps/issue/prepare_branches_use_case.ts

Renamed method and function for clarity, updated related function calls.

Changes:

  • Renamed method duplicateChunksByBranch to duplicateAICacheByBranch.
  • Renamed function duplicateChunksByBranch to duplicateAIFileCacheByBranch.
  • Updated error log message from 'Error duplicating chunks' to 'Error duplicating AI cache'.
  • Updated all instances where duplicateChunksByBranch was called to duplicateAICacheByBranch.

src/usecase/steps/issue_comment

src/usecase/steps/issue_comment/check_issue_comment_language_use_case.ts

Added logging for issue number before updating the comment.

Changes:

  • Added logInfo statement to log the issue number before calling updateComment.

src/utils

src/utils/constants.ts

Updated constants for command name, removed Docker-related keys, and added AI-related actions and prompts.

Changes:

  • Renamed COMMAND from 'git-board-flow' to 'giik'.
  • Renamed TITLE from 'Git Board Flow' to 'Giik'.
  • Removed Docker-related keys: DOCKER_CONTAINER_NAME, DOCKER_DOMAIN, DOCKER_PORT, DOCKER_CACHE_OS, DOCKER_CACHE_ARCH, and CLASSIC_TOKEN.
  • Updated ACTIONS to include AI-related actions: AI_CACHE, AI_CACHE_LOCAL, and THINK.
  • Removed COMPILE_VECTOR_SERVER, VECTOR, VECTOR_LOCAL, and VECTOR_REMOVAL from ACTIONS.
  • Added PROMPTS section with a detailed technical code analysis prompt.

supabase/migrations

supabase/migrations/20240322000000_create_ai_file_cache_table.sql

Added a new SQL migration script to create and manage the ai_file_cache table for storing AI-generated file descriptions and relationships.

Changes:

  • Created the ai_file_cache table with fields for owner, repository, branch, file_name, path, sha, description, consumes, consumed_by, created_at, and last_updated.
  • Added indexes for faster lookups on owner/repository/branch, path, and sha.
  • Created a trigger to automatically update the last_updated timestamp on row updates.
  • Implemented functions to retrieve file cache entries by path, by branch, and to delete entries by branch or path.
  • Added a function to duplicate file cache entries from one branch to another.

…e askJson method to utilize it for structured responses
Implemented a new CLI command 'think' that allows users to perform deep code analysis and receive change proposals based on AI reasoning. This includes options for issue processing, branch selection, and various AI configurations. The command integrates with the AI repository to fetch structured responses and utilizes a JSON schema for the AI's reasoning process.
…ogging in 'think' command

Updated the 'think' command to include a helper function for cleaning CLI arguments, ensuring proper handling of inputs with '=' prefixes. Improved logging for file search and reading operations, providing clearer feedback on search results and file processing. Adjusted issue number parsing to ensure defaults are handled correctly.
…sis capabilities

Increased the maximum iterations for analysis from 10 to 30 and the maximum files to analyze from 20 to 50, allowing for deeper code analysis. Introduced a new limit for consecutive searches without progress, set to 3, to enhance user guidance during file searches. Updated logging and context messages to provide clearer feedback and suggestions based on search results and analysis progress.
…ent formatting

Updated the 'think' command to improve the analysis process by adding new private methods for formatting reasoning comments and handling proposed changes. Enhanced logging for better visibility of actions taken during analysis. Removed unused variables and methods to clean up the codebase, ensuring a more efficient implementation.
Added support for managing TODO items within the 'think' command, allowing users to create and update tasks as part of the analysis process. Introduced a new schema for TODO updates, enabling the AI to track progress on tasks and provide structured feedback. Improved the reasoning process by integrating TODO management, ensuring a more organized approach to code analysis and task completion.
Updated the comment generation process in the 'think' command and GitHub Action to improve clarity and organization. Introduced sections for final analysis, proposed changes, and detailed reasoning steps, with collapsible content for better readability. Enhanced the handling of TODO lists and file analysis summaries, ensuring a more structured output for users. This refactor aims to streamline the analysis process and provide comprehensive insights into the code evaluation.
Enhanced the 'think' command and GitHub Action to detect programming languages from file paths, improving the formatting of suggested code snippets. Removed redundant context sections in comments for better clarity. This update aims to streamline the output and enhance user experience by providing more accurate code representations.
Added a new functionality to the 'think' command that generates a detailed codebase analysis, including file descriptions and relationships. This feature enhances the reasoning process by providing context about the code structure before the main analysis loop. Introduced a JSON schema for structured responses and improved the askJson method to accommodate schema parameters. This update aims to facilitate better understanding and navigation of the codebase during analysis.
…capabilities

Updated the 'think' command to include new methods for extracting imports from various programming languages and resolving relative import paths. Introduced caching mechanisms to store and retrieve file analysis data, improving performance and efficiency during codebase analysis. This refactor aims to streamline the analysis process and provide more accurate insights into file dependencies and relationships.
Eliminated Docker-related inputs and configurations from the action and execution models, streamlining the codebase. Updated the CLI and action files to reflect the removal of Docker dependencies, enhancing clarity and reducing complexity. This refactor aims to simplify the overall architecture and improve maintainability.
Eliminated the classic token input from the action configuration and all related workflows, streamlining authentication processes. Updated the codebase to reflect this change, enhancing clarity and reducing complexity in token management. This refactor aims to simplify the overall architecture and improve maintainability.
Refactored the SupabaseRepository to replace the chunked file management system with a dedicated AI file cache. Introduced new methods for setting, retrieving, and managing AI file cache entries, enhancing the efficiency of file analysis and storage. Updated related use cases to utilize the new caching mechanism, improving overall performance and maintainability of the codebase.
…ion use case

Updated the VectorActionUseCase to implement a structured schema for AI-generated file descriptions, improving the accuracy and consistency of descriptions. Enhanced the caching mechanism to track files needing analysis based on SHA mismatches and cache misses, providing better insights into the analysis process. Additionally, integrated a new prompt for detailed codebase analysis, streamlining the AI's understanding of file functionalities. This refactor aims to improve the overall efficiency and clarity of the code analysis workflow.
…case

Refactored the VectorActionUseCase to delegate responsibilities to dedicated services for file import analysis, caching, and codebase analysis. Introduced FileImportAnalyzer, FileCacheManager, and CodebaseAnalyzer to streamline the extraction of imports, SHA calculation, and description generation. This modular approach enhances code maintainability and clarity, while improving the overall efficiency of the analysis workflow. Additionally, removed redundant methods from the use case, consolidating functionality into the new services.
Enhanced the FileCacheManager and VectorActionUseCase to include a normalization process for file paths, ensuring consistent comparison and storage. Introduced a private method to normalize paths by removing leading './' and standardizing separators. Updated relevant methods to utilize normalized paths for cache lookups and storage, improving the reliability of file caching and analysis processes. Additionally, added logging for cache misses and potential path mismatches to aid in debugging.
…workflows

Added support for OpenRouter API configuration in the CLI and VectorActionUseCase, allowing for dynamic API key and model input through environment variables. Updated the logging mechanism to enhance debugging capabilities by commenting out sensitive information. Removed the deprecated ChunkedFileChunk model to streamline the codebase, ensuring a more efficient file handling process. This refactor aims to improve the overall functionality and maintainability of the AI-driven workflows.
Removed the ChunkedFile model and associated methods from the codebase, replacing them with a dedicated AI cache management system. Updated the VectorActionUseCase and related classes to utilize the new AI cache methods for file handling, enhancing performance and maintainability. Adjusted logging messages to reflect the new terminology and improved clarity in cache operations. This refactor aims to streamline the AI-driven workflows and improve overall code efficiency.
…or consistency

Updated the codebase to replace references to vector actions with AI cache actions, enhancing clarity and consistency across the application. This includes renaming methods, constants, and descriptions in the CLI and related classes. The changes aim to streamline the AI cache management process and improve overall code maintainability.
@docs-page
Copy link

docs-page bot commented Nov 8, 2025

To view this pull requests documentation preview, visit the following URL:

docs.page/landamessenger/git-board-flow~272

Documentation is deployed and generated using docs.page.

@elisalopez elisalopez changed the title Chore/239 improve asking [#239] 🔧 - Improve asking Nov 8, 2025
@elisalopez elisalopez self-requested a review November 8, 2025 10:57
@elisalopez elisalopez added this to vypdev Nov 8, 2025
@elisalopez elisalopez moved this to In Progress in vypdev Nov 8, 2025
@elisalopez elisalopez changed the base branch from develop to master November 8, 2025 10:58
@efraespada efraespada linked an issue Nov 8, 2025 that may be closed by this pull request
1 task
@elisalopez elisalopez changed the base branch from master to develop November 8, 2025 10:58
@elisalopez elisalopez added branched Indicates that a branch has been created for this issue. maintenance chore size: XXL Indicates an extremely large task or issue that requires significant time and effort to complete. priority: low Not urgent, can be addressed later. labels Nov 8, 2025
@elisalopez
Copy link
Contributor

🔧 Chore Actions

  1. The pull request's title was updated from Chore/239 improve asking to [#239] 🔧 - Improve asking.
  2. The pull request was assigned to @efraespada (creator).
  3. @elisalopez was requested to review the pull request.
  4. The pull request was linked to Landa Messenger Development and moved to the column In Progress.
  5. The base branch was temporarily updated to master.
  6. The description was temporarily modified to include a reference to issue 🔧🧑‍💻 - Improve asking #239.
  7. The base branch was reverted to its original value: develop.
  8. The temporary issue reference 🔧🧑‍💻 - Improve asking #239 was removed from the description.
  9. Priority set to P2 in Landa Messenger Development.
  10. More than 1000 lines changed, so the pull request was resized to size: XXL.
  11. The description has been updated with AI-generated content.

image

🚀 Happy coding!

@efraespada efraespada merged commit 534bbf1 into develop Nov 8, 2025
16 checks passed
@github-project-automation github-project-automation bot moved this from In Progress to Done in vypdev Nov 8, 2025
@elisalopez
Copy link
Contributor

🔧 Chore Actions

  1. 🔧🧑‍💻 - Improve asking #239 was automatically closed after merging this pull request.

image

🚀 Happy coding!

@elisalopez elisalopez mentioned this pull request Nov 8, 2025
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

branched Indicates that a branch has been created for this issue. chore maintenance priority: low Not urgent, can be addressed later. size: XXL Indicates an extremely large task or issue that requires significant time and effort to complete.

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

🔧🧑‍💻 - Improve asking

2 participants