An open API service indexing awesome lists of open source software.

https://github.com/presidio-oss/cline-based-code-generator

VS Code extension that streamlines development workflows through AI-powered task execution, intelligent file management, and automated code generation. Built on Cline, it integrates with various LLMs to enhance productivity and code quality while simplifying complex development tasks.
https://github.com/presidio-oss/cline-based-code-generator

claude-3-5-sonnet cline code-context code-generator code-index extension generative-ai gpt hai-build human-ai multi-modal owasp-top-10 presidio visual-studio-code

Last synced: 6 months ago
JSON representation

VS Code extension that streamlines development workflows through AI-powered task execution, intelligent file management, and automated code generation. Built on Cline, it integrates with various LLMs to enhance productivity and code quality while simplifying complex development tasks.

Awesome Lists containing this project

README

          


License
Issues
Stars
Forks







HAI Logo



# πŸš€ Code Generator

**HAI Code Generator** is a cutting-edge tool designed to simplify and automate task execution while enhancing code generation workflows. Leveraging Specif AI, it streamlines processes like task execution, file identification, and code documentation through intelligent automation and AI-driven capabilities.

> πŸ—οΈ **Built on [Cline](https://github.com/cline/cline)**'s powerful foundation for AI-assisted development.

## ⚑ Extended Feature Set

- [πŸ§‘β€πŸ’» Experts](#-experts) : Context-aware code generation with built-in and custom domain experts
- [✏️ Inline Editing](#-inline-editing) : Make quick, AI-assisted edits without leaving your codebase
- [πŸ“ HAI Tasks](#-hai-tasks) : Integrate AI-generated user stories and tasks seamlessly into your workflow
- [πŸ” File Identification](#-file-identification) : Discover and contextualize code files with intelligent indexing
- [βš™οΈ Settings Interface](#-settings-interface) : Easily configure LLMs and embedding models for tailored performance
- [πŸ“Š COR-Matrix Integration](#-cormatrix-integration) : Track AI code retention patterns and analyze code origin over time



HAI Demo

## Table of Contents

- [🌟 Overview](#-overview)
- [πŸ“₯ Getting Started](#-getting-started)
- [✨ Features](#-features)
- [🀝 Contributing](#-contributing)
- [πŸ“œ License](#-license)
- [πŸ™ Acknowledgments](#-acknowledgments)
- [πŸ“§ Contact](#-contact)

## 🌟 Overview

**HAI Code Generator** is designed to boost productivity and precision by automating task execution and integrating file management capabilities. It combines intelligent file indexing, context generation, and LLM-driven automation to minimize manual effort and ensure task accuracy. With user-friendly interfaces and configurable settings, HAI Code Generator is perfect for both developers and teams aiming to enhance their workflows.

## πŸ“₯ Getting Started
- Open Visual Studio Code β†’ Extensions (β‡§βŒ˜X) β†’ Search for β€œHAI Build” β†’ Click Install


HAI Demo

- Upon installation, the HAI extension can be found in the sidebar.


HAI Demo

## ✨ Features

### πŸ§‘β€πŸ’» Experts

The **Experts** feature enables HAI Code Generator to deliver context-aware code generation tailored to specific technologies or domains.


Experts Feature Demo

Experts


#### Built-in Experts

- Four built-in experts are available: **.NET, Terraform, Node.js, and Go**.
- Each provides predefined guidelines and best practices in read-only mode for quick reference.

#### Custom Experts

- Users can create custom experts to define their own guidelines and (optionally) attach up to three reference document links.
- Custom experts are stored in the `.hai-experts` folder under a subfolder named after the expert.
- Each expert folder contains:
- `metadata.json`: Stores expert name, creation date, and any document links.
- `prompt.md`: Contains the expert’s guidelines (required).
- If document links are provided, a `docs` folder is created with:
- Markdown files for each processed document.
- `status.json` to track processing status.

**Note:**
- Expert name and guidelines are mandatory when creating a custom expert.
- Document links are optional and can be added for richer context.

This feature allows you to extend HAI Code Generator’s knowledge with your own standards, best practices, and documentationβ€”ensuring more accurate and relevant code generation for your unique stack.

---

### ✏️ Inline Editing
Enhance your code editing experience with inline editing, allowing you to make changes directly within the codebase.


Inline Editing

Inline Editing


#### Seamless Quick Changes
- Click "Edit with hAI" and provide a brief prompt to effortlessly transform selected code.
- Perfect for quick edits or corrections without navigating away from your codebase.

---

### πŸ“ HAI Tasks
Harness the power of AI for seamless task management and user-story execution, HAI Code Generator integrates tasks generated by [Specif AI](https://github.com/presidio-oss/specif-ai), allowing them to be loaded directly into the HAI Tasks page. This streamlined process enables you to:

- **Review** AI-generated tasks within a dedicated interface.
- **Execute** them instantly with a single click.
- **Manage** all tasks in one place for improved clarity and productivity.

By centralizing AI-driven tasks in HAI Code Generator, you can maintain an efficient workflow from ideation to execution.





Tasks List Page with Tasks Loaded

Detailed View of HAI Tasks


- **In-Depth Story Review**
- View a story in detail by clicking the Eye icon, along with the corresponding list of tasks, providing comprehensive insights into objectives, prerequisites, and outcomes.

- **In-Depth Task Review**
- Similar to user stories, tasks can be viewed in detail and executed directly from the same interface.

---

### πŸ” File Identification
Enhanced file identification with intelligent discovery and retrieval:


File Identification

File Identification


#### Task-Based File Discovery
Transform the way you manage files by leveraging the core functionalities of **Task-Based File Discovery**, supported by advanced components like contextual code comments and indexing.

- **Contextual Code Comments**
- Automatically generate contextual comments for every identified file, offering deeper insights and clarifications.
- Store all generated comments in a dedicated folder, ensuring they are easily accessible without cluttering your codebase.

- **Faiss DB Indexing**
- Built on the robust vector-search engine, Faiss DB ensures real-time and highly accurate file indexing, enabling instant discovery of relevant files.
- Handles large repositories effortlessly, ensuring HAI Code Generator scales with your project's needs.

Together, these components form a cohesive system for efficient file identification, ensuring that Task-Based File Discovery is not just smart but also contextual.

---

### βš™οΈ Settings Interface
Customize and seamlessly integrate advanced language and embedding models into your AI-powered workflow, ensuring you stay at the forefront of AI innovations.
- **LLM Configuration**
- Seamlessly integrate and switch between various language models, ensuring compatibility with the latest AI advancements. Supported models include OpenRouter, Anthropic, Google Gemini, GCP Vertex AI, AWS Bedrock, OpenAI, OpenAI-Compatible models, LM Studio, and Ollama.

- **Embedding Configuration**
- Effortlessly configure and switch between supported embedding models, ensuring flexibility and adaptability for different use cases. Compatible embedding models include OpenAI-Compatible, OpenAI, and AWS Bedrock.


Settings Interface Screenshot

Settings Interface


---

### πŸ“Š COR-Matrix Integration
Track AI code retention patterns and analyze how much AI-generated code remains in your codebase over time.

- **Code Origin Tracking**: Monitor AI-generated code longevity and evolution patterns
- **Privacy-First**: Only cryptographic hashes are transmitted, your code stays local
- **Optional Integration**: Activate through workspace configuration when needed
- **Zero Performance Impact**: Background processing with graceful degradation

For detailed setup and configuration, see our [COR-Matrix Integration Guide](hai-docs/extended-feature-set/cormatrix-integration.md).

---

### πŸ“Š Telemetry
Configure external telemetry settings to monitor and analyze your AI-powered development workflows with environment-specific customization capabilities.

- **External Configuration Override**
- Support for telemetry configuration overrides via a `.hai.config` file placed at the root of your workspace.
- Enables environment-specific customization that can be dynamically injected through CI/CD pipelines.

- **Supported Override Parameters**
```
# Langfuse Configuration
langfuse.apiUrl=
langfuse.apiKey=
langfuse.publicKey=

# PostHog Configuration
posthog.url=
posthog.apiKey=
```

**Important Notes:**
- The `.hai.config` file is not git-excluded by default. Ensure sensitive keys are not committed unintentionally to your repository.

---

### πŸ“– Documentation
For comprehensive documentation and in-depth guides on HAI Code Generator features, visit our [Wiki](https://github.com/presidio-oss/cline-based-code-generator/wiki).

## 🀝 Contributing

To contribute to the project, start by exploring [open issues](https://github.com/presidio-oss/cline-based-code-generator/issues) or checking our [feature request board](https://github.com/presidio-oss/cline-based-code-generator/discussions/categories/feature-requests?discussions_q=is%3Aopen+category%3A%22Feature+Requests%22+sort%3Atop).

To get started with HAI Code Generator, follow these steps:

Local Development Instructions

1. Clone the repository _(Requires [git-lfs](https://git-lfs.com/))_:
```bash
git clone https://github.com/presidio-oss/cline-based-code-generator
```

2. Open the project in VSCode:
```bash
code cline-based-code-generator
```

3. Install the necessary dependencies for the extension and webview-gui:
```bash
npm run install:all
```

4. Launch by pressing F5 (or Run -> Start Debugging) to open a new VSCode window with the extension loaded. (You may need to install the [esbuild problem matchers extension](https://marketplace.visualstudio.com/items?itemName=connor4312.esbuild-problem-matchers) if you run into issues building the project.)


Please read our [Contributing Guidelines](./CONTRIBUTING.md) for more details.

## πŸ“œ License

This project is licensed under the Apache 2.0 License. See the [LICENSE](LICENSE) file for more details.

## πŸ™ Acknowledgments

Thanks to all contributors and users for their support and feedback.

## πŸ“§ Contact

For any questions or feedback, please contact us at [hai-feedback@presidio.com](mailto:hai-feedback@presidio.com).