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: Apache 2.0 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.14.tar.gz (94.2 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.14-py3-none-any.whl (95.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: projektor-0.1.14.tar.gz
  • Upload date:
  • Size: 94.2 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.14.tar.gz
Algorithm Hash digest
SHA256 58f6c5e95503883fbc9a3830b15604664176cc9e17e43a2cbecc2449e18fffac
MD5 f31d716bcaa597ea6b7df533029ff98d
BLAKE2b-256 6a7825bebc3ec87e29cde78189c4215ce658705fcef3db722ce445eff19de903

See more details on using hashes here.

File details

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

File metadata

  • Download URL: projektor-0.1.14-py3-none-any.whl
  • Upload date:
  • Size: 95.9 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.14-py3-none-any.whl
Algorithm Hash digest
SHA256 19ab08b16ba467ad5d488e5cd76b55682b5711faddab771c2b972e462f9a6076
MD5 17450ff3332eb7c6262e2ae0d7be3ce8
BLAKE2b-256 2c1ba5f901026500551f7c93a7fd40c59b240d16d20207ce3a3093a65cd36239

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