LLM-orchestrated project management with DevOps automation for iterative development
Project description
Projektor ๐
LLM-Orchestrated Project Management with DevOps Automation
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file projektor-0.1.6.tar.gz.
File metadata
- Download URL: projektor-0.1.6.tar.gz
- Upload date:
- Size: 87.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7fa816d880b7ab223059c65a2ba2d73f23b8ca11aee4389c7ecab5c8763e5764
|
|
| MD5 |
12a08db41a40973b01b93fdb1482d2fc
|
|
| BLAKE2b-256 |
1768407f981c1e34c8101607920ce7dceab7e181e8b8a5edd31ea33605f12b64
|
File details
Details for the file projektor-0.1.6-py3-none-any.whl.
File metadata
- Download URL: projektor-0.1.6-py3-none-any.whl
- Upload date:
- Size: 89.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
19cf6fd2585768adfe6b74da7157e9207dc0a02376d7bc95846c0ad4d94461e4
|
|
| MD5 |
6bb5811b799383509dcef0658b0b0115
|
|
| BLAKE2b-256 |
3f77708846fb38f0f240866aeab0428166d1a07be8d68e4f990dbd93fde616d9
|