Metadata-Version: 2.4
Name: claude-on-django
Version: 0.1.0
Summary: Autonomous development framework for the Django-Bolt ecosystem
Project-URL: Homepage, https://github.com/beret/claude_on_django
Project-URL: Issues, https://github.com/beret/claude_on_django/issues
Author-email: Adam Mańczuk <beret@hipisi.org.pl>
License: MIT License
        
        Copyright (c) 2026 Adam Mańczuk
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
License-File: LICENSE
Keywords: agents,ai,autonomous,claude,django,swarm
Classifier: Framework :: Django
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
Requires-Python: >=3.12
Requires-Dist: django
Requires-Dist: msgspec
Requires-Dist: pydantic-ai
Requires-Dist: pydantic>=2.0
Provides-Extra: dev
Requires-Dist: hatch; extra == 'dev'
Requires-Dist: pytest; extra == 'dev'
Requires-Dist: pytest-asyncio; extra == 'dev'
Requires-Dist: ruff; extra == 'dev'
Description-Content-Type: text/markdown

# Claude-on-Django

An autonomous development framework for the Django-Bolt ecosystem. It leverages Claude Code (CLI) and native Agent Teams to orchestrate a swarm of specialized AI agents to build high-performance APIs.

## Overview

Claude-on-Django is a 'performance-first' autonomous swarm framework designed specifically for the Django-Bolt ecosystem. It bridges the gap between high-level Django development and the low-level performance requirements of modern, scalable web services.

## How It Works

Claude-on-Django creates a team of specialized AI agents:

- **Architect**: Coordinates development and makes high-level decisions.
- **Modeler**: Handles Django models, migrations, and async database design.
- **API Specialist**: Focuses on high-performance endpoints with `msgspec` and Actix-Web integration.
- **Views**: Creates UI templates and manages Django-specific frontend assets.
- **Services**: Implements business logic and the service layer.
- **QA Engineer**: Ensures comprehensive test coverage using `pytest` and TDD.
- **DevOps**: Handles deployment, infrastructure, and CI/CD pipelines.

Each agent works in their specific domain and can collaborate with other agents to implement complex features.

## Installation

You can install the library via pip:

```bash
pip install claude-on-django
```

After installation, initialize the framework in your Django project:

```bash
python manage.py claude_swarm_init
```

This will:
- Analyze your project structure.
- Generate a customized swarm configuration in `.claude/`.
- Create agent-specific system prompts.
- Set up an automated `CLAUDE.md` maintainer.

## Usage

### Natural Language Development

Once initialized, just describe what you want to build in the Claude interface:

```bash
# In your Django project directory
claude "Add user authentication with JWT and msgspec validation"
```

The swarm automatically:
- Analyzes your request.
- Delegates to appropriate specialists (Architect, Modeler, API Specialist, etc.).
- Implements across all layers (models, api, services, tests).
- Follows Django-Bolt performance best practices (async ORM, `msgspec`).

### Sample Commands

```
> Create a shopping cart with Stripe payment integration
[Complex features are automatically broken down and implemented]

> Optimize the dashboard - it's loading too slowly
[Performance improvements utilizing aget() and msgspec]

> Build a RESTful API for our mobile app with Bolt registration
[API development with high-performance routing]
```

## How It's Different

### Traditional Django Development with AI
When using AI assistants for Django development, you typically need to:
- Manually coordinate different aspects of implementation.
- Switch contexts between models, views, and tests.
- Manually ensure consistency and performance standards.

### Claude-on-Django Approach
With Claude-on-Django, the swarm automatically:
- Creates models with proper validations and associations.
- Implements high-performance APIs with `msgspec`.
- Adds comprehensive test coverage using `pytest`.
- Handles security considerations and async database access.
- Optimizes database queries automatically.

## Project Structure

After running the initialization, you'll have:

```
your-django-project/
├── CLAUDE.md                    # Project-specific context for Claude
└── .claude/
    └── agents/                  # Agent-specific system prompts
        ├── architect.md
        ├── modeler.md
        ├── api_specialist.md
        ├── views.md
        ├── services.md
        ├── qa_engineer.md
        └── devops.md
```

## Customization

### Agent Prompts
Customize agent behavior by editing prompts in `.claude/agents/`:
- Add project-specific conventions.
- Include domain knowledge.
- Define coding standards (e.g., mandatory use of async methods).

## Enhanced Documentation with MCP

Claude-on-Django includes a structure for an MCP (Model Context Protocol) server to provide your agents with real-time access to technical documentation and project metadata.

- **Up-to-date Documentation**: Agents access Django-Bolt resources.
- **API Metadata**: Real-time scanning of `api.py` registration metadata.
- **Consistent Standards**: All agents share the same documentation source.

## Testing with Sandbox

A sample project called `sandbox` is included for testing the framework in `examples/sandbox/`.

```bash
make sandbox-init
make sandbox-run
```

## Development

```bash
# Install dev dependencies
make dev-install

# Run tests
make test

# Lint
make lint
```

## License

MIT License - see [LICENSE](LICENSE) for details.
