Metadata-Version: 2.4
Name: abstract-compiler
Version: 0.0.1b1
Summary: Abstract is a natural language compiler
Author-email: Ramiro Visca <ramiroviszan@gmail.com>
License: Copyright 2025, Ramiro Visca
        
        Permission is hereby granted to any individual or organization ("You") to use this software ("Software") solely for the purpose of building, developing, and distributing software applications that depend on or interact with the Software.
        
        You may:
        - Use the Software in your applications.
        - Share the link to this project's repository.
        - Contribute to this project through pull requests.
        
        You may NOT:
        - Modify, fork, or create derivative works based on the Software unless doing so as a contribution to the main repository (e.g., via pull request or patch submission approved by the maintainers).
        - Distribute the Software (including its source code or binaries derived from it), sublicense it, or sell it separately or as part of another tool.
        - Include the Software (source code or derived binaries) in any other repository.
        - Remove or alter any copyright notices or this license.
        - Store the Software's source code or binaries in your own code or data repositories. You may only store configuration files or assets that the Software depends on, not the Software's code itself.
        
        The Software is provided "as is", without warranty of any kind.
        
        By using the Software, you agree to the terms above.
        
        Ramiro Visca
        2025
        
Requires-Python: >=3.12
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: python-dotenv
Dynamic: license-file

# Abstract

Abstract is a bold attempt to bridge two worlds: the accelerating pace of innovation and the enduring value of human creativity in software development. Its core mission is to keep humans in command of what we do best—designing elegant, intentional software systems—without being shackled to any specific programming language or tech stack.

Rather than acting as a generic AI assistant that mimics human work, Abstract preserves the essence of software craftsmanship. It welcomes innovation, but not at the cost of thoughtfulness. It respects efficiency, but not as an obsession. It’s about writing software with intent, clarity, and ownership—where abstraction is not just a coding technique but a philosophy.

At its heart, Abstract is a natural language compiler. You describe your architecture, logic, or components in natural language, and Abstract compiles them into your target language. The cleaner your abstractions, the more portable and robust your code becomes.

Abstract enforces the SOLID principles by modeling your software’s dependency graph. This approach encourages cleaner boundaries, eliminates circular dependencies, and reduces the likelihood of hallucinated or unintended AI outputs. It shortens model context windows, increasing clarity and precision in code generation.

Abstract is model-agnostic, IDE-independent, and aims to be completely open, free, and interoperable with any ecosystem.

## Usage Examples 

- https://github.com/ramiroviszan/abstract-examples

## 🔧 Features
- Inversion of Control: Define what should be built in natural language and where it goes. Let Abstract handle the translation to the target codebase.

- Natural Language Compilation: Write software specs in plain language and compile them to multiple supported stacks.

- Dependency Graph-Based Compilation: Models your codebase as a graph to enforce clean module boundaries and reduce complexity.

- Prompt Optimization via Dependency Graph: Uses the graph to build precise prompts, reducing context length and improving output quality.

- Enforces Good Practices:

    - Encourages absence of circular dependencies

    - Promotes clean abstractions and modular architecture

    - Single Responsibility Principle by design

- Language Agnostic: Target multiple languages seamlessly.

- Model Agnostic: Compatible with any LLM provider (OpenAI, Anthropic, local models, etc.).

- IDE Independent: Integrate with any development environment of your choice.

- Global Context Management: Keep track of architecture-level concerns across the codebase.

- Global Instructions: Maintain architectural or project-wide goals and constraints.

- Auto Code Review & Suggested Next Steps (Optional): Get continuous feedback and guidance from the compiler.

- Compilation Cache: Speeds up recompilation by storing intermediate artifacts.

- Supported Model Providers:

    - OpenAI

- Supported Stacks:

    - React (TypeScript & JavaScript)

    - React Native (TypeScript & JavaScript)

    - Angular (TypeScript)

    - Vue (TypeScript & JavaScript)

    - Node (TypeScript & JavaScript)

    - Python

    - C#

    - Rust

    - Golang

    - Java

    - Kotlin

    - iOS (Swift)

    - HTML


## 🚧 Development Roadmap
- Full CLI Interface

- Support for new project bootstrapping based on stack

- Integration with existing codebases

- Support Model Providers APIs:

    - Ollama

    - Anthropic

    - others

- Extend support and examples for:

    - Angular (TypeScript)

    - Vue (TypeScript & JavaScript)

    - Node (TypeScript & JavaScript)

    - C#

    - Rust

    - Golang

    - Java

    - Kotlin

    - iOS (Swift)


## 🛠️ Installation
   
   ```bash
    pip install abstract-compiler
   ```


## 🚀 Usage
It is highly recommended to explore the provided examples before starting. (https://github.com/ramiroviszan/abstract-examples)

### Setup

1. Add and customize the following configuration files in the root of your project:

   * `ab.config` – Project structure and stack settings
   * `instructions.config` – Global development and architectural guidelines
   * `ab.debug` – Add this file if you want Code reviews & Next steps suggestions outputed to 'ab.md'.

2. Create a `.env` file in the project root containing your LLM API key:

   ```
   MODEL_API_KEY=your-model-api-key
   ```

3. Create `.ab` files to define your modules in natural language.

4. At the top of your `.ab` files, import any dependencies or shared components you want to reference.

### Compile

To translate your `.ab` files into code:

```bash
abstract [--verbose] [--root path/to/root/folder/]
```

Optional flags:

* `--verbose`: Show detailed output of the compilation process
* `--root`: Set a custom root directory for compilation


## 🛠️ Development Installation
Follow these steps to set up Abstract development environment locally:

1. **Clone the repository:**

   ```bash
   git clone https://github.com/ramiroviszan/abstract.git
   cd abstract
   ```

2. **Install Python 3.12 or higher.**

3. **Create and activate a virtual environment:**

   ```bash
   python -m venv venv
   source venv/bin/activate  # On Windows: venv\Scripts\activate
   ```

4. **Install dependencies:**

   ```bash
   pip install -r requirements.txt
   ```

5. **Setup CLI**

   ```bash
   pip install -e .
   ```
