skyl / corpora

Corpora is a self-building corpus that can help build other arbitrary corpora
GNU Affero General Public License v3.0
2 stars 0 forks source link

Implement Interactive 'workon' Command for File Refinement #28

Closed skyl closed 1 week ago

skyl commented 1 week ago

Objective

Develop a CLI command corpora workon <filepath> that opens an interactive REPL-like session. Users can provide natural language commands to iteratively refine the specified file, viewing and choosing possible revisions in each iteration. Utilize Retrieval-Augmented Generation (RAG) to provide contextually relevant suggestions.

Context

The project includes the corpora plan issue command which serves a similar purpose of interacting through a REPL to refine an issue creation. This command should draw from that design to help users refine a file through interactive commands.

Requirements

  1. Interactive Session: Enable users to initiate a session by running corpora workon <filepath>. The session should support:

    • Prompting the user for input as natural language commands or suggestions.
    • Displaying potential revisions of the file based on the input.
    • Allowing users to choose or reject revisions to iteratively refine the file.
  2. RAG Integration: Incorporate Retrieval-Augmented Generation for:

    • Providing contextual information to guide file edits.
    • Fetching relevant data from the existing corpus to enhance suggestions.
  3. User Experience: Ensure the interactive environment is intuitive and user-friendly. Feedback should be immediate, and users should feel in control of the file revision process.

Considerations

Outcome

A new CLI command corpora workon that enables an iterative, RAG-powered file refinement process, improving user interaction with the tools for enhancing corpora.