Skip to main content

LLM-orchestrated project management with DevOps automation for iterative development

Project description

Projektor ๐Ÿš€

LLM-Orchestrated Project Management with DevOps Automation

Python 3.10+ License: MIT Code style: black

Projektor to framework do automatycznego zarzฤ…dzania projektami programistycznymi z wykorzystaniem LLM do planowania i orkiestracji procesรณw DevOps.

๐ŸŽฏ Filozofia

LLM planuje. Kod wykonuje. System kontroluje.

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                         PROJEKTOR                                โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚                                                                  โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”     โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”     โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”     โ”‚
โ”‚  โ”‚   Roadmap    โ”‚     โ”‚   Tickets    โ”‚     โ”‚  Milestones  โ”‚     โ”‚
โ”‚  โ”‚   & Vision   โ”‚โ”€โ”€โ”€โ”€โ–ถโ”‚   & Tasks    โ”‚โ”€โ”€โ”€โ”€โ–ถโ”‚   & Releases โ”‚     โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜     โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜     โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜     โ”‚
โ”‚         โ”‚                    โ”‚                    โ”‚              โ”‚
โ”‚         โ–ผ                    โ–ผ                    โ–ผ              โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”    โ”‚
โ”‚  โ”‚                   LLM Orchestrator                       โ”‚    โ”‚
โ”‚  โ”‚              (Grok / Claude / GPT-4)                     โ”‚    โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜    โ”‚
โ”‚         โ”‚                    โ”‚                    โ”‚              โ”‚
โ”‚         โ–ผ                    โ–ผ                    โ–ผ              โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”     โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”     โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”     โ”‚
โ”‚  โ”‚    Code      โ”‚     โ”‚    Tests     โ”‚     โ”‚     Git      โ”‚     โ”‚
โ”‚  โ”‚   Executor   โ”‚     โ”‚    Runner    โ”‚     โ”‚   Manager    โ”‚     โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜     โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜     โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜     โ”‚
โ”‚         โ”‚                    โ”‚                    โ”‚              โ”‚
โ”‚         โ–ผ                    โ–ผ                    โ–ผ              โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”    โ”‚
โ”‚  โ”‚                   DevOps Pipeline                        โ”‚    โ”‚
โ”‚  โ”‚           (CI/CD, Deploy, Monitor, Rollback)            โ”‚    โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜    โ”‚
โ”‚                                                                  โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

โœจ Funkcjonalnoล›ci

๐Ÿ›ก๏ธ Monitorowanie Bล‚ฤ™dรณw (Nieinwazyjne)

  • Automatyczne przechwytywanie - globalny exception handler
  • Monitorowanie plikรณw - wykrywanie bล‚ฤ™dรณw skล‚adni przy zapisie
  • Integracja z pytest - automatyczne raportowanie bล‚ฤ™dรณw testรณw
  • Wielopoziomowe raportowanie - konsola, plik, GitHub Issues
  • Auto-fix z LLM - automatyczna naprawa bล‚ฤ™dรณw

๐ŸŽซ Zarzฤ…dzanie Projektami

  • Tickets - Tworzenie, ล›ledzenie i realizacja zadaล„
  • Roadmap - Planowanie dล‚ugoterminowe z wizjฤ… projektu
  • Milestones - Kamienie milowe i wydania
  • Sprints - Iteracyjne cykle rozwoju

๐Ÿค– Orkiestracja LLM

  • Planowanie - LLM analizuje ticket i generuje plan implementacji
  • Dekompozycja - Rozbicie zล‚oลผonych zadaล„ na atomowe kroki
  • Code Generation - Generowanie kodu zgodnego z architekturฤ…
  • Review - Automatyczna analiza i sugestie ulepszeล„

๐Ÿ”ง Automatyzacja DevOps

  • Code Execution - Bezpieczne wykonywanie zmian z walidacjฤ…
  • Testing - Automatyczne uruchamianie testรณw
  • Git Operations - Commity, branch'e, merge'e
  • CI/CD - Integracja z pipeline'ami

๐Ÿ“Š Analiza Projektu

  • TOON Parser - Analiza struktury projektu
  • Complexity Metrics - ลšledzenie zล‚oลผonoล›ci kodu
  • Coverage Tracking - Monitoring pokrycia testami
  • Progress Reports - Raporty postฤ™pu realizacji

๐Ÿš€ Szybki Start

Instalacja

# Podstawowa instalacja
pip install projektor

# Z wsparciem LLM
pip install projektor[llm]

# Peล‚na instalacja (z dev tools)
pip install projektor[all]

Konfiguracja

# (Rekomendowane) Skopiuj przykล‚ad i uzupeล‚nij wartoล›ci
cp .env.example .env

# Nastฤ™pnie uzupeล‚nij .env (OPENROUTER_API_KEY, OPENROUTER_MODEL, itp.)

# Alternatywnie moลผesz ustawiฤ‡ klucz API w shellu
export OPENROUTER_API_KEY="your-key"
# lub
export OPENAI_API_KEY="your-key"

Uลผycie CLI

# Inicjalizacja projektu
projektor init

# Status projektu
projektor status

# Monitorowanie plikรณw (file watcher)
projektor watch

# Wyล›wietl ostatnie bล‚ฤ™dy
projektor errors -n 10

# Tworzenie ticketu
projektor ticket create "Dodaj obsล‚ugฤ™ cache Redis" --priority high

# Realizacja ticketu (LLM + DevOps)
projektor work on PROJ-42

# Testy z trackingiem bล‚ฤ™dรณw
projektor test run --coverage

Nieinwazyjne Monitorowanie Bล‚ฤ™dรณw

# Najprostsza integracja - w __init__.py projektu:
from projektor import install
install()

# To wszystko! Bล‚ฤ™dy bฤ™dฤ… automatycznie przechwytywane.

Lub selektywnie z dekoratorami:

from projektor import track_errors, track_async_errors

@track_errors
def process_data(data):
    return transform(data)

@track_async_errors(context={"component": "api"})
async def fetch_data(url):
    return await http_get(url)

Lub z context managerem:

from projektor import ErrorTracker

with ErrorTracker(reraise=False) as tracker:
    result = risky_operation()

if tracker.had_error:
    print(f"Error logged: {tracker.ticket.id}")

Uลผycie jako biblioteka

from projektor import Project, Ticket, Orchestrator
from projektor.planning import Roadmap, Milestone, Sprint

# Zaล‚aduj projekt
project = Project.load("/path/to/project")

# Utwรณrz roadmap
roadmap = Roadmap(
    vision="System NLP do generowania komend DSL",
    milestones=[
        Milestone(
            name="v1.0 - Core",
            description="Podstawowa funkcjonalnoล›ฤ‡",
            deadline="2025-03-01",
            tickets=["PROJ-1", "PROJ-2", "PROJ-3"]
        ),
        Milestone(
            name="v1.1 - Thermodynamic",
            description="Optymalizacja termodynamiczna",
            deadline="2025-06-01"
        )
    ]
)

# Utwรณrz sprint
sprint = Sprint(
    name="Sprint 1",
    goal="Redukcja zล‚oลผonoล›ci cyklomatycznej",
    tickets=[
        Ticket(
            id="PROJ-42",
            title="Refaktoryzacja _prepare_shell_entities",
            description="Zredukuj CC z 91 do <15",
            priority="high",
            labels=["refactor", "complexity"]
        )
    ]
)

# Uruchom orkiestrator
orchestrator = Orchestrator(project, model="openrouter/x-ai/grok-3-fast")

# Realizuj ticket automatycznie
result = await orchestrator.work_on_ticket("PROJ-42")

print(f"Status: {result.status}")
print(f"Commits: {len(result.commits)}")
print(f"Tests: {result.test_results.passed}/{result.test_results.total}")

๐Ÿ“ Struktura Projektu

projektor/
โ”œโ”€โ”€ src/projektor/
โ”‚   โ”œโ”€โ”€ __init__.py          # Gล‚รณwne eksporty
โ”‚   โ”œโ”€โ”€ cli.py               # Interfejs CLI
โ”‚   โ”œโ”€โ”€ core/                # Podstawowe modele
โ”‚   โ”‚   โ”œโ”€โ”€ project.py       # Model projektu
โ”‚   โ”‚   โ”œโ”€โ”€ ticket.py        # Model ticketu
โ”‚   โ”‚   โ”œโ”€โ”€ config.py        # Konfiguracja
โ”‚   โ”‚   โ””โ”€โ”€ events.py        # System zdarzeล„
โ”‚   โ”œโ”€โ”€ planning/            # Planowanie
โ”‚   โ”‚   โ”œโ”€โ”€ roadmap.py       # Roadmapa projektu
โ”‚   โ”‚   โ”œโ”€โ”€ milestone.py     # Kamienie milowe
โ”‚   โ”‚   โ”œโ”€โ”€ sprint.py        # Sprinty
โ”‚   โ”‚   โ””โ”€โ”€ backlog.py       # Backlog
โ”‚   โ”œโ”€โ”€ orchestration/       # Orkiestracja LLM
โ”‚   โ”‚   โ”œโ”€โ”€ orchestrator.py  # Gล‚รณwny orkiestrator
โ”‚   โ”‚   โ”œโ”€โ”€ planner.py       # Planowanie zadaล„
โ”‚   โ”‚   โ””โ”€โ”€ executor.py      # Wykonawca planรณw
โ”‚   โ”œโ”€โ”€ devops/              # Automatyzacja DevOps
โ”‚   โ”‚   โ”œโ”€โ”€ git_ops.py       # Operacje Git
โ”‚   โ”‚   โ”œโ”€โ”€ test_runner.py   # Uruchamianie testรณw
โ”‚   โ”‚   โ”œโ”€โ”€ code_executor.py # Wykonywanie kodu
โ”‚   โ”‚   โ””โ”€โ”€ ci_cd.py         # Integracja CI/CD
โ”‚   โ”œโ”€โ”€ analysis/            # Analiza projektu
โ”‚   โ”‚   โ”œโ”€โ”€ toon_parser.py   # Parser TOON
โ”‚   โ”‚   โ”œโ”€โ”€ metrics.py       # Metryki kodu
โ”‚   โ”‚   โ””โ”€โ”€ reports.py       # Generowanie raportรณw
โ”‚   โ””โ”€โ”€ integrations/        # Integracje zewnฤ™trzne
โ”‚       โ”œโ”€โ”€ github.py        # GitHub API
โ”‚       โ”œโ”€โ”€ jira.py          # Jira API
โ”‚       โ””โ”€โ”€ slack.py         # Slack notifications
โ”œโ”€โ”€ tests/
โ”‚   โ”œโ”€โ”€ unit/
โ”‚   โ”œโ”€โ”€ integration/
โ”‚   โ””โ”€โ”€ e2e/
โ”œโ”€โ”€ docs/
โ”‚   โ”œโ”€โ”€ getting-started.md
โ”‚   โ”œโ”€โ”€ configuration.md
โ”‚   โ”œโ”€โ”€ api-reference.md
โ”‚   โ””โ”€โ”€ examples/
โ”œโ”€โ”€ examples/
โ”‚   โ”œโ”€โ”€ basic_usage.py
โ”‚   โ”œโ”€โ”€ sprint_workflow.py
โ”‚   โ””โ”€โ”€ ci_integration.py
โ”œโ”€โ”€ pyproject.toml
โ””โ”€โ”€ README.md

๐Ÿ”„ Workflow

1. Planowanie (Planning)

from projektor.planning import Roadmap, Milestone

# Zdefiniuj wizjฤ™ projektu
roadmap = Roadmap(
    vision="Stworzenie najszybszego systemu NLP w Polsce",
    goals=[
        "Osiฤ…gniฤ™cie <30ms latencji",
        "95% dokล‚adnoล›ฤ‡ dla polskiego NLP",
        "Integracja z Bielik"
    ]
)

# Dodaj kamienie milowe
roadmap.add_milestone(Milestone(
    name="MVP",
    deadline="2025-02-01",
    acceptance_criteria=[
        "5 adapterรณw DSL dziaล‚a",
        "Testy pokrywajฤ… 80% kodu",
        "Dokumentacja kompletna"
    ]
))

2. Tickety (Tickets)

from projektor import Ticket, TicketType, Priority

# Utwรณrz ticket
ticket = Ticket(
    id="PROJ-42",
    type=TicketType.TASK,
    title="Zrefaktoryzuj wysokฤ… zล‚oลผonoล›ฤ‡ w templates.py",
    description="""
    ## Problem
    Funkcja `_prepare_shell_entities` ma CC=91, co utrudnia utrzymanie.
    
    ## Rozwiฤ…zanie
    1. Wyodrฤ™bnij helper functions
    2. Uลผyj Strategy Pattern
    3. Dodaj testy jednostkowe
    
    ## Acceptance Criteria
    - [ ] CC < 15
    - [ ] 100% backward compatibility
    - [ ] Testy pokrywajฤ… nowe funkcje
    """,
    priority=Priority.HIGH,
    labels=["refactor", "complexity", "tech-debt"],
    story_points=5
)

3. Orkiestracja (Orchestration)

from projektor import Orchestrator

# Uruchom orkiestrator
orchestrator = Orchestrator(project)

# LLM analizuje ticket i generuje plan
plan = await orchestrator.plan_ticket(ticket)

print(f"Plan: {plan.description}")
print(f"Kroki: {len(plan.steps)}")
for step in plan.steps:
    print(f"  - {step.action}: {step.description}")

# Wykonaj plan (z kontrolฤ…)
result = await orchestrator.execute_plan(
    plan,
    auto_commit=True,
    run_tests=True,
    require_review=False  # True dla PR workflow
)

4. DevOps Pipeline

from projektor.devops import Pipeline, Stage

# Zdefiniuj pipeline
pipeline = Pipeline(
    stages=[
        Stage("lint", commands=["ruff check ."]),
        Stage("test", commands=["pytest tests/"]),
        Stage("build", commands=["python -m build"]),
        Stage("deploy", commands=["./deploy.sh"], 
              condition="branch == 'main'")
    ]
)

# Uruchom po commicie
result = await pipeline.run()

โš™๏ธ Konfiguracja

projektor.yaml

project:
  name: nlp2cmd
  version: 0.2.0
  language: python
  
llm:
  model: openrouter/x-ai/grok-3-fast
  temperature: 0.1
  max_tokens: 4000
  
orchestration:
  auto_commit: true
  run_tests: true
  max_iterations: 10
  
targets:
  max_complexity: 15
  min_coverage: 85
  
devops:
  git:
    branch_prefix: "feature/"
    commit_style: conventional
  ci:
    provider: github-actions
  notifications:
    slack_webhook: ${SLACK_WEBHOOK}

๐Ÿงช Testowanie

# Uruchom wszystkie testy
pytest

# Z pokryciem
pytest --cov=projektor --cov-report=html

# Tylko unit testy
pytest tests/unit/

# Testy integracyjne
pytest tests/integration/

๐Ÿ“š Dokumentacja

๐Ÿค Integracje

Platforma Status Opis
GitHub โœ… Issues, PRs, Actions
GitLab ๐Ÿ”„ Issues, MRs, CI
Jira โœ… Tickets sync
Linear ๐Ÿ”„ Issues sync
Slack โœ… Notifications
Discord ๐Ÿ”„ Notifications

๐Ÿ“Š Metryki

Projektor ล›ledzi:

  • Velocity - Story points per sprint
  • Cycle Time - Czas od ticketu do deploy
  • Code Quality - Complexity, coverage, lint
  • LLM Efficiency - Tokens, latency, cost
  • DevOps Health - Build time, deploy frequency

๐Ÿ›ก๏ธ Bezpieczeล„stwo

  • Kod generowany przez LLM jest walidowany przed wykonaniem
  • Backup przed kaลผdฤ… modyfikacjฤ…
  • Rollback w przypadku bล‚ฤ™dรณw
  • Brak bezpoล›redniego wykonywania shell commands z LLM
  • Kontrola uprawnieล„ dla operacji git

๐Ÿ“„ Licencja

Apache 2.0 License - zobacz LICENSE

๐Ÿ™ Podziฤ™kowania

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

projektor-0.1.7.tar.gz (88.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

projektor-0.1.7-py3-none-any.whl (90.5 kB view details)

Uploaded Python 3

File details

Details for the file projektor-0.1.7.tar.gz.

File metadata

  • Download URL: projektor-0.1.7.tar.gz
  • Upload date:
  • Size: 88.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for projektor-0.1.7.tar.gz
Algorithm Hash digest
SHA256 1459bd14a317f9ad8cddf0ba44a6f4ea1a07f4f49a57f82c013c70d0d0bf0951
MD5 eda1b983bf710061b87050edb1b5f61c
BLAKE2b-256 9af6ab0961a22dffa79034ce8b890f9757aaf9bc9499167744e65d4721f48f13

See more details on using hashes here.

File details

Details for the file projektor-0.1.7-py3-none-any.whl.

File metadata

  • Download URL: projektor-0.1.7-py3-none-any.whl
  • Upload date:
  • Size: 90.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for projektor-0.1.7-py3-none-any.whl
Algorithm Hash digest
SHA256 b43421107cac6016825f459508010b43e5ff620fe9a383ef48cda508c7107176
MD5 69804742346d99d34f556288ca0531f8
BLAKE2b-256 c75c50e42ba1bf13937a54b6164817d41e12abdcef48614370e5628d55b74282

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page