AP0.5: Minimaler Vorhaben- und Maßnahmen-Slice mit Migration 006, CRUD, Assignments und Tests.
Deploy Development / deploy (push) Successful in 33s
Test Suite / pytest-backend (push) Failing after 28s
Test Suite / k6 /api/health Baseline (push) Has been skipped
Test Suite / playwright-smoke (push) Has been skipped
Test Suite / lint-backend (push) Successful in 7s
Test Suite / compose-smoke (push) Has been skipped
Deploy Development / deploy (push) Successful in 33s
Test Suite / pytest-backend (push) Failing after 28s
Test Suite / k6 /api/health Baseline (push) Has been skipped
Test Suite / playwright-smoke (push) Has been skipped
Test Suite / lint-backend (push) Successful in 7s
Test Suite / compose-smoke (push) Has been skipped
This commit is contained in:
1 parent
53047b6c16
commit
afa68150c0
15 files changed
+1544
-7
No files matched your search
@@ -0,0 +1,151 @@
|
||||
# AP0.5 – Abschlussbericht Minimaler Vorhaben- und Maßnahmen-Slice
|
||||
|
||||
**Status:** implementiert
|
||||
**Stand:** 2026-07-04
|
||||
**Version:** `0.5.0-ap0.5` · Schema `006`
|
||||
|
||||
---
|
||||
|
||||
## 1. Scope und Einordnung
|
||||
|
||||
AP0.5 liefert den **ersten fachlich nutzbaren Kairo-Slice**: Ein angemeldeter Actor kann innerhalb eines Tenants Vorhaben und Maßnahmen verwalten, zuweisen und seinen offenen Maßnahmen-Backlog abrufen.
|
||||
|
||||
| Anforderung (AP0.5) | Status |
|
||||
|---------------------|--------|
|
||||
| Migration `006` (initiatives, actions, action_assignments) | ✓ |
|
||||
| Tenant-Bezug für alle Objekte | ✓ |
|
||||
| Owner Actor für Initiative | ✓ |
|
||||
| Action gehört zu Initiative | ✓ |
|
||||
| Action → ein oder mehrere Actors (Assignments) | ✓ |
|
||||
| CRUD-Minimum Initiatives | ✓ |
|
||||
| CRUD-Minimum Actions | ✓ |
|
||||
| Endpoint „Meine offenen Maßnahmen“ | ✓ |
|
||||
| Statusmodell minimal | ✓ |
|
||||
| Priority minimal | ✓ |
|
||||
| Capability-Gates (4 neue Capabilities) | ✓ |
|
||||
| Audit bei Create/Update/Statuswechsel | ✓ |
|
||||
| Tests (Isolation, CRUD, Assignment, Status) | ✓ |
|
||||
| README/API-Doku | ✓ |
|
||||
|
||||
**Bewusst nicht in AP0.5:** Projects, Milestones, Programs, Reviews, Evidence, Blocker-Objekte, KI/Prompt-Erweiterung, MCP, automatische Priorisierung, komplexe UI, Workflow Engine.
|
||||
|
||||
---
|
||||
|
||||
## 2. Umgesetzte Dateien
|
||||
|
||||
### 2.1 Migration & Schema
|
||||
|
||||
| Datei | Zweck |
|
||||
|-------|--------|
|
||||
| `backend/migrations/006_initiatives_actions.sql` | Tabellen initiatives, actions, action_assignments |
|
||||
|
||||
### 2.2 Services
|
||||
|
||||
| Datei | Zweck |
|
||||
|-------|--------|
|
||||
| `backend/services/initiatives.py` | Vorhaben-CRUD, Validierung, Audit |
|
||||
| `backend/services/actions.py` | Maßnahmen-CRUD, Assignments, offene Maßnahmen |
|
||||
|
||||
### 2.3 API & Capabilities
|
||||
|
||||
| Datei | Zweck |
|
||||
|-------|--------|
|
||||
| `backend/routers/initiatives.py` | Initiative-Endpoints + nested Action-Create/List |
|
||||
| `backend/routers/actions.py` | Action-Endpoints + `/me/open` |
|
||||
| `backend/rights_registrations/initiative_ops.py` | 4 AP0.5-Capabilities |
|
||||
| `backend/rights_registrations/__init__.py` | Import initiative_ops |
|
||||
| `backend/main.py` | Router-Registrierung |
|
||||
| `backend/version.py` | `0.5.0-ap0.5`, Schema `006` |
|
||||
|
||||
### 2.4 Tests & Doku
|
||||
|
||||
| Datei | Zweck |
|
||||
|-------|--------|
|
||||
| `backend/tests/test_initiatives_actions.py` | CRUD, Isolation, Assignment, Status, Audit |
|
||||
| `backend/tests/test_migrations.py` | Migration 006 |
|
||||
| `backend/tests/test_rights_registry.py` | 16 Capabilities |
|
||||
| `README.md` | API-Doku AP0.5 |
|
||||
| `frontend/src/App.jsx` | Header AP0.5 |
|
||||
|
||||
---
|
||||
|
||||
## 3. Neue Migrationen
|
||||
|
||||
**`006_initiatives_actions.sql`**
|
||||
|
||||
| Tabelle | Zweck |
|
||||
|---------|--------|
|
||||
| `initiatives` | Vorhaben (tenant-scoped, owner_actor_id) |
|
||||
| `actions` | Maßnahmen (gehört zu initiative) |
|
||||
| `action_assignments` | Actor-Zuweisungen (n:m) |
|
||||
|
||||
---
|
||||
|
||||
## 4. Datenmodell
|
||||
|
||||
```
|
||||
tenants
|
||||
└── initiatives
|
||||
id, tenant_id, title, goal, status, priority
|
||||
owner_actor_id → actors
|
||||
└── actions
|
||||
id, tenant_id, initiative_id, title, description
|
||||
status, priority
|
||||
└── action_assignments
|
||||
id, tenant_id, action_id, actor_id
|
||||
UNIQUE (action_id, actor_id)
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 5. Endpoints
|
||||
|
||||
Siehe `README.md` — Abschnitt AP0.5.
|
||||
|
||||
---
|
||||
|
||||
## 6. Statusmodell
|
||||
|
||||
**Initiative:** `active` · `paused` · `completed` · `archived`
|
||||
|
||||
**Action:** `open` · `in_progress` · `blocked` · `done` · `discarded`
|
||||
|
||||
**Priorität:** `low` · `normal` · `high`
|
||||
|
||||
Offene Maßnahmen: Status ∈ `{open, in_progress, blocked}` und zugewiesen an `ctx.actor_id`.
|
||||
|
||||
---
|
||||
|
||||
## 7. Assignment-Modell
|
||||
|
||||
n:m über `action_assignments`; `PUT /api/actions/{id}/assignments` ersetzt die Liste; Validierung gegen Tenant-Actors.
|
||||
|
||||
---
|
||||
|
||||
## 8. Capability-Nutzung
|
||||
|
||||
`kairo.initiative.read/manage` · `kairo.action.read/manage` — Grants für tenant owner/admin/member.
|
||||
|
||||
---
|
||||
|
||||
## 9. Tenant-Isolation
|
||||
|
||||
Alle Queries tenant-scoped; Cross-Tenant → 404/400; Tests in `test_initiatives_actions.py`.
|
||||
|
||||
---
|
||||
|
||||
## 10. Tests
|
||||
|
||||
11 Tests in `test_initiatives_actions.py` + aktualisierte Registry/Migration-Tests.
|
||||
|
||||
Ausführung (Dev-Stack):
|
||||
|
||||
```bash
|
||||
docker compose -f docker-compose.dev-env.yml exec backend python -m pytest tests -ra -vv
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 11. Empfehlung nächster kleinster Slice
|
||||
|
||||
**AP0.6 – Kommentare pro Maßnahme** (`action_comments`, read/manage Capability, minimal Audit) — operativer Mehrwert ohne Projects/Milestones/KI.
|
||||
Reference in new issue
Block a user