Skip to content

docs: Improve the "Core concepts" section to describe the difference between modules and directories #26

@dangazineu

Description

@dangazineu

The core concept section in the readme file should include this information.

In vyb we have the concepts of module, directory and file. While file and directory map directly to files and directories in the filesystem, modules are groups of directories. Today, the limit of where a module ends and another starts is decided solely based on the number of tokens in the files directly and indirectly within a given directory, but this could change in the future to take into consideration application and language boundaries.

These concepts are used when deciding what information we send to the LLM, and what the tool is allowed to change within the application's workspace. For that, we use the following concepts:

  • root_directory: the base directory in the application's workspace. That's where the .vyb directory is located. Every file is relative to this directory;
  • working_directory: this is the directory from where vyb is executed, it can be any directory within the root_directory, including the root_directory itself;
  • target_directory: some commands support target directory or a target file as argument. If a target file is provided, the target directory is the directory that contains that file. If none is provided, the target directory is the working directory;
  • root_module: this is the module represented by the root_directory. Every application has at least one module, and that is the root module;
  • working_module: is the module that contains the working directory.
  • target_module: is the module that contains the target directory.

The LLM can see any file under the working_module, and it can change any file under the working_directory. For efficiency reasons, we only include in the request the files under the working_module and the public context of the modules around it, but we should provide the LLM with tools to inquire either for more files within the working_module or more information outside it. This is covered in #10.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions