Track HiveGrid Cloud planning reference

This commit is contained in:
david committed 2026-06-26 20:48:01 +02:00
1 parent b3d5ea6764
commit e341c5938a
5784 files changed
+1104929 -3

No files matched your search

@@ -0,0 +1,4 @@
# Generierte/transiente Plane-Artefakte (kein Repo-Inhalt)
plane-snapshot.json
plane-backup-*.json
__pycache__/
@@ -0,0 +1,108 @@
# Kohärenz-Audit HiveGrid 2.0 — Findings
**Erstellt:** 2026-06-16 · **Modus:** read-only · **Quellen:** PHASE-SOURCES.md, ROADMAP.md, ROADMAP-V2.md, ENTITY-MODEL.md, SCOPE-V1-CUTS.md, REQUIREMENTS.md, plane-snapshot.json (135 Tickets)
**Maßstab:** AD-20 (projekt-zentrisch) · KWP komplett v2 · Mobile PWA-only v1+v2 · v1 DE-only · Pipeline-Rechte (PipelineFieldVisibility) komplex schon v1.
**Befund in einem Satz:** Struktur (Phasen↔Tickets, Milestone-Integrität, Scope-Cuts KWP/PWA/DE) ist überwiegend kohärent. Die kritische Inkohärenz-Wolke liegt am **noch nicht vollzogenen Pivot-Re-Fit (R-REFIT offen)**: ROADMAP/REQUIREMENTS/PHASE-SOURCES für P6–P9 beschreiben durchgehend noch das alte Deal/Auftrag-Entity-Modell, während ENTITY-MODEL.md (16.06. LOCKED) und die Plane-Tickets bereits projekt-zentrisch sind.
---
## Achse A — Ticket ↔ Phasen-Abdeckung
**Gesamtbild: kohärent.** Jede v1-Phase P1–P21 (außer P10/P18 = v2) hat ≥1 Dev-Ticket (R-*/AK-*); jede v2-Phase P22–P34 hat ≥1 VR-*/VA-*. Kein Phasen-Loch, kein Dev-Ticket ohne Phase.
| Befund | Schwere | Beleg | Inkohärenz | Empf. Fix |
|---|---|---|---|---|
| A-1 | klein | plane-snapshot: P10 (KWP) + P18 (Portal) ohne R-*/AK-* | KORREKT — beide sind deferred; nur zur Bestätigung gelistet, kein Finding | — |
| A-2 | klein | VR-P28a + VA-P28b teilen sich P28; VR-P32a/b/c → P32 | Mehrere Tickets je Phase = gewollter Split. Kein Problem, nur dokumentieren, dass Phase↔Ticket 1:n ist | — |
**Zahl Achse A: 0 echte Findings** (alle 21 v1- und 13 v2-Phasen abgedeckt; alle 135 Tickets einer Phase/Spur zuordenbar).
---
## Achse B — Pivot-Reste (Deal/Sales-Pipeline/Verkaufsfall/Auftragspipeline als Eigen-Entität)
Maßstab AD-20: „Deal"/„Auftrag" = Pipeline-TYPEN, keine eigenen Entitäten; ein `Projekt`-Kern; Lead→Projekt.
| Befund | Schwere | Beleg | Inkohärenz | Empf. Fix |
|---|---|---|---|---|
| B-1 | kritisch | REQUIREMENTS.md:33 `REQ-sales-datenmodell`; :41 `REQ-projekt-datenmodell` | Definieren `Deal`, `LostReason`, `ProjectPipeline`, `Project`, `AcceptanceProtocol`, `ProjectTemplate` als getrennte Entitäten — widerspricht „ein Projekt-Kern". ENTITY-MODEL.md kennt nur `Projekt`/`Pipeline`/`PipelineStage`/`AbnahmeProtokoll` | REQ-Texte gegen ENTITY-MODEL.md neu fassen (R-REFIT-DoD „REQUIREMENTS P6–9 nachgezogen") |
| B-2 | kritisch | REQUIREMENTS.md:35 `REQ-sales-deal-lifecycle`: „…Won-Handoff zu M4…" | „Won-Handoff" ist im Pivot explizit gestrichen (ENTITY-MODEL.md:53 „kein Won-Handoff, das Projekt wechselt nur die Pipeline") | Req auf „Pipeline-Wechsel statt Won-Handoff" umschreiben |
| B-3 | kritisch | REQUIREMENTS.md:15 `REQ-crm-lead-promotion` + Traceability :304 | Req „Lead-zu-Contact-Promotions-Modal, 4 Optionen" ist laut REQUIREMENTS.md:6 + ENTITY-MODEL.md:53 **entfallen** (Lead→Projekt, kein Modal), steht aber noch als aktive `- [ ]`-Zeile UND in der Traceability-Tabelle (P6) | Req entfernen/ersetzen durch `REQ-lead-projekt-konvertierung`; Traceability-Zeile löschen → senkt v1-Req-Zahl |
| B-4 | mittel | ROADMAP.md:146 (P6 SC#4): „…Lead kann per Promotions-Modal (Auto-Email-Match, 4 Optionen) transaktional zum Contact werden" | Identischer Pivot-Widerspruch im Success-Criterion; Ticket R-P6-DoD sagt dagegen korrekt „Lead→Projekt (AD-20)" — ROADMAP hinkt dem Ticket hinterher | SC#4 auf Lead→Projekt umschreiben |
| B-5 | mittel | PHASE-SOURCES.md:53 „## Phase 8: **Sales-Pipeline**"; :58 „## Phase 9: **Auftrags-/Projektpipeline**" | Phasen-Namen-Drift: PHASE-SOURCES nennt P8/P9 noch nach altem Modell. ROADMAP.md:168/185 trägt bereits „→ Projekt & Pipelines (Teil 1/2)". Inkonsistenz zwischen den beiden Steuerdateien | PHASE-SOURCES-Header an ROADMAP angleichen („Projekt & Pipelines Teil 1/2") |
| B-6 | mittel | PHASE-SOURCES.md:54 Spec-Ref „M03-sales-pipeline.md"; :59 „M04-auftragspipeline.md" + Milestone-Namen :55/:60 (`M060-verkaufsfall-crud`, `M065-auftragspipeline-konfiguration`) | Milestone-/Spec-Bezeichner tragen noch die alte getrennte Deal/Auftrag-Welt. Laut Pivot-Note PHASE-SOURCES.md:12 sollen P6–9-Maps „neu geschnitten" werden — noch nicht erfolgt | Beim R-REFIT die Milestone-Maps konsolidieren bzw. Namen als historisch markieren |
| B-7 | mittel | ROADMAP.md:171 (P8 Goal) + :194 (P9 SC#1) | P8-Goal „führt Deals durch mehrere SHK-Pipelines"; P9-SC#1 „ProjectPipeline, Project … entstehen aus dem Sales-Won-Handoff" — beide noch alt-modelliert trotz Pivot-Note direkt darüber (:169/:186) | Goal/SC unter den Pivot-Notes nachziehen |
| B-8 | klein | REQUIREMENTS.md:6 kündigt `REQ-rechnung-sub-entity (NEU, E3)` an | Der einzige echte v1-Scope-Zuwachs des Pivots (Rechnung-Sub-Entity) ist **nirgends als Requirement angelegt** (nicht in Req-Liste, nicht in Traceability) — obwohl R-P9a-DoD „Rechnung = neues Sub-Entity v1" baut | `REQ-rechnung-sub-entity` als v1-Req + Traceability-Zeile (P9) ergänzen |
| B-9 | klein | REQUIREMENTS.md:12/:17/:152 etc. „Contact, Company"; ENTITY-MODEL.md:26 erklärt Mapping | Begriffe Contact/Company statt Kontakt(-Oberbegriff)/Organisation. ENTITY-MODEL.md erklärt dies als zulässiges Alias — daher nur kosmetisch, aber beim Re-Fit zu vereinheitlichen | Beim R-REFIT Terminologie angleichen (Kontakt/Organisation) |
**Zahl Achse B: 9 Findings** (3 kritisch, 4 mittel, 2 klein). Gemeinsame Wurzel: **R-REFIT (W1-Ticket) noch offen** — die Single-Source ENTITY-MODEL.md ist gelockt, die abgeleiteten Steuerdokumente sind nicht nachgezogen.
---
## Achse C — Scope-Cut-Konsistenz (KWP-v2 / PWA-only / DE-only / v1-v2-Zuordnung)
| Befund | Schwere | Beleg | Inkohärenz | Empf. Fix |
|---|---|---|---|---|
| C-1 | mittel | EXT-04 (Ticket) description: „➡️ blocks: **v2-P10** (KWP-Integration)"; auch N-KWP blockt EXT-04 → „v2-P10" | KWP ist in ROADMAP/ROADMAP-V2 jetzt **Phase 32** (ex-P10). „v2-P10" ist die interne ROADMAP-V2-Spur-Nummer (dort heißt KWP „v2-P5"!). Drei verschiedene Nummern für dieselbe Sache (P10 / P32 / v2-P5) → Verwechslungsgefahr | EXT-04/N-KWP-Beschreibung auf „P32 (= ROADMAP-V2 v2-P5)" vereinheitlichen |
| C-2 | mittel | ROADMAP-V2.md durchgängig „v2-P1…v2-P11" vs. ROADMAP.md „Phase 22…34" | Zwei parallele v2-Nummernkreise (ROADMAP-V2 1–11 vs. ROADMAP 22–34). Tickets nutzen 22–34. Mapping nur implizit. KWP = v2-P5 (ROADMAP-V2) = P32 (ROADMAP) = ex-P10 | Eine Mapping-Tabelle „v2-Px ↔ Phase 22–34 ↔ ex-Pn" an den Kopf von ROADMAP-V2 setzen |
| C-3 | klein | PHASE-SOURCES.md:241 Ownership-Register-Zeile „**P10 KWP** … v2-P10 integriert sich rückwirkend" | Nutzt ebenfalls „v2-P10" (=P32). Konsistent mit der falschen Nummer aus C-1, aber drift gegen ROADMAP-V2-„v2-P5" | Bei C-1/C-2-Fix mitziehen |
| C-4 | klein | SCOPE-V1-CUTS.md:56 (#7) „Telefonie bleibt KOMPLETT v1 (M105–M109 inkl. AirCall … **HalloPetra**)"; :87 „Telefonie voll (inkl. HalloPetra)" | Widerspruch INNERHALB von SCOPE-V1-CUTS: #10 (:73) und FINALER SCHNITT verschieben HalloPetra (M105) → v2; #7/#87 behaupten noch HalloPetra v1. ROADMAP/PHASE-SOURCES haben M105→v2 korrekt | #7- und :87-Klammer „inkl. HalloPetra" als überholt markieren (von #10 ersetzt) |
| C-5 | klein | SCOPE-V1-CUTS.md:12/:16 (#1) Expo-Text vs. #14 (:177) PWA-only | #1 sagt „v2-App mit Expo"; #14 nimmt das zurück (PWA-only). #1 ist mit Durchstreichung + Verweis auf #14 annotiert → noch konsistent lesbar, aber der Cut-Log enthält zwei gegensätzliche Aussagen ohne Top-Level-Hinweis | OK (annotiert); optional Kopf-Notiz „Tech-Teil von #1 durch #14 überholt" |
| C-6 | klein | ROADMAP.md:407 (P24 Risiko): „Apple Guideline 3.1.3(c) ist der Grund, warum Self-Service v2 ist" | Widerspricht #14 (PWA-only, kein App-Store) und ROADMAP-V2.md:86, das genau diesen Grund explizit als überholt erklärt („nicht mehr wegen Apple-Store-Auflagen"). ROADMAP.md (v1-Datei) ist hier stale | P24-Risiko-Zeile auf „Grund = konkrete Preise (EXT-14), nicht Apple" angleichen |
| C-7 | klein | PWA/DE-only sonst | PWA-only (AD-17) und DE-only (M029→v2) sind in ROADMAP, PHASE-SOURCES, REQUIREMENTS, ENTITY-MODEL durchgängig konsistent — KEIN Finding, positiv vermerkt | — |
**Zahl Achse C: 6 Findings** (0 kritisch, 2 mittel, 4 klein). KWP-v2 inhaltlich überall korrekt; die Reste sind Nummern-/Begründungs-Drift, kein Scope-Widerspruch.
---
## Achse D — Milestone-Integrität (Behauptung „176, jeder genau einer Phase")
**Maschinen-Check (Skript über PHASE-SOURCES.md):**
- Distinct M001–M176 referenziert: **176/176** ✓
- Explizit einer Phase zugeordnete Milestones: **176** ✓
- Doppelt zugeordnete Milestones: **0** ✓
- Milestones ohne Phasen-Zuordnung: **0** ✓
- Summe v1 133 + v2 43 = **176** ✓ (PHASE-SOURCES.md:218/:226 deckungsgleich)
| Befund | Schwere | Beleg | Inkohärenz | Empf. Fix |
|---|---|---|---|---|
| D-1 | mittel | PHASE-SOURCES.md:55 `M064-pipeline-reporting-**kwp-sync**`; :60 `M066-auftrag-crud-**kwp-archiv**`, `M069-abnahme-workflow` (KWP-Archiv-Anteil) — alle in v1-Phasen P8/P9 | Maßstab: KWP-Anteile in v1-Milestones müssen Extension-Points-only/v2 sein. Das ist in :61 als Note geregelt („KWP-Archiv-Anteile von M066/M069 ruhen bis v2-P10") — aber die Milestone-NAMEN tragen KWP weiter, was beim Plan-Lauf KWP-Bau triggern könnte | Beim R-REFIT/Plan-Phase die KWP-Tokens aus den v1-Milestone-Namen entfernen oder Note an die Namens-Zeile heften |
| D-2 | klein | PHASE-SOURCES.md:8 „verifizierte Summe: 176 Milestones … 36 Modul-Specs"; vs. ROADMAP-V2.md:212 „aus 18 Modul-Specs" | Unterschiedliche Spec-Zahlen (36 vs. 18) — 18 = nur v2-relevante Teilmenge, nicht falsch, aber ohne Erklärung verwirrend | Klarstellen „18 v2-relevante von 36 Specs" |
| D-3 | klein | ROADMAP.md:581/:584/:585/:586 Changelog: 109 → 94 → 93 → 90 Reqs; SCOPE-V1-CUTS.md:81/:89/:98 „147 / 160 / 165 MS" | Historische Zwischenstände im selben File; der finale Stand (133 MS / 90 Reqs, ROADMAP.md:586) ist eindeutig. Frühere Zahlen sind als „Revidiert"-Historie markiert → kein echter Widerspruch, nur Lese-Stolperfalle | Optional: „(historisch, siehe finalen Stand)" an die Bilanz-Zeilen #10/#FINAL in SCOPE-V1-CUTS |
| D-4 | klein | SCOPE-V1-CUTS.md:173 (#13) „MS/Reqs-Bilanz: noch nicht final neu gezählt" | Der Pivot (Rechnung +1 Req, Lead-Promotion −1 Req, Deal+Project-Milestone-Konsolidierung) ist in der 176/90-Zählung **nicht** nachgeführt — die „176"-Summe ist die Vor-Pivot-Zahl. Konsistent gezählt, aber gegen den gelockten Pivot veraltet | Nach R-REFIT MS/Req-Summe neu ziehen (B-3 −1, B-8 +1) |
**Zahl Achse D: 4 Findings** (0 kritisch, 1 mittel, 3 klein). **Summe-Check-Zahl: 176 ✓ (133 v1 + 43 v2), 0 doppelt, 0 verwaist.** Die Integrität der Maschinen-Buchhaltung steht; offen ist nur die Pivot-Nachzählung (D-4) und KWP in v1-Namen (D-1).
---
## Achse E — Ticket-Inhalt vs. Phase/Modell
| Befund | Schwere | Beleg | Inkohärenz | Empf. Fix |
|---|---|---|---|---|
| E-1 | mittel | Ticket **R-P8a** name: „P8 Pipeline-Engine + **Deal-CRUD** + Auto-Verkaufsfall"; DoD „Pipeline/Stage/**Deal** + HiveNumberSeq" | Ticket-Titel/DoD nennen „Deal-CRUD"/„Deal" als Entität — im Pivot ist Deal nur ein Pipeline-Typ des Projekt-Kerns. Inkonsistent mit R-P8a-Doku-Ref ENTITY-MODEL.md (Projekt-Kern) und mit R-P9a-DoD, das es richtig macht („kein Won-Objekt") | DoD auf „Projekt-CRUD in Sales-Pipeline-Sicht" umformulieren |
| E-2 | mittel | Tickets R-P8a/R-P8b Doku-Ref: nur `M03-sales-pipeline.md` + ENTITY-MODEL; R-P9a/b: `M04-auftragspipeline.md` | Tickets referenzieren weiter die ungeschnittenen alt-modellierten Specs (M03/M04). Bis R-REFIT die Specs nachzieht, liest der Coding-Agent widersprüchliche Quellen (Spec = Deal/Auftrag-getrennt, ENTITY-MODEL = Projekt-Kern) | R-REFIT muss M03/M04-Spec-Deltas erzeugen ODER Tickets auf ENTITY-MODEL als Vorrang-Quelle festnageln |
| E-3 | mittel | Ticket **R-P8a** DoD enthält **kein PipelineFieldVisibility / Field-Level-Rechte**; R-P8b-DoD: nur „Field-Level-Permissions (Volumen)" | Maßstab #5: Pipeline-Rechte komplex schon v1 — neue Tabelle `PipelineFieldVisibility` (ENTITY-MODEL.md:136, Entsch. 16.06.). Kein Ticket nennt PipelineFieldVisibility/PipelineFieldConfig/PipelineAccess explizit; R-P8a baut „Pipeline-Engine" ohne die drei Rechte-Tabellen im DoD | DoD von R-P8a um PipelineFieldConfig/-Access/-Visibility ergänzen (sonst v1-Pflicht-Feature ungeticktet) |
| E-4 | klein | Ticket **R-P9a** DoD: „Sub-Areas: Termine/Rechnungen/Checklisten/Tasks/Doku" + „Rechnung = neues Sub-Entity v1" | KORREKT projekt-zentrisch (Gegenprobe bestanden) — bestätigt, dass die Tickets dem Modell näher sind als ROADMAP/REQUIREMENTS. Kein Finding, positiv | — |
| E-5 | klein | Ticket **EXT-04** DoD ok, aber „blocks: v2-P10" (siehe C-1) | Nummern-Drift (dort behandelt) | siehe C-1 |
| E-6 | klein | Ticket **R-REFIT** DoD: „REQUIREMENTS P6–9 nachgezogen / SCREEN-MAP §2–4 / PHASE-SOURCES P6–9 re-mapped" | Bestätigt: alle Achse-B-Findings sind durch dieses **eine offene W1-Ticket** abgedeckt. R-REFIT blockt R-P6/R-P7/R-P9a → solange offen, sind B-1…B-9 + E-1…E-3 erwartbar | R-REFIT priorisiert abschließen (es ist der Single-Point-of-Fix für die Pivot-Reste) |
**Zahl Achse E: 6 Findings** (0 kritisch, 3 mittel, 3 klein). Tickets sind **moderner** als die Prosa-Docs (gut), aber R-P8a trägt „Deal-CRUD" und keinem Ticket-DoD steht das v1-Pflicht-Feature PipelineFieldVisibility.
---
## Gesamt-Bilanz
| Achse | Findings | kritisch | mittel | klein |
|---|---|---|---|---|
| A Ticket↔Phase | 0 | 0 | 0 | 0 |
| B Pivot-Reste | 9 | 3 | 4 | 2 |
| C Scope-Cuts | 6 | 0 | 2 | 4 |
| D Milestone-Integrität | 4 | 0 | 1 | 3 |
| E Ticket-Inhalt | 6 | 0 | 3 | 3 |
| **Summe** | **25** | **3** | **10** | **12** |
**Milestone-Summe-Check: 176 ✓** (133 v1 + 43 v2; 0 doppelt zugeordnet, 0 verwaist, M001–M176 vollständig).
**Single-Point-of-Fix:** Das offene W1-Ticket **R-REFIT** (ER-Modell-Re-Fit P6–P9) adressiert direkt B-1…B-9 und E-1…E-3. Es abzuschließen löst alle 3 kritischen + die Mehrzahl der mittleren Findings. Restliche Findings (C-1/C-2 Nummern-Drift, C-4/C-6 stale Begründungen, D-1 KWP in v1-Namen, D-4 Pivot-Nachzählung) sind unabhängige Kleinfixes.
@@ -0,0 +1,106 @@
# Phasen-Review — Changeset (Durchgang ab 16.06.)
Beschlossene Änderungen aus dem gemeinsamen Phasen-Durchgang (Raffael + Claude).
Werden **gebündelt** angewendet: Doku-Edits direkt, Plane-Writes via `scrub_plane.py`-Muster (dry-run zuerst).
Status je Eintrag: **OFFEN** bis angewendet → dann **DONE**.
## ✅ DOKU-NACHZÜGE 16.06. (nach Plane-Operation)
- **entity-model.dbml**: `pipeline_field_visibility` NEU (Field-Level-Rechte) · `projekt_externes_feld` → [v2] · Header + SVG-Regenerier-Hinweis.
- **entity-model.svg**: ⚠ NICHT auto-regenerierbar (dbdiagram.io-Export) — manuell neu exportieren (Hinweis im dbml-Header).
- **ENTITY-MODELL-ERKLAERUNG.md + .pdf**: KWP-Felder → „ab Version 2", Pipeline-Rechte „voll ausgebaut" (Field-Level je Rolle); PDF neu gerendert.
- **SCREEN-MAP.md §2–4 + _bmad-output/specs/M01–M04**: projekt-zentrisch nachgezogen (Pivot-Hinweis-Blöcke + inline-Entschärfung; tiefere pre-pivot-Stellen bewusst belassen, durch Blöcke abgedeckt). Damit ist der R-REFIT-Pivot in ALLEN Steuerdocs vollzogen.
- **Kohärenz-Findings**: C-5 (Cut-#1-Header), D-2 (18-von-36-Specs in ROADMAP-V2) gefixt; D-3 durch Chronologie ausreichend.
- **D-P2 nachgelegt** (war im Anlege-Skript übersehen) → Plane-Ticket + start_date + DAYPLAN.
- **Vollständigkeits-Check**: 154 aktive Board-Tickets ↔ 154 Doc-Dateien, ALLE mit Doc-Link in Description, 0 Lücken; 3 Cancelled ohne Doc (korrekt).
---
## ✅ ABGESCHLOSSEN 16.06. — alle Schritte ausgeführt
1. ✅ Entitätenmodell festgesetzt (ENTITY-MODEL.md, 6 offene Fragen entschieden)
2. ✅ Kohärenz-Prüfung (KOHAERENZ-FINDINGS.md) + R-REFIT (REQUIREMENTS/ROADMAP/PHASE-SOURCES nachgezogen)
3. ✅ 154 Ticket-Docs `.planning/ticket-docs/` (alle Tickets, Dev + Screen + Spuren)
4. ✅ committed + gepusht (aeae678b)
5. ✅ **Plane inkrementell** (LIVE, idempotent, Backup `plane-backup-review.json`):
- Phase 1 (`link_ticketdocs.py`): 128 Tickets → granularer Ticket-Doc-Link
- Phase 2 (`create_and_fix.py`): 21 neue Screen-Tickets (D-P3/4/5/7/8/9/12/13/14/15/16/20/21 + VD-P22/23/24/25/28/30/31/32) + Cycle + Modul David + Assignee
- Phase 3: VD-2/3/4 → VD-P26/27/29 (rename) · D-REST/VD-1/VD-5 → Cancelled (aufgelöst) · AK-P1c → R-P1c (Owner Raffael) · R-P8a Deal→Projekt · EXT-04 KWP-Nr · R-REFIT → Done
- Phase 4 (`set_startdates.py` + `gen_dayplan.py`): start_date für 21 neue + SPRINT-DAYPLAN.md regeneriert (151 aktive Tickets, gen_dayplan filtert jetzt Cancelled)
- **Board: 156 Issues** (135 + 21 neu), davon 151 Sprint-aktiv + 3 Cancelled + 2 v3-Backlog.
---
## MASTER-REIHENFOLGE (beschlossen 16.06.)
1. **Entitätenmodell festsetzen** (gemeinsam) — Grundlage für P6–P9-Docs.
2. **Kohärenz-Prüfung** Tickets ↔ Phasen ↔ Milestones.
3. **Alle Ticket-Docs schreiben** — pro Ticket eine self-contained Datei `.planning/ticket-docs/<TICKET-ID>.md`. **Scope: ALLE Tickets (David-Screen + Dev R-/AK-)**. Inhalt je Datei: Was wir bauen · Benötigte Screens · Features · UI-Elemente · Abhängigkeiten/Parallelität · Davids Delta · Dev-Nachzug. Quelle = die 32 Phasen-Briefs (auf Tickets aufgeteilt). Generierung via parallele Agenten.
4. **commit + push** (git-Links live machen).
5. **Plane:** neue Tickets anlegen/umbauen + Doc als 1. granularen Link.
6. Danach: weitere Themen.
---
## P1 — Fundament & Walking-Skeleton · beschlossen 16.06. · Status: OFFEN
**Entscheidung:** P1 macht **nur Raffael** (löst Engstelle Problem #1 — keine kollidierenden Branches am frischen Fundament).
- **Ticket:** `AK-P1c` (Hot-Swap + Walking-Skeleton + PWA) → Assignee Akeshan → **Raffael**, Working-ID `AK-P1c` → **`R-P1c`**.
- **Infra bleibt Akeshan:** `AK-INFRA1` / `AK-INFRA2` sind reines Ops (Coolify/DNS/TLS/PG-Redis) — kein App-Code-Konflikt, laufen echt parallel. Bleiben bei Akeshan.
- **Doku:** SPRINT-4W.md §3 W1 („Alle 3 / P1 in 3 Strängen" → „Raffael P1 solo; Akeshan Infra parallel") · SPRINT-DAYPLAN.md (Ticket-Move `AK-P1c`→`R-P1c`, Raffael) · designer-briefs/P01 Owner-Dev.
- **Dependency:** `R-P1c` blocked-by `R-P1a`,`R-P1b`; `R-P2a` blocked-by `R-P1c`.
- **Konsequenz (Risiko):** Raffaels W1-Pfad +1 Ticket → P2 rutscht ggf. ~1 Tag nach hinten. Akeshan W1 = Infra solide, dann **P4 starten, sobald P1-Fundament auf `main`** liegt.
---
## QUER: David braucht für JEDE Phase mit Screens ein eigenes Screen-Ticket · beschlossen 16.06. · Status: OFFEN
**Entscheidung:** Jede Phase mit Screens bekommt ein dediziertes David-Screen-Ticket, das auf den (bereits existierenden) fokussierten Phasen-Brief verlinkt — kein „aus Archetypen ableiten" mehr, keine Sammel-Bündel. Umfang: **v1 + v2 komplett**. Anwenden: **gebündelt am Durchgang-Ende**.
**v1 — neu anzulegen / umzubauen:**
- **D-P2** → Brief P02 (Auth, 11 Screens; Header sieht „D-P2 fällig So 21.06." bereits vor)
- **D-P3** → Brief P03 (Audit-Viewer, Notif-Center + Settings, Sprache DE)
- **D-P4** → Brief P04 (chunked-Upload-UI, HEIC-Vorschau, Task-Liste, EntityLink-Anhang)
- **D-P5** → Brief P05 (App-Katalog, Connection-/OAuth-Screens, Settings A6)
- **D-P7** → Brief P07 (Lead-Inbox-Triage — USP-Screen)
- **`D-REST` AUFLÖSEN** → **D-P13** (KI, Brief P13) · **D-P20** (Billing/Onboarding/Branding, Brief P20) · **D-P21** (DSGVO/Launch + Feedback-Widget, Brief P21). Telefonie-Screen → in `D-CHAT`-Umfeld (P15), Signatur-Screen → in `D-FORM`/`D-BOOK`-Umfeld (P16).
**v2 — neu anzulegen / umzubauen:**
- **`VD-1` AUFLÖSEN** → **VD-P23** (Postfach-Inbox, Brief P23) · **VD-P24** (Abo-Baukasten-UI + Onboarding-Wizard, Brief P24)
- **`VD-5` AUFLÖSEN** → **VD-P22** (Public-API-Keys, Brief P22) · **VD-P28** (Admin-Tiefe, Brief P28) · **VD-P32** (KWP-Setup, Brief P32)
- **VD-P25** neu → Brief P25 (KI-Tiefe/RAG — Scope aus Brief prüfen, ggf. minimal)
- **VD-P30** neu → Brief P30 (Dashboard-Deluxe: Custom-Widgets, Export)
- **VD-P31** prüfen → Brief P31 (DSGVO-Vollausbau — falls Screens; sonst Dev-Doku)
- P33/P34 (HalloPetra/HR-Drittanbieter): **kein Ticket jetzt** — Spec noch offen (`VEXT-2`/`VEXT-3` erheben sie erst).
- **Bleiben ohne Phasen-Brief (ok):** `D-WEB`, `D-POLISH`, `VD-6` (Polish/Website, keine Feature-Phase).
**Anwenden-Schritte (gebündelt):** (1) Tickets in Plane anlegen/umbenennen + Assignee David + Cycle/Fenster + Brief als 1. Doku-Link (granular). (2) Briefe ggf. Owner-Zeile bestätigen. (3) `gen_dayplan.py` neu laufen → SPRINT-DAYPLAN.md. (4) SPRINT-4W.md Designer-Track-Hinweis.
**Caveat:** David ~17 → ~25 v1-Tickets — Kapazität/Timeline bei Designer-Reihenfolge prüfen.
---
## P4 / Prisma — schema.prisma-Konflikt: GELÖST via ADR · beschlossen 16.06. · Status: DONE (Doku geschrieben)
Befund: Schema ist schon ein Ordner (`prisma/schema/`, 29 Dateien, Prisma 7.8.0) — Datei-Konflikt entschärft. Rest = `core/accounts`-Hotspot + Migrations-Reihenfolge.
**Bereits angewendet (keine Plane-Aktion):** AD-21 in `docs/ARCHITECTURE-DECISIONS.md` + neuer Abschnitt „Prisma-Schema & Migrationen" in `AGENTS.md` (damit Coding-Agent es liest). Drei Regeln: Modul=eigene .prisma · Feature-Branch `db push`, Migration erst beim Merge · CI `prisma validate`+`migrate status`.
---
## Entitätenmodell — offene Fragen entschieden, Modell festgesetzt · 16.06. · Status: ENTITY-MODEL.md DONE, Folge-Docs OFFEN
**Entscheidungen (in ENTITY-MODEL.md eingetragen):** Pipeline-Rechte komplex (NEU `PipelineFieldVisibility`) · HiveNumberSeq Row-Lock lückenlos · is_demo_data quer · kontakt_status Kontakt/Kunde/Bestandskunde · Label **„Organisation"** · **KWP-Felder/`ProjektExternesFeld` komplett v1 raus → v2**.
**Folge-Anpassungen noch OFFEN (beim Doc-Schreiben/Nachziehen):**
- `entity-model.dbml` + `entity-model.svg` nachziehen (ProjektExternesFeld → v2, neue Tabelle PipelineFieldVisibility). PDF-Erklärung neu rendern.
- **P09-Doku/Brief:** „ProjektExterneFelder (KWP) v1 Anzeige" **streichen** (→ v2). Screen-Zahl P09 entsprechend −0/−1 prüfen.
- **P08-Doku/Brief:** Pipeline-Rechte = **komplex** (Field-Level-Visibility je Rolle) — Aufwand in `R-P8` höher, im Dev-Ticket vermerken.
- ROADMAP.md P9 (KWP-Feld-Halter-Erwähnung) + SCOPE-V1-CUTS.md (Mini-Cut „KWP-Feld-Halter raus aus v1") nachziehen.
---
## Kohärenz-Prüfung + R-REFIT · 16.06. · Status: R-REFIT DONE (verifiziert)
Audit: `.planning/plane-sync/KOHAERENZ-FINDINGS.md` (25 Findings, 3 kritisch). Struktur sauber (Phasen↔Tickets lückenlos, 176 Milestones ✓). Wurzel = R-REFIT offen.
**R-REFIT ausgeführt + verifiziert (16.06.):** REQUIREMENTS.md (Modul 3+4 projekt-zentrisch, REQ-crm-lead-promotion→REQ-lead-projekt-konvertierung, REQ-rechnung-sub-entity NEU, PipelineFieldVisibility verankert) · ROADMAP.md (P6 SC#4, P8-Goal, P9-SC) · PHASE-SOURCES.md (P8/P9-Header „Projekt & Pipelines", KWP-Tokens entschärft, KWP-Nummer vereinheitlicht) · ROADMAP-V2.md (v2-Px↔Phase-Mapping-Tabelle) · SCOPE-V1-CUTS.md (HalloPetra-Widerspruch, MS/Req neu gezählt = 90/176). Traceability = 90 ✓.
**Noch OFFEN (klein, beim Ticket-Doc/Plane-Schritt):** Ticket `R-P8a` Titel/DoD „Deal-CRUD"→Projekt-CRUD + PipelineFieldVisibility (E-1/E-3) · `EXT-04` blocks-Nummer (C-1) · `R-REFIT`-Ticket auf done · SCREEN-MAP §2–4 + M01–M04-Spec-Deltas (`_bmad-output`) noch pre-pivot.
@@ -0,0 +1,78 @@
#!/usr/bin/env python3
"""
backup_review.py — zieht den vollen ROHEN Plane-Stand (description_html + alle IDs)
als Arbeitsbasis + Rollback-Backup für die Review-Plane-Operation. READ-ONLY.
Schreibt: plane-backup-review.json (raw issues + meta: states/cycles/modules/labels/members mit IDs).
"""
import json, os, urllib.request, urllib.error
TOK = {}
for line in open(os.path.expanduser("~/.cli-tokens/plane")):
line = line.strip()
if "=" in line and not line.startswith("#"):
k, v = line.split("=", 1); TOK[k.strip()] = v.strip()
BASE = TOK["PLANE_BASE_URL"].rstrip("/"); WS = TOK["PLANE_WORKSPACE"]; KEY = TOK["PLANE_API_KEY"]
PID = "35d0d968-8ab3-40cc-97b8-b81d917dc5df" # HiveGrid (hardcoded, NICHT PowerLinked)
API = f"{BASE}/api/v1/workspaces/{WS}/projects/{PID}"
def req(p):
r = urllib.request.Request(API + p); r.add_header("X-API-Key", KEY)
try:
with urllib.request.urlopen(r, timeout=30) as resp:
raw = resp.read().decode(); return resp.status, (json.loads(raw) if raw else {})
except urllib.error.HTTPError as e:
return e.code, {}
def get_all(p):
out, c = [], None
while True:
st, d = req(p + (("?per_page=100&cursor=" + c) if c else "?per_page=100"))
if st >= 400: break
if isinstance(d, list): out += d; break
out += d.get("results", [])
if d.get("next_page_results") and d.get("next_cursor"): c = d["next_cursor"]
else: break
return out
states = {s["name"]: s["id"] for s in get_all("/states/")}
cycles = get_all("/cycles/"); modules = get_all("/modules/")
labels = {l["name"]: l["id"] for l in get_all("/labels/")}
issues = get_all("/issues/")
# Zuordnung issue -> cycle / module (über cycle-issues/module-issues)
i2cyc, i2mod = {}, {}
cyc_name = {c["id"]: c["name"] for c in cycles}
mod_name = {m["id"]: m["name"] for m in modules}
for c in cycles:
for it in get_all(f"/cycles/{c['id']}/cycle-issues/"):
i2cyc[it["id"]] = c["id"]
for m in modules:
for it in get_all(f"/modules/{m['id']}/module-issues/"):
i2mod.setdefault(it["id"], []).append(m["id"])
raw = []
for i in issues:
raw.append({
"id": i["id"], "seq": i["sequence_id"], "name": i["name"],
"state": i.get("state"), "assignees": i.get("assignees", []),
"labels": i.get("labels", []), "priority": i.get("priority"),
"start_date": i.get("start_date"), "target_date": i.get("target_date"),
"parent": i.get("parent"), "cycle": i2cyc.get(i["id"]),
"modules": i2mod.get(i["id"], []),
"description_html": i.get("description_html", ""),
})
raw.sort(key=lambda x: x["seq"])
out = {
"pid": PID, "count": len(raw),
"meta": {
"states": states, "labels": labels,
"cycles": {c["name"]: c["id"] for c in cycles},
"modules": {m["name"]: m["id"] for m in modules},
},
"issues": raw,
}
path = ".planning/plane-sync/plane-backup-review.json"
json.dump(out, open(path, "w"), ensure_ascii=False, indent=1)
print(f"Backup: {path} | {len(raw)} Issues")
print("States:", list(states.keys()))
print("Cycles:", list(out['meta']['cycles'].keys()))
print("Modules:", list(out['meta']['modules'].keys()))
@@ -0,0 +1,162 @@
#!/usr/bin/env python3
"""
create_and_fix.py — Phase 2+3 der Review-Plane-Operation. IDEMPOTENT, default DRY-RUN, scharf: --apply
P2: neue David-Screen-Tickets anlegen (+ Cycle + Module David + Doc-Link) — nur was fehlt.
P3: Bündel auflösen (VD-2/3/4 rename→VD-P26/27/29; D-REST/VD-1/VD-5 cancel),
AK-P1c→R-P1c (rename+Owner+Module), Fixes (R-P8a Name, EXT-04 KWP-Nr, R-REFIT→Done).
"""
import json, os, re, sys, time, urllib.request, urllib.error
APPLY = "--apply" in sys.argv
TOK = {}
for line in open(os.path.expanduser("~/.cli-tokens/plane")):
line = line.strip()
if "=" in line and not line.startswith("#"):
k, v = line.split("=", 1); TOK[k.strip()] = v.strip()
BASE = TOK["PLANE_BASE_URL"].rstrip("/"); WS = TOK["PLANE_WORKSPACE"]; KEY = TOK["PLANE_API_KEY"]
PID = "35d0d968-8ab3-40cc-97b8-b81d917dc5df"
API = f"{BASE}/api/v1/workspaces/{WS}/projects/{PID}"
DOC = "https://git.tool-ctrl.de/toolctrl-labs/HiveGrid-Cloud/src/branch/main/.planning/ticket-docs/"
BRF = "https://git.tool-ctrl.de/toolctrl-labs/HiveGrid-Cloud/src/branch/main/.planning/designer-briefs/"
DAVID = "6c1fc63f-133d-4f40-86e4-7f658a6edcc7"; RAFFAEL = "8e34a88c-19c9-4565-b4f5-50415d623ce8"
bk = json.load(open(".planning/plane-sync/plane-backup-review.json"))
M = bk["meta"]
CYC = M["cycles"]; MOD = M["modules"]; ST = M["states"]; LB = M["labels"]
def A(cls, href, txt): return f'<a target="_blank" class="text-accent-secondary underline underline-offset-[3px] hover:text-accent-primary transition-colors cursor-pointer" href="{href}" rel="noopener noreferrer">{txt}</a>'
def http(method, path, body=None):
data = json.dumps(body).encode() if body is not None else None
r = urllib.request.Request(API + path, data=data, method=method)
r.add_header("X-API-Key", KEY)
if data: r.add_header("Content-Type", "application/json")
for _ in range(4):
try:
with urllib.request.urlopen(r, timeout=30) as resp:
raw = resp.read().decode(); return resp.status, (json.loads(raw) if raw else {})
except urllib.error.HTTPError as e:
if e.code == 429: time.sleep(5); continue
return e.code, {}
return 999, {}
def get_all(path):
out, c = [], None
while True:
st, d = http("GET", path + (("?per_page=100&cursor=" + c) if c else "?per_page=100"))
if st >= 400: break
if isinstance(d, list): out += d; break
out += d.get("results", [])
if d.get("next_page_results") and d.get("next_cursor"): c = d["next_cursor"]
else: break
return out
# aktueller Stand → Working-ID → issue
cur = get_all("/issues/")
wid2 = {re.split(r'\s*·\s*', i["name"])[0].strip(): i for i in cur}
def desc(wid, brief, blockedby, blocks, owner, fenster):
parts = ["<div><p><b>📚 Doku</b><br>",
A("", DOC + wid + ".md", f"📄 Ticket-Doku ({wid})"), "<br>"]
if brief: parts += [A("", BRF + brief + ".md", f"🎨 Designer-Brief {brief[:3]}"), "<br>"]
parts += [A("", "https://git.tool-ctrl.de/toolctrl-labs/HiveGrid-Cloud/src/branch/main/.planning/ENTITY-MODEL.md", "ENTITY-MODEL.md"), "</p>"]
parts += [f"<p><b>⛔ blocked-by:</b> {blockedby}<br><b>➡️ blocks:</b> {blocks}<br>",
f"<b>👤 Owner:</b> {owner} &nbsp;·&nbsp; <b>🗓 Fenster:</b> {fenster}</p>",
"<p><b>✅ Screens / Features / DoD:</b> siehe Ticket-Doku (oben).</p></div>"]
return "".join(parts)
# NEW: (wid, titel, brief, cycle, target, v2, blocks)
NEW = [
("D-P2","Screens P2 — Identität & Mandantentrennung","P02-identitaet-mandantentrennung","W1","2026-06-21",0,"R-P2a,R-P2b"),
("D-P3","Screens P3 — Querschnitts-Oberflächen","P03-querschnitts-oberflaechen","W2","2026-06-21",0,"AK-P3"),
("D-P4","Screens P4 — Files & Tasks","P04-files-tasks","W1","2026-06-19",0,"AK-P4a,AK-P4b"),
("D-P5","Screens P5 — Apps-Engine","P05-apps-engine-integrations-framework","W2","2026-06-21",0,"R-P5"),
("D-P7","Screens P7 — Lead-Inbox","P07-lead-inbox","W2","2026-06-26",0,"R-P7"),
("D-P8","Screens P8 — Projekt & Pipelines (Kern, ohne Kanban)","P08-projekt-pipelines-kern","W3","2026-06-29",0,"R-P8a,R-P8b"),
("D-P9","Screens P9 — Auftrags-Sub-Areas (ohne Plantafel/Abnahme)","P09-projekt-pipelines-auftrag","W3","2026-07-01",0,"R-P9a,R-P9b"),
("D-P12","Screens P12 — Automation (ohne Flow-Editor)","P12-automation-engine","W4","2026-07-07",0,"R-P12a,R-P12b"),
("D-P13","Screens P13 — KI-Layer (ex-D-REST)","P13-ki-layer","W4","2026-07-09",0,"R-P13"),
("D-P14","Screens P14 — Email & Marketing (ohne Kampagnen-Editor)","P14-email-marketing","W3","2026-06-29",0,"AK-P14a,AK-P14b"),
("D-P15","Screens P15 — Telefonie (ohne Chat)","P15-telefonie-chat","W3","2026-07-01",0,"AK-P15a"),
("D-P16","Screens P16 — Kalender/Signatur (ohne Form/Booking)","P16-kalender-booking-forms-signatur","W4","2026-07-07",0,"AK-P16a,AK-P16d"),
("D-P20","Screens P20 — Billing/Onboarding/Branding (ex-D-REST)","P20-billing-onboarding-branding","W4","2026-07-08",0,"AK-P20"),
("D-P21","Screens P21 — DSGVO/Launch (ex-D-REST)","P21-dsgvo-launch","W4","2026-07-09",0,"AK-P21"),
("VD-P22","Screens P22 — Public-API-Keys (ex-VD-5)","P22-public-api-webhooks","v2W1","2026-07-17",1,"VR-P22a,VR-P22b"),
("VD-P23","Screens P23 — Postfach-Inbox (ex-VD-1)","P23-postfach-sync","v2W1","2026-07-17",1,"VA-P23"),
("VD-P24","Screens P24 — Abo-Baukasten + Wizard (ex-VD-1)","P24-self-service-billing-wizard","v2W1","2026-07-15",1,"VA-P24a,VA-P24b"),
("VD-P25","Screens P25 — KI-Tiefe/HiveMind","P25-ki-tiefe-hivemind-rag","v2W1","2026-07-20",1,"VR-P25"),
("VD-P28","Screens P28 — Plattform-Admin-Tiefe (ex-VD-5)","P28-plattform-admin-tiefe","v2W3","2026-07-29",1,"VR-P28a,VA-P28b"),
("VD-P30","Screens P30 — Dashboard-Deluxe","P30-dashboard-deluxe-querschnitt","v2W3","2026-07-30",1,"VA-P30a,VA-P30b"),
("VD-P31","Screens P31 — DSGVO-Vollausbau","P31-dsgvo-vollausbau","v2W3","2026-07-31",1,"VR-P31"),
("VD-P32","Screens P32 — KWP-Setup (ex-VD-5)","P32-kwp-integration","v2W2","2026-07-22",1,"VR-P32a,VR-P32b,VR-P32c"),
]
CYK = {"W1":"W1 — Fundament & Identität","W2":"W2 — Plattform & CRM (Demo 1)","W3":"W3 — Kern-Kette & Kommunikation (Demo 2)","W4":"W4 — USP, Härtung & Launch","v2W1":"v2-W1 — Public-API/Postfach/Abo/KI-Start","v2W2":"v2-W2 — KWP/Portal/Mobile-Start","v2W3":"v2-W3 — Admin/Help/Dashboard/v2-Launch"}
created = skipped = 0
print(f"=== Phase 2 NEUE Tickets {'(SCHARF)' if APPLY else '(DRY-RUN)'} ===")
for wid, titel, brief, cyc, tgt, v2, blocks in NEW:
if wid in wid2:
skipped += 1; continue
name = f"{wid} · {titel}"
labels = [LB["typ:screen"]] + ([LB["v2"]] if v2 else [])
body = {"name": name, "description_html": desc(wid, brief, "D-D0a, D-D0b", blocks, "david", CYK[cyc].split(" — ")[0]),
"state": ST.get("Backlog"), "assignees": [DAVID], "labels": labels, "target_date": tgt}
if not APPLY:
print(f" + {wid:8} [{cyc}] → {titel[:40]}"); created += 1; continue
st, d = http("POST", "/issues/", body); time.sleep(1.1)
if st < 300 and d.get("id"):
iid = d["id"]
http("POST", f"/cycles/{CYC[CYK[cyc]]}/cycle-issues/", {"issues": [iid]}); time.sleep(1.0)
http("POST", f"/modules/{MOD['David (Screens)']}/module-issues/", {"issues": [iid]}); time.sleep(1.0)
print(f" ✓ angelegt {wid}"); created += 1
else:
print(f" ✗ {wid}: HTTP {st}")
print(f"angelegt: {created} | schon vorhanden (skip): {skipped}")
# ---- Phase 3 ----
def add_doclink(html, wid):
if f"ticket-docs/{wid}.md" in html: return html
link = A("", DOC + wid + ".md", f"📄 Ticket-Doku ({wid})") + "<br>"
return re.sub(r'(📚 Doku</(?:b|strong)><br\s*/?>)', lambda m: m.group(1) + link, html, count=1)
RENAME = [("VD-2","VD-P26","Screens P26 — Customer-Portal"),
("VD-3","VD-P27","Screens P27 — Mobile-PWA-Shell (PWA-only)"),
("VD-4","VD-P29","Screens P29 — Help-Center")]
CANCEL = [("D-REST","aufgelöst → D-P13/D-P20/D-P21"),
("VD-1","aufgelöst → VD-P23/VD-P24"),
("VD-5","aufgelöst → VD-P22/VD-P28/VD-P32")]
print(f"\n=== Phase 3 Rename/Cancel/Fix {'(SCHARF)' if APPLY else '(DRY-RUN)'} ===")
def pat(wid, body, note):
i = wid2.get(wid)
if not i: print(f" ⚠ {wid} nicht gefunden"); return
print(f" ~ {wid}: {note}")
if APPLY:
st, _ = http("PATCH", f"/issues/{i['id']}/", body); time.sleep(1.1)
if st >= 300: print(f" ✗ HTTP {st}")
for old, new, titel in RENAME:
i = wid2.get(old)
if i: pat(old, {"name": f"{new} · {titel}", "description_html": add_doclink(i["description_html"], new)}, f"rename → {new}")
for wid, note in CANCEL:
i = wid2.get(wid)
if i:
nm = i["name"] if "aufgelöst" in i["name"] else i["name"] + f" ({note})"
pat(wid, {"name": nm, "state": ST["Cancelled"]}, f"CANCEL ({note})")
# AK-P1c → R-P1c (rename + Owner Raffael + Module-Wechsel)
i = wid2.get("AK-P1c")
if i:
nm = "R-P1c · " + re.split(r'\s*·\s*', i["name"], maxsplit=1)[1] if "·" in i["name"] else "R-P1c · P1 Hot-Swap-Maschine + Walking-Skeleton + PWA"
pat("AK-P1c", {"name": nm, "assignees": [RAFFAEL], "description_html": add_doclink(i["description_html"].replace("AK-P1c","R-P1c"), "R-P1c")}, "→ R-P1c (Owner Raffael)")
if APPLY:
http("POST", f"/modules/{MOD['Raffael (Dev)']}/module-issues/", {"issues": [i["id"]]}); time.sleep(1.0)
http("DELETE", f"/modules/{MOD['Akeshan (Dev)']}/module-issues/{i['id']}/"); time.sleep(1.0)
# R-P8a Name-Fix (Deal→Projekt)
i = wid2.get("R-P8a")
if i and "Deal-CRUD" in i["name"]:
pat("R-P8a", {"name": i["name"].replace("Deal-CRUD", "Projekt-CRUD")}, "Name Deal-CRUD→Projekt-CRUD")
# EXT-04 KWP-Nummer
i = wid2.get("EXT-04")
if i and "v2-P10" in i["description_html"]:
pat("EXT-04", {"description_html": i["description_html"].replace("v2-P10", "P32 (v2)")}, "KWP-Nummer v2-P10→P32")
# R-REFIT → Done
i = wid2.get("R-REFIT")
if i and i["state"] != ST["Done"]:
pat("R-REFIT", {"state": ST["Done"]}, "→ Done (erledigt 16.06.)")
print("\n" + ("✅ Phase 2+3 scharf ausgeführt." if APPLY else "→ scharf: python3 .planning/plane-sync/create_and_fix.py --apply"))
@@ -0,0 +1,65 @@
#!/usr/bin/env python3
"""
dump_snapshot.py — zieht den vollständigen HiveGrid-Plane-Stand als lokalen Snapshot.
Schreibt .planning/plane-sync/plane-snapshot.json (Issues mit Text-Description, Labels,
Cycle/Module-Zuordnung, Assignees, Dates). Read-only. Arbeitsbasis für Scrub/Analyse.
"""
import json, os, re, urllib.request, urllib.error
TOK={}
for line in open(os.path.expanduser("~/.cli-tokens/plane")):
line=line.strip()
if "=" in line and not line.startswith("#"):
k,v=line.split("=",1); TOK[k.strip()]=v.strip()
BASE=TOK["PLANE_BASE_URL"].rstrip("/"); WS=TOK["PLANE_WORKSPACE"]; KEY=TOK["PLANE_API_KEY"]
PID="35d0d968-8ab3-40cc-97b8-b81d917dc5df" # HiveGrid (hardcoded, NICHT PowerLinked)
API=f"{BASE}/api/v1/workspaces/{WS}/projects/{PID}"
def req(p):
r=urllib.request.Request(API+p); r.add_header("X-API-Key",KEY)
try:
with urllib.request.urlopen(r,timeout=30) as resp:
raw=resp.read().decode(); return resp.status,(json.loads(raw) if raw else {})
except urllib.error.HTTPError as e: return e.code,{}
def get_all(p):
out,c=[],None
while True:
st,d=req(p+(("?per_page=100&cursor="+c) if c else "?per_page=100"))
if st>=400: break
if isinstance(d,list): out+=d; break
out+=d.get("results",[])
if d.get("next_page_results") and d.get("next_cursor"): c=d["next_cursor"]
else: break
return out
def html2txt(h):
if not h: return ""
h=re.sub(r'<a [^>]*href="([^"]+)"[^>]*>(.*?)</a>', r'\2 (\1)', h)
h=re.sub(r'<br\s*/?>', '\n', h); h=re.sub(r'</p>|</div>|</li>', '\n', h)
h=re.sub(r'<li>', '- ', h); h=re.sub(r'<[^>]+>', '', h)
import html as _h; h=_h.unescape(h)
return re.sub(r'\n{3,}', '\n\n', h).strip()
MEM={"8e34a88c-19c9-4565-b4f5-50415d623ce8":"Raffael","8bf43e86-dc8a-4963-b57a-aeb5f2cc450a":"Akeshan",
"6c1fc63f-133d-4f40-86e4-7f658a6edcc7":"David","a5883f5e-3038-453c-9401-39ab1f40be9e":"Dejan",
"48367c1f-20d2-44f1-8ae2-faf35aa2052a":"Haris"}
states={s["id"]:s["name"] for s in get_all("/states/")}
cycles=get_all("/cycles/"); modules=get_all("/modules/")
labels={l["id"]:l["name"] for l in get_all("/labels/")}
issues=get_all("/issues/")
i2cyc={};
for c in cycles:
for it in get_all(f"/cycles/{c['id']}/cycle-issues/"): i2cyc[it["id"]]=c["name"]
i2mod={}
for m in modules:
for it in get_all(f"/modules/{m['id']}/module-issues/"): i2mod[it["id"]]=m["name"]
snap=[]
for i in issues:
snap.append({"seq":i["sequence_id"],"id":i["id"],"name":i["name"],
"state":states.get(i.get("state")),"cycle":i2cyc.get(i["id"]),"module":i2mod.get(i["id"]),
"assignees":[MEM.get(a,a) for a in i.get("assignees",[])],
"labels":[labels.get(l,l) for l in i.get("labels",[])],
"priority":i.get("priority"),"start_date":i.get("start_date"),"target_date":i.get("target_date"),
"parent":i.get("parent"),"description":html2txt(i.get("description_html",""))})
snap.sort(key=lambda x:x["seq"])
out=".planning/plane-sync/plane-snapshot.json"
json.dump({"project":"HiveGrid","pid":PID,"count":len(snap),"labels":sorted(labels.values()),
"cycles":[c["name"] for c in cycles],"modules":[m["name"] for m in modules],"issues":snap},
open(out,"w"),ensure_ascii=False,indent=1)
print(f"Snapshot: {out} | {len(snap)} Issues | Labels: {sorted(labels.values())}")
@@ -0,0 +1,144 @@
#!/usr/bin/env python3
"""
Generiert .planning/SPRINT-DAYPLAN.md DATENGETRIEBEN aus Plane (Single Source).
Jedes Ticket erscheint an seinem Start-Tag mit ID · Owner · Fenster (start→Ziel) · Aufgabe.
Counts pro Tag/Woche + vollständige Ticket-Index-Tabelle am Ende → garantiert nichts ausgelassen.
Neu rendern danach: npx md-to-pdf .planning/SPRINT-DAYPLAN.md
"""
import os, json, datetime, urllib.request
TOK={}
for ln in open(os.path.expanduser("~/.cli-tokens/plane")):
ln=ln.strip()
if "=" in ln and not ln.startswith("#"): k,v=ln.split("=",1); TOK[k.strip()]=v.strip()
B=TOK["PLANE_BASE_URL"].rstrip("/"); WS=TOK["PLANE_WORKSPACE"]; KEY=TOK["PLANE_API_KEY"]
PID="35d0d968-8ab3-40cc-97b8-b81d917dc5df"
API=f"{B}/api/v1/workspaces/{WS}/projects/{PID}"
NAME={"8e34a88c-19c9-4565-b4f5-50415d623ce8":"Raffael","8bf43e86-dc8a-4963-b57a-aeb5f2cc450a":"Akeshan",
"6c1fc63f-133d-4f40-86e4-7f658a6edcc7":"David","a5883f5e-3038-453c-9401-39ab1f40be9e":"Dejan",
"48367c1f-20d2-44f1-8ae2-faf35aa2052a":"Haris"}
def call(path):
r=urllib.request.Request(API+path); r.add_header("X-API-Key",KEY)
return json.loads(urllib.request.urlopen(r,timeout=30).read())
labs={l["id"]:l["name"] for l in call("/labels/").get("results",[])}
states={s["id"]:s["name"] for s in call("/states/").get("results",[])}
issues=[]; cur=None
while True:
d=call("/issues/"+("?cursor="+cur if cur else ""))
issues+=d.get("results",[])
if d.get("next_page_results") and d.get("next_cursor"): cur=d["next_cursor"]
else: break
T=[]; V3=[]
for i in issues:
nm=i["name"]
if " · " not in nm: continue
if states.get(i.get("state"))=="Cancelled": continue # aufgelöste/abgesagte Tickets nicht im Sprint-Plan
wid,title=nm.split(" · ",1)
lset={labs.get(x,"") for x in i.get("labels",[])}
asg=[NAME.get(a,"?") for a in i.get("assignees",[])] or ["—"]
# Noah-Tickets sind Haris+Dejan -> als Träger; Owner-Anzeige
who="/".join(asg)
rec={"wid":wid,"title":title.strip(),"who":who,
"start":(i.get("start_date") or "")[:10],"target":(i.get("target_date") or "")[:10],
"v":"v2" if "v2" in lset else "v1","b2":"block-2" in lset}
if "v3" in lset: V3.append(rec); continue # v3-Backlog: nicht im Sprint (PWA-only, AD-17)
T.append(rec)
T.sort(key=lambda x:(x["start"],x["wid"]))
V3.sort(key=lambda x:x["wid"])
WD={0:"Mo",1:"Di",2:"Mi",3:"Do",4:"Fr",5:"Sa",6:"So"}
def de(d): # 2026-06-16 -> "16.06."
return f"{d[8:10]}.{d[5:7]}." if d else "??"
def wday(d):
y,m,dd=map(int,d.split("-")); return WD[datetime.date(y,m,dd).weekday()]
WEEKS=[
("Woche 1 · Di 16.–Fr 19.06. — Fundament & Identität","2026-06-16","2026-06-19","→ Gate W1 (Fr 19.06.)"),
("Woche 2 · Sa 20.–Fr 26.06. — Plattform + CRM","2026-06-20","2026-06-26","→ Gate W2 + Noah-Demo 1 (Fr 26.06.)"),
("Woche 3 · Sa 27.06.–Fr 03.07. — Kern-Kette + Kommunikation","2026-06-27","2026-07-03","→ Gate W3 + Noah-Demo 2 (Fr 03.07.)"),
("Woche 4 · Sa 04.–Fr 10.07. — USP, Härtung, Launch","2026-07-04","2026-07-10","→ Freeze (Do 09.) · LAUNCH (Fr 10.07.)"),
("v2-Woche 1 · Mo 13.–So 19.07. — Public-API / Postfach / Abo / KI","2026-07-13","2026-07-19","→ Webinar Nr. 1 (Di/Mi 14./15.07.)"),
("v2-Woche 2 · Mo 20.–So 26.07. — KWP / Portal / Mobile","2026-07-20","2026-07-26","→ KWP-Sync-E2E mit Geerkens (Fr 24.07.)"),
("v2-Woche 3 · Mo 27.–Fr 31.07. — Admin / Help / Dashboard","2026-07-27","2026-07-31","→ v2 KOMPLETT LIVE (Fr 31.07.)"),
]
GATE_DAY={"2026-06-19","2026-06-26","2026-07-03","2026-07-09","2026-07-10","2026-07-24","2026-07-31"}
CSS = """ body { font-family: -apple-system, "Segoe UI", Helvetica, Arial, sans-serif; font-size: 9px; color: #1f2937; line-height: 1.4; }
h1 { font-size: 21px; margin: 0 0 2px; color: #0f172a; }
p.lead { color: #475569; font-size: 10.5px; margin: 0 0 4px; }
p.meta { color: #64748b; font-size: 8.5px; margin: 0 0 10px; }
h2 { font-size: 14px; color: #b45309; border-bottom: 2.5px solid #f5a623; padding-bottom: 4px; margin: 0 0 8px; page-break-before: always; break-before: page; break-after: avoid; page-break-after: avoid; }
h2.idx { page-break-before: always; }
h3 { font-size: 10.5px; margin: 12px 0 3px; color: #0f766e; break-after: avoid; page-break-after: avoid; }
h3.gate { color: #b91c1c; }
table { font-size: 8.5px; border-collapse: collapse; width: 100%; margin: 0 0 5px; break-inside: avoid; page-break-inside: avoid; }
thead { display: table-header-group; }
tr { break-inside: avoid; page-break-inside: avoid; }
td, th { border: 1px solid #e2e8f0; padding: 3px 6px; text-align: left; vertical-align: top; break-inside: avoid; page-break-inside: avoid; }
th { background: #fff7e8; color: #92400e; font-size: 8px; text-transform: uppercase; letter-spacing: 0.3px; }
td:nth-child(1) { font-family: "SF Mono", Menlo, monospace; font-weight: 600; color: #0f172a; white-space: nowrap; width: 70px; }
td:nth-child(2) { white-space: nowrap; width: 62px; color: #334155; }
td:nth-child(3) { white-space: nowrap; width: 42px; color: #64748b; }
tr.b2 td:nth-child(1) { color: #b91c1c; }
strong { color: #b45309; }"""
out=[]
out.append("---\npdf_options:\n format: A4\n margin: 13mm\n printBackground: true\ncss: |-\n"+CSS+"\n---\n")
out.append("# HiveGrid 2.0 — Sprint-Tagesplan (ticket-genau)\n")
out.append('<p class="lead">Jedes Ticket an seinem Start-Tag · ID · Wer · Fenster (Start→Ziel) · Aufgabe · '+f'{len(T)} Sprint-Tickets (v1: {sum(1 for t in T if t["v"]=="v1")} · v2: {sum(1 for t in T if t["v"]=="v2")})'+(f' + {len(V3)} v3-Backlog' if V3 else '')+'</p>')
out.append('<p class="meta">Generiert aus Plane (Single Source) · Arbeitsrhythmus Mo–So ≥8 h · „bis" = Ziel-/Fertig-Datum (Mehrtages-Tickets laufen bis dahin) · rot = Meilenstein/Gate-Tag · <span style="color:#b91c1c">rote Ticket-ID</span> = Block 2 (Partner-API offen, agil). Neu erzeugen: <code>python3 .planning/plane-sync/gen_dayplan.py</code></p>')
def table(items):
r=['| Ticket | Wer | bis | Aufgabe |','|---|---|---|---|']
for t in items:
r.append(f'| {t["wid"]}{(" •B2" if t["b2"] else "")} | {t["who"]} | {de(t["target"])} | {t["title"]} |')
return "\n"+"\n".join(r) # führende Leerzeile: trennt Tabelle sauber vom Vor-Block
assigned=set()
for wtitle,ws,we,gate in WEEKS:
wk=[t for t in T if ws<=t["start"]<=we]
assigned.update(id(t) for t in wk)
out.append(f"\n## {wtitle} · {len(wk)} Tickets")
out.append(f"*{gate}*")
# nach Tag gruppieren
days=sorted({t["start"] for t in wk})
for d in days:
dt=[t for t in wk if t["start"]==d]
cls="gate" if d in GATE_DAY else ""
head=f'{wday(d)} {de(d)} · {len(dt)} Ticket(s)'
if cls: out.append(f'<h3 class="gate">{head}</h3>\n')
else: out.append(f"### {head}")
out.append(table(dt))
# Resttickets (start außerhalb der Wochen) — Sicherheitsnetz
rest=[t for t in T if id(t) not in assigned]
if rest:
out.append(f"\n## Ohne Wochen-Zuordnung (Prüfen!) · {len(rest)}")
out.append(table(rest))
# v3-Backlog (zurückgestellt, nicht im Sprint — PWA-only, AD-17)
if V3:
out.append(f"\n## v3-Backlog (zurückgestellt — NICHT im Sprint) · {len(V3)}")
out.append("*PWA-only (AD-17): native App + App-Store erst v3. Diese Tickets sind keinem Cycle zugeordnet.*")
out.append(table(V3))
# Vollständige Index-Tabelle, nach Track gruppiert (jede Tabelle eigener Header)
out.append('\n<h2 class="idx">Ticket-Index — alle '+str(len(T))+' Tickets (nach Track)</h2>')
out.append("*Zum Nachschlagen, je Track nach Start sortiert. •B2 = Block 2 (Partner-API offen, agil).*")
def idx_table(items):
r=['','| Ticket | Start | bis | v | Aufgabe |','|---|---|---|---|---|']
for t in sorted(items,key=lambda x:x["start"]):
r.append(f'| {t["wid"]}{(" •B2" if t["b2"] else "")} | {de(t["start"])} | {de(t["target"])} | {t["v"]} | {t["title"]} |')
return "\n".join(r)
ORDER=["Raffael","Akeshan","David","Dejan","Haris"]
groups=sorted({t["who"] for t in T}, key=lambda w:(ORDER.index(w) if w in ORDER else len(ORDER), w))
for who in groups:
grp=[t for t in T if t["who"]==who]
label=who+(" (Noah-Zulieferungen)" if "/" in who else "")
out.append(f'\n### {label} · {len(grp)} Tickets')
out.append(idx_table(grp))
open(".planning/SPRINT-DAYPLAN.md","w",encoding="utf-8").write("\n".join(out)+"\n")
print(f"Geschrieben: {len(T)} Tickets, {len(WEEKS)} Wochen, Rest ohne Zuordnung: {len(rest)}")
for wtitle,ws,we,_ in WEEKS:
print(f" {wtitle.split(' — ')[0]:42} {sum(1 for t in T if ws<=t['start']<=we)} Tickets")
@@ -0,0 +1,118 @@
#!/usr/bin/env python3
"""
link_briefs.py — verlinkt jedes Phase-/Screen-Ticket mit seinem Designer-Brief.
Stellt den Designer-Brief (`.planning/designer-briefs/PXX-*.md`) als ERSTEN Doku-Link
in die Ticket-Beschreibung (vor die bestehenden ROADMAP-/Spec-Links). Idempotent
(Working-ID-Match; setzt nichts doppelt). Default = DRY-RUN, --apply = scharf.
Mapping: Working-ID → Phasen-Nr.
- R-Pxx / AK-Pxx / VR-Pxx / VA-Pxx → P{xx} (automatisch)
- D-* / VD-* → manuelles Mapping (siehe DMAP)
- mehrdeutige D-*/VD-* (mehrere Phasen) → übersprungen + gemeldet
"""
import json, os, re, sys, glob, time, urllib.request, urllib.error
APPLY = "--apply" in sys.argv
TOK = {}
for line in open(os.path.expanduser("~/.cli-tokens/plane")):
line = line.strip()
if "=" in line and not line.startswith("#"):
k, v = line.split("=", 1); TOK[k.strip()] = v.strip()
BASE = TOK["PLANE_BASE_URL"].rstrip("/"); WS = TOK["PLANE_WORKSPACE"]; KEY = TOK["PLANE_API_KEY"]
PID = "35d0d968-8ab3-40cc-97b8-b81d917dc5df"
API = f"{BASE}/api/v1/workspaces/{WS}/projects/{PID}"
GITEA = "https://git.tool-ctrl.de/toolctrl-labs/HiveGrid-Cloud/src/branch/main"
BRIEFDIR = ".planning/designer-briefs"
def req(method, path, body=None):
url = path if path.startswith("http") else API + path
st, d = 0, {}
for _ in range(8):
r = urllib.request.Request(url, data=(json.dumps(body).encode() if body is not None else None), method=method)
r.add_header("X-API-Key", KEY); r.add_header("Content-Type", "application/json")
try:
with urllib.request.urlopen(r, timeout=30) as resp:
raw = resp.read().decode(); st, d = resp.status, (json.loads(raw) if raw else {})
except urllib.error.HTTPError as e:
st, d = e.code, {"_error": e.read().decode()[:300]}
if st == 429: time.sleep(25); continue
if APPLY and method != "GET": time.sleep(0.4)
return st, d
return st, d
def get_all(path):
out, c = [], None
while True:
st, d = req("GET", path + (("?per_page=100&cursor=" + c) if c else "?per_page=100"))
if st >= 400: break
if isinstance(d, list): out += d; break
out += d.get("results", [])
if d.get("next_page_results") and d.get("next_cursor"): c = d["next_cursor"]
else: break
return out
# P-Nr -> Brief-Dateiname (aus dem Verzeichnis)
PBRIEF = {}
for p in glob.glob(f"{BRIEFDIR}/P*.md"):
m = re.match(r"P(\d{2})-", os.path.basename(p))
if m: PBRIEF[int(m.group(1))] = os.path.basename(p)
# D-*/VD-* manuelles Mapping (nur EINDEUTIGE; mehrdeutige bewusst weggelassen)
DMAP = {
"D-D0a": 1, "D-D0b": 1, "D-CRM": 6, "D-KANBAN": 8, "D-FORM": 16, "D-KAMP": 14,
"D-HR": 17, "D-ADMIN": 19, "D-PLAN": 9, "D-ABN": 9, "D-CHAT": 15, "D-DASH": 11,
"D-BOOK": 16, "D-FLOW": 12,
"VD-2": 26, "VD-3": 27, "VD-4": 29,
}
# bewusst übersprungen (mehrere Phasen): D-WEB, D-REST, D-POLISH, VD-1, VD-5, VD-6
SKIP_AMBIG = {"D-WEB", "D-REST", "D-POLISH", "VD-1", "VD-5", "VD-6"}
def phase_of(wid):
if wid in DMAP: return DMAP[wid]
m = re.match(r"(?:R|AK|VR|VA)-P(\d+)", wid)
if m: return int(m.group(1))
return None
print(f"=== link_briefs.py — {'APPLY' if APPLY else 'DRY-RUN'} ===")
print(f"Briefe gefunden: {len(PBRIEF)} (P{min(PBRIEF)}–P{max(PBRIEF)})\n")
issues = get_all("/issues/")
linked = skipped_nobrief = skipped_ambig = already = nodoku = 0
ambig_list = []
for i in sorted(issues, key=lambda x: x["sequence_id"]):
if " · " not in i["name"]: continue
wid = i["name"].split(" · ")[0]
if wid in SKIP_AMBIG:
skipped_ambig += 1; ambig_list.append(wid); continue
ph = phase_of(wid)
if ph is None: continue # Externals/Vertrieb/Website/Noah
brief = PBRIEF.get(ph)
if not brief:
skipped_nobrief += 1
print(f" ?? {wid}: kein Brief für P{ph} (v2-deferred Phase wie P10/P18?)")
continue
html = i.get("description_html") or ""
if f"designer-briefs/{brief}" in html:
already += 1; continue
url = f"{GITEA}/{BRIEFDIR}/{brief}"
linkhtml = (f'<a target="_blank" class="text-accent-secondary underline underline-offset-[3px] '
f'hover:text-accent-primary transition-colors cursor-pointer" href="{url}" '
f'rel="noopener noreferrer">🎨 Designer-Brief P{ph:02d}</a>')
# Marker matcht <b>...</b> (sync-Skript-Format) UND <strong>...</strong> (Plane-Editor-normalisiert)
m = re.search(r'📚 Doku</(?:b|strong)><br\s*/?>', html)
if m:
br = "<br>" if "<br>" in m.group(0) else "<br/>"
pos = m.end()
new = html[:pos] + linkhtml + br + html[pos:]
else:
nodoku += 1
print(f" ⚠ {wid}: kein '📚 Doku'-Block — übersprungen")
continue
print(f" + {wid:9} → {brief}")
linked += 1
if APPLY:
st, d = req("PATCH", f"/issues/{i['id']}/", {"description_html": new})
if st >= 400: print(" PATCH FAIL:", st, d)
print(f"\n=== {'verlinkt' if APPLY else 'würde verlinken'}: {linked} · bereits: {already} · "
f"mehrdeutig übersprungen: {skipped_ambig} {sorted(set(ambig_list))} · "
f"kein Brief: {skipped_nobrief} · kein Doku-Block: {nodoku} ===")
if not APPLY: print("Dry-Run — nichts geschrieben. Mit --apply scharf schalten.")
@@ -0,0 +1,72 @@
#!/usr/bin/env python3
"""
link_ticketdocs.py — Phase 1 der Review-Plane-Operation.
Fügt in jedes bestehende Ticket als ERSTE Doku-Zeile den granularen Link auf
.planning/ticket-docs/<WorkingID>.md ein (Plane-styled <a>). Idempotent (Working-ID-Match,
skippt wenn schon verlinkt). Sonderfälle (Rename/Auflösung) bleiben Phase 3 überlassen.
Default DRY-RUN. Scharf: --apply
"""
import json, os, re, sys, time, urllib.request, urllib.error
APPLY = "--apply" in sys.argv
TOK = {}
for line in open(os.path.expanduser("~/.cli-tokens/plane")):
line = line.strip()
if "=" in line and not line.startswith("#"):
k, v = line.split("=", 1); TOK[k.strip()] = v.strip()
BASE = TOK["PLANE_BASE_URL"].rstrip("/"); WS = TOK["PLANE_WORKSPACE"]; KEY = TOK["PLANE_API_KEY"]
PID = "35d0d968-8ab3-40cc-97b8-b81d917dc5df"
API = f"{BASE}/api/v1/workspaces/{WS}/projects/{PID}"
DOC_BASE = "https://git.tool-ctrl.de/toolctrl-labs/HiveGrid-Cloud/src/branch/main/.planning/ticket-docs/"
LINK = ('<a target="_blank" class="text-accent-secondary underline underline-offset-[3px] '
'hover:text-accent-primary transition-colors cursor-pointer" href="{url}" '
'rel="noopener noreferrer">📄 Ticket-Doku ({wid})</a><br>')
MARK = re.compile(r'(📚 Doku</(?:b|strong)><br\s*/?>)')
# Sonderfälle → Phase 3 (Rename/Auflösung), hier NICHT anfassen:
SKIP = {"AK-P1c", "D-REST", "VD-1", "VD-2", "VD-3", "VD-4", "VD-5"}
def patch(iid, html):
body = json.dumps({"description_html": html}).encode()
r = urllib.request.Request(API + f"/issues/{iid}/", data=body, method="PATCH")
r.add_header("X-API-Key", KEY); r.add_header("Content-Type", "application/json")
for attempt in range(4):
try:
with urllib.request.urlopen(r, timeout=30) as resp:
return resp.status
except urllib.error.HTTPError as e:
if e.code == 429:
time.sleep(5); continue
return e.code
return 999
bk = json.load(open(".planning/plane-sync/plane-backup-review.json"))
todo, skip_done, skip_special, miss_doc, miss_mark = [], 0, 0, [], []
for i in bk["issues"]:
wid = re.split(r'\s*·\s*', i["name"])[0].strip()
if wid in SKIP:
skip_special += 1; continue
if not os.path.exists(f".planning/ticket-docs/{wid}.md"):
miss_doc.append(wid); continue
html = i["description_html"]
if f"ticket-docs/{wid}.md" in html:
skip_done += 1; continue
link = LINK.format(url=DOC_BASE + wid + ".md", wid=wid)
new = MARK.sub(lambda m: m.group(1) + link, html, count=1)
if new == html:
miss_mark.append(wid); continue
todo.append((i["id"], wid, new))
print(f"=== Phase 1 Link-Update {'(SCHARF)' if APPLY else '(DRY-RUN)'} ===")
print(f"zu verlinken: {len(todo)} | schon verlinkt: {skip_done} | Sonderfälle(P3): {skip_special}")
if miss_doc: print(f"⚠ ohne Doc-Datei: {miss_doc}")
if miss_mark: print(f"⚠ ohne Doku-Marker (manuell prüfen): {miss_mark}")
print("Beispiele:", [w for _, w, _ in todo[:12]])
if APPLY:
ok = 0
for iid, wid, new in todo:
st = patch(iid, new)
if st < 300: ok += 1
else: print(f" ✗ {wid}: HTTP {st}")
time.sleep(1.1)
print(f"✅ gepatcht: {ok}/{len(todo)}")
else:
print("\n→ scharf: python3 .planning/plane-sync/link_ticketdocs.py --apply")
@@ -0,0 +1,258 @@
#!/usr/bin/env python3
"""
scrub_plane.py — idempotentes Pflege-/Scrub-Skript für die HiveGrid-Plane-Tickets.
Anders als sync_plane*.py (Bootstrap, Match per Vollname) matcht dieses Skript Issues
per WORKING-ID (Präfix vor ' · ') → Namens-Änderungen (Umlaut-Fix, PWA-Umbau) erzeugen
KEINE Duplikate. Es PATCHt nur bei echtem Diff und ist voll re-run-sicher.
Operationen:
A) Umlaut-Fix: kuratierte Wort-Map (KEIN generisches ae→ä!) auf Name + description_html
ALLER Issues + die 2 Cycle-Namen mit ASCII-Umlauten.
B) PWA-only-Umbau (Entscheidung #14 / AD-17, 2026-06-16):
- VA-P27a/b + VD-3 → Mobile-PWA-Ausbau umgewidmet (Expo/native/Store raus)
- VEXT-4, VJ-1 → v3-Backlog (aus Cycle entfernt, Label v2→v3)
- VD-6, EXT-13, VJ-3 → App-Store-/native-Teil entfernt, Rest bleibt
Default = DRY-RUN (zeigt nur Diffs, schreibt nichts). Mit --apply scharf schalten.
"""
import json, os, re, sys, time, urllib.request, urllib.error
APPLY = "--apply" in sys.argv
TOK = {}
for line in open(os.path.expanduser("~/.cli-tokens/plane")):
line = line.strip()
if "=" in line and not line.startswith("#"):
k, v = line.split("=", 1); TOK[k.strip()] = v.strip()
BASE = TOK["PLANE_BASE_URL"].rstrip("/"); WS = TOK["PLANE_WORKSPACE"]; KEY = TOK["PLANE_API_KEY"]
PID = "35d0d968-8ab3-40cc-97b8-b81d917dc5df" # HiveGrid (hardcoded, NICHT PowerLinked)
API = f"{BASE}/api/v1/workspaces/{WS}/projects/{PID}"
GITEA = "https://git.tool-ctrl.de/toolctrl-labs/HiveGrid-Cloud/src/branch/main"
def _once(method, url, body):
r = urllib.request.Request(url, data=(json.dumps(body).encode() if body is not None else None), method=method)
r.add_header("X-API-Key", KEY); r.add_header("Content-Type", "application/json")
try:
with urllib.request.urlopen(r, timeout=30) as resp:
raw = resp.read().decode(); return resp.status, (json.loads(raw) if raw else {})
except urllib.error.HTTPError as e:
return e.code, {"_error": e.read().decode()[:300]}
def req(method, path, body=None):
url = path if path.startswith("http") else API + path
st, d = 0, {}
for _ in range(8):
st, d = _once(method, url, body)
if st == 429:
time.sleep(25); continue
if APPLY and method != "GET":
time.sleep(0.4)
return st, d
return st, d
def get_all(path):
out, cursor = [], None
while True:
st, d = req("GET", path + (("?per_page=100&cursor=" + cursor) if cursor else "?per_page=100"))
if st >= 400: print("GET FAIL", path, st, d); break
if isinstance(d, list): out += d; break
out += d.get("results", [])
if d.get("next_page_results") and d.get("next_cursor"): cursor = d["next_cursor"]
else: break
return out
# ---------- A) Umlaut-Fix: kuratierte Wort-Map (case-sensitiv, wortgenau) ----------
UML = {
"faellig": "fällig", "fuer": "für", "Bruecke": "Brücke",
"Geschaeftsdaten": "Geschäftsdaten", "Konformitaet": "Konformität",
"bestaetigt": "bestätigt", "geprueft": "geprüft", "gewaehlt": "gewählt",
"gruen": "grün", "pruefen": "prüfen",
}
_UML_RE = [(re.compile(r'\b' + re.escape(k) + r'\b'), v) for k, v in UML.items()]
def fix_uml(s):
if not s: return s
for rx, v in _UML_RE:
s = rx.sub(v, s)
return s
CYCLE_RENAME = {
"W1 — Fundament & Identitaet": "W1 — Fundament & Identität",
"W4 — USP, Haertung & Launch": "W4 — USP, Härtung & Launch",
}
# ---------- B) PWA-only-Umbau: Spezifikation je Working-ID ----------
def link(path, sec): return f'<a href="{GITEA}/{path}">{path.split("/")[-1]} — {sec}</a>'
def desc(doks, bby, blk, owner, win, dod):
dl = "<br/>".join(link(p, s) for p, s in doks)
li = "".join(f"<li>{d}</li>" for d in dod)
return (f"<p><b>📚 Doku</b><br/>{dl}</p>"
f"<p><b>⛔ blocked-by:</b> {bby or '—'}<br/><b>➡️ blocks:</b> {blk or '—'}<br/>"
f"<b>👤 Owner:</b> {owner} &nbsp;·&nbsp; <b>🗓 Fenster:</b> {win}</p>"
f"<p><b>✅ Definition of Done</b></p><ul>{li}</ul>")
RM, RV2, EX, TL = ".planning/ROADMAP.md", ".planning/ROADMAP-V2.md", ".planning/EXTERNALS-CHECKLISTE.md", ".planning/TIMELINE.md"
AD = "docs/ARCHITECTURE-DECISIONS.md"
def sp(x): return f"_bmad-output/specs/{x}"
def ho(p): return f".planning/handouts/{p}"
# Felder: name, desc-Args, cycle ('keep'|None=raus), set_v3(bool)
PWA = {
"VA-P27a": dict(
name="VA-P27a · Mobile-PWA-Ausbau: Installierbarkeit + Service-Worker-Offline + Web-Push/Kamera (M167/168)",
doks=[(RM,"Phase 27"),(sp("M36-mobile-app.md"),"PWA-Recut"),(AD,"AD-17 PWA-only")],
bby="R-P9b (OfflineSyncQueue), AK-P21 (notify→Web-Push)", blk="VA-P27b", owner="akeshan",
win="v2-W2 (fällig 2026-07-25)", cycle="keep", set_v3=False,
dod=["Installierbare PWA: Web-App-Manifest + Add-to-Homescreen + Standalone-Display",
"Pre-Cache beim Login + Offline-Write-Queue (Foto/Note/Task/Checklist/Acceptance/Chat) über Service-Worker + IndexedDB",
"Web-Push (VAPID) + Kamera/Foto via Web-APIs (lokaler Resize); 2FA bleibt — kein Expo/EAS, kein nativer Client (AD-17)"]),
"VA-P27b": dict(
name="VA-P27b · Mobile-PWA-Ausbau: mobile Navigation + Offline-Sync + PWA-Härtung (M169/170/171)",
doks=[(RM,"Phase 27"),(sp("M36-mobile-app.md"),"Offline/PWA"),(AD,"AD-17 PWA-only")],
bby="VA-P27a", blk="—", owner="akeshan",
win="v2-W3 (fällig 2026-07-27)", cycle="keep", set_v3=False,
dod=["Mobile Navigation (Baustelle/Büro) + mobile Routes",
"Sync-on-Reconnect idempotent (lokale UUID) + Konflikt-Resolution",
"PWA-Härtung: Web-Checkout (kein Pricing-Store-UI), Account-Löschung erreichbar, Force-Update via Service-Worker-Versionierung, Deeplinks — keine App-Store-Compliance"]),
"VD-3": dict(
name="VD-3 · Screens: Mobile-PWA-Shell (Touch, Tab-Bar, Offline-Zustände)",
doks=[(RV2,"P27"),(sp("M36-mobile-app.md"),"Mobile-PWA-UI"),(AD,"AD-17 PWA-only")],
bby="D-D0b", blk="VA-P27a, VA-P27b", owner="david",
win="v2-W2 (fällig 2026-07-22)", cycle="keep", set_v3=False,
dod=["Mobile-PWA-Shell: Tab-Bar, Touch-Paradigma, Offline-Zustände, Sync-Queue/Konflikt-View, Install-Hinweis (Add-to-Homescreen) — kein natives Paradigma"]),
"VD-6": dict(
name="VD-6 · Screens: v2-Politur (extern) + Visual-Reg-Baselines",
doks=[(TL,"David v2")],
bby="VD-2, VD-3", blk="—", owner="david",
win="v2-W3 (fällig 2026-07-31)", cycle="keep", set_v3=False,
dod=["v2-Politur extern sichtbarer Flächen + Visual-Reg-Baselines",
"App-Store-Screenshots/-Assets entfallen — PWA-only (AD-17), kein App-Store"]),
"EXT-13": dict(
name="EXT-13 · v2-Vorlauf-Externals (Gmail-Scope/Entra)",
doks=[(EX,"v2-Vorlauf"),(AD,"AD-17 PWA-only")],
bby="—", blk="v2 (Postfach-Sync)", owner="raffael",
win="W3 (fällig 2026-06-29)", cycle="keep", set_v3=False,
dod=["Gmail-Restricted-Scope-Antrag (Wochen Vorlauf!)",
"MS-Entra-App (Outlook/Graph → v2)",
"Google Play + FCM/APNs entfallen — PWA-only, kein App-Store; Push = Web-Push (VAPID, eigene Keys)"]),
"VJ-3": dict(
name="VJ-3 · Website-Update: Portal/Mobile-PWA/KWP als Features live",
doks=[(ho("dejan/HANDOUT-DEJAN.md"),"Launch-Update")],
bby="VA-P26b, VA-P27b, VR-P32c", blk="—", owner="dejan",
win="v2-W3 (fällig 2026-07-31)", cycle="keep", set_v3=False,
dod=["Feature-Seiten Portal/Mobile-PWA/KWP live",
"Store-Badges entfallen — PWA-only (AD-17), kein App-Store; stattdessen Add-to-Homescreen-Hinweis"]),
# --- v3-Backlog: aus Cycle raus, Label v2→v3 ---
"VEXT-4": dict(
name="VEXT-4 · [v3] App-Store-Einreichung Apple + Google (zurückgestellt — PWA-only)",
doks=[(AD,"AD-17 PWA-only"),(RM,"Phase 27")],
bby="—", blk="—", owner="akeshan",
win="v3 (zurückgestellt — kein App-Store in v1/v2)", cycle=None, set_v3=True,
dod=["⏸ Zurückgestellt auf v3: kein App-Store in v1/v2 (PWA-only, AD-17).",
"Erst relevant, wenn ein nativer Client (v3) gebaut wird — dann: Build-Einreichung Apple + Google, TestFlight/interner Track, Privacy-Manifest."]),
"VJ-1": dict(
name="VJ-1 · [v3] App-Store-Metadaten (zurückgestellt — PWA-only)",
doks=[(AD,"AD-17 PWA-only")],
bby="—", blk="—", owner="dejan",
win="v3 (zurückgestellt — kein App-Store in v1/v2)", cycle=None, set_v3=True,
dod=["⏸ Zurückgestellt auf v3: kein App-Store in v1/v2 (PWA-only, AD-17).",
"Erst relevant mit nativem Client (v3): Store-Listings Apple + Google (Beschreibung/Keywords/Screenshots/Datenschutz)."]),
}
def wid_of(name): return name.split(" · ", 1)[0] if " · " in name else None
# ---------- Lauf ----------
print(f"=== scrub_plane.py — {'APPLY (scharf)' if APPLY else 'DRY-RUN (nur Anzeige)'} ===\n")
labels = {l["name"]: l["id"] for l in get_all("/labels/")}
cycles = get_all("/cycles/")
issues = get_all("/issues/")
# v3-Label sicherstellen
V3 = labels.get("v3")
if V3 is None:
if APPLY:
st, d = req("POST", "/labels/", {"name": "v3", "color": "#6b7280"})
if st < 400: V3 = d["id"]; print("Label 'v3' angelegt.")
else: print("Label v3 FAIL:", st, d)
else:
print("[würde Label 'v3' anlegen]")
V2 = labels.get("v2")
# Cycle-Namen fixen
print("\n--- Cycle-Namen ---")
cyc_by_name = {c["name"]: c for c in cycles}
for old, new in CYCLE_RENAME.items():
c = cyc_by_name.get(old)
if not c:
if new in cyc_by_name: print(f" ok (bereits): {new}")
else: print(f" ?? Cycle nicht gefunden: {old}")
continue
print(f" RENAME: '{old}' -> '{new}'")
if APPLY:
st, d = req("PATCH", f"/cycles/{c['id']}/", {"name": new})
if st >= 400: print(" FAIL:", st, d)
# Issue-Map per Working-ID
wid2issue = {}
for i in issues:
w = wid_of(i["name"])
if w: wid2issue[w] = i
# cycle-membership map (issue_id -> cycle_id) für v3-Defer (Remove)
i2cyc = {}
for c in cycles:
for it in get_all(f"/cycles/{c['id']}/cycle-issues/"):
i2cyc[it["id"]] = c["id"]
patched = uml_only = pwa_changed = 0
print("\n--- Issues ---")
for i in issues:
w = wid_of(i["name"]);
if not w: continue
old_name = i["name"]; old_html = i.get("description_html") or ""
spec = PWA.get(w)
if spec:
new_name = spec["name"]
new_html = desc(spec["doks"], spec["bby"], spec["blk"], spec["owner"], spec["win"], spec["dod"])
else:
new_name = fix_uml(old_name)
new_html = fix_uml(old_html)
name_diff = new_name != old_name
html_diff = new_html != old_html
# Labels (nur für v3-Defer)
lbl_change = None
if spec and spec.get("set_v3") and V3:
cur = list(i.get("labels", []))
new_lbls = [x for x in cur if x != V2] + ([V3] if V3 not in cur else [])
if set(new_lbls) != set(cur): lbl_change = new_lbls
# Cycle-Remove (v3-Defer)
cyc_remove = None
if spec and spec.get("cycle") is None:
cid = i2cyc.get(i["id"])
if cid: cyc_remove = cid
if not (name_diff or html_diff or lbl_change or cyc_remove):
continue
tag = "PWA" if spec else "uml"
if spec: pwa_changed += 1
else: uml_only += 1
print(f" [{tag}] HIV-{i['sequence_id']} {w}")
if name_diff: print(f" name: {old_name}\n -> {new_name}")
if html_diff and not spec: print(f" desc: Umlaut-Fix angewandt")
if html_diff and spec: print(f" desc: komplett neu (PWA-Umbau)")
if lbl_change is not None: print(f" label: v2 -> v3")
if cyc_remove: print(f" cycle: aus Cycle entfernen (→ v3-Backlog)")
if APPLY:
body = {}
if name_diff: body["name"] = new_name
if html_diff: body["description_html"] = new_html
if lbl_change is not None: body["labels"] = lbl_change
if body:
st, d = req("PATCH", f"/issues/{i['id']}/", body)
if st >= 400: print(" PATCH FAIL:", st, d); continue
if cyc_remove:
st, d = req("DELETE", f"/cycles/{cyc_remove}/cycle-issues/{i['id']}/")
if st >= 400: print(" CYCLE-REMOVE FAIL:", st, d)
patched += 1
print(f"\n=== {'GEÄNDERT' if APPLY else 'WÜRDE ÄNDERN'}: {uml_only} (Umlaut) + {pwa_changed} (PWA) Issues ===")
if not APPLY: print("Dry-Run — nichts geschrieben. Mit --apply scharf schalten.")
@@ -0,0 +1,54 @@
#!/usr/bin/env python3
"""set_startdates.py — Nachzug: start_date für die 21 neuen Screen-Tickets (gen_dayplan ordnet nach start_date).
Idempotent. Default DRY-RUN, scharf: --apply"""
import json, os, re, sys, time, urllib.request, urllib.error
APPLY = "--apply" in sys.argv
TOK = {}
for line in open(os.path.expanduser("~/.cli-tokens/plane")):
line = line.strip()
if "=" in line and not line.startswith("#"):
k, v = line.split("=", 1); TOK[k.strip()] = v.strip()
BASE = TOK["PLANE_BASE_URL"].rstrip("/"); WS = TOK["PLANE_WORKSPACE"]; KEY = TOK["PLANE_API_KEY"]
PID = "35d0d968-8ab3-40cc-97b8-b81d917dc5df"
API = f"{BASE}/api/v1/workspaces/{WS}/projects/{PID}"
STARTS = {
"D-P2":"2026-06-20","D-P4":"2026-06-20","D-P3":"2026-06-20","D-P5":"2026-06-20","D-P7":"2026-06-25",
"D-P8":"2026-06-27","D-P14":"2026-06-27","D-P9":"2026-06-30","D-P15":"2026-06-30",
"D-P16":"2026-07-04","D-P12":"2026-07-06","D-P20":"2026-07-08","D-P13":"2026-07-09","D-P21":"2026-07-09",
"VD-P22":"2026-07-13","VD-P23":"2026-07-13","VD-P24":"2026-07-13","VD-P25":"2026-07-16",
"VD-P32":"2026-07-20","VD-P28":"2026-07-27","VD-P30":"2026-07-29","VD-P31":"2026-07-29",
}
def http(method, path, body=None):
data = json.dumps(body).encode() if body is not None else None
r = urllib.request.Request(API + path, data=data, method=method); r.add_header("X-API-Key", KEY)
if data: r.add_header("Content-Type", "application/json")
for _ in range(4):
try:
with urllib.request.urlopen(r, timeout=30) as resp:
raw = resp.read().decode(); return resp.status, (json.loads(raw) if raw else {})
except urllib.error.HTTPError as e:
if e.code == 429: time.sleep(5); continue
return e.code, {}
return 999, {}
def get_all(path):
out, c = [], None
while True:
st, d = http("GET", path + (("?per_page=100&cursor=" + c) if c else "?per_page=100"))
if st >= 400 or isinstance(d, list): out += d if isinstance(d, list) else []; break
out += d.get("results", [])
if d.get("next_page_results") and d.get("next_cursor"): c = d["next_cursor"]
else: break
return out
wid2 = {re.split(r'\s*·\s*', i["name"])[0].strip(): i for i in get_all("/issues/")}
print(f"=== start_date {'(SCHARF)' if APPLY else '(DRY-RUN)'} ===")
done = 0
for wid, sd in STARTS.items():
i = wid2.get(wid)
if not i: print(f" ⚠ {wid} fehlt"); continue
if (i.get("start_date") or "")[:10] == sd: continue
print(f" ~ {wid}: start_date = {sd}")
if APPLY:
st, _ = http("PATCH", f"/issues/{i['id']}/", {"start_date": sd}); time.sleep(1.1)
if st < 300: done += 1
else: print(f" ✗ HTTP {st}")
print(f"{'gesetzt: '+str(done) if APPLY else '→ scharf: --apply'}")
@@ -0,0 +1,82 @@
#!/usr/bin/env python3
"""
sync_blocked_by.py — macht blocks/blocked-by bidirektional konsistent.
Für jedes konkrete Paar "A blocks B" wird A in B's blocked-by-Feld ergänzt (falls fehlt).
IDEMPOTENT (berechnet Fehlende aus Ist-Stand), default DRY-RUN, scharf: --apply
"""
import json, os, re, sys, time, urllib.request, urllib.error
APPLY = "--apply" in sys.argv
TOK = {}
for line in open(os.path.expanduser("~/.cli-tokens/plane")):
line = line.strip()
if "=" in line and not line.startswith("#"):
k, v = line.split("=", 1); TOK[k.strip()] = v.strip()
BASE = TOK["PLANE_BASE_URL"].rstrip("/"); WS = TOK["PLANE_WORKSPACE"]; KEY = TOK["PLANE_API_KEY"]
PID = "35d0d968-8ab3-40cc-97b8-b81d917dc5df"
API = f"{BASE}/api/v1/workspaces/{WS}/projects/{PID}"
IDRE = re.compile(r"\b(VEXT|VR|VA|VD|VH|VJ|VN|EXT|AK|R|D|H|J|N)-[A-Za-z0-9]+")
def ids(s): return IDRE.findall(s) and [m.group(0) for m in IDRE.finditer(s)] or []
def http(m, p, b=None):
data = json.dumps(b).encode() if b is not None else None
r = urllib.request.Request(API + p, data=data, method=m); r.add_header("X-API-Key", KEY)
if data: r.add_header("Content-Type", "application/json")
for _ in range(4):
try:
with urllib.request.urlopen(r, timeout=30) as resp:
raw = resp.read().decode(); return resp.status, (json.loads(raw) if raw else {})
except urllib.error.HTTPError as e:
if e.code == 429: time.sleep(5); continue
return e.code, {}
return 999, {}
def get_all(p):
out, c = [], None
while True:
st, d = http("GET", p + (("?per_page=100&cursor=" + c) if c else "?per_page=100"))
if st >= 400: break
if isinstance(d, list): out += d; break
out += d.get("results", [])
if d.get("next_page_results") and d.get("next_cursor"): c = d["next_cursor"]
else: break
return out
issues = get_all("/issues/")
W = {} # wid -> issue
for i in issues:
if " · " in i["name"]: W[i["name"].split(" · ")[0].strip()] = i
def field(html, label):
m = re.search(label + r":</(?:b|strong)>\s*(.*?)<br", html)
return ids(m.group(1)) if m else []
# erwartete blocked-by je Ticket = alle A, die "blocks B" sagen
states = {s["id"]: s["name"] for s in get_all("/states/")}
def cancelled(wid): return states.get(W[wid]["state"]) == "Cancelled"
expected = {}
for w, i in W.items():
if cancelled(w): continue # aufgeloeste/abgesagte Tickets (VD-1/VD-5/D-REST) NICHT als Blocker
for b in field(i["description_html"], "blocks"):
if b in W and not cancelled(b): expected.setdefault(b, set()).add(w)
# pro Ticket: fehlende blocked-by
plan = []
for b, exp in expected.items():
cur = set(field(W[b]["description_html"], "blocked-by"))
missing = sorted(exp - cur)
if missing: plan.append((b, missing, sorted(cur)))
plan.sort()
print(f"=== blocked-by-Sync {'(SCHARF)' if APPLY else '(DRY-RUN)'} === {len(plan)} Tickets erhalten ergaenzte blocked-by")
def patch_bb(html, add):
m = re.search(r"(⛔ blocked-by:</(?:b|strong)>\s*)(.*?)(<br)", html)
if not m: return None
cur = m.group(2).strip()
base = "" if cur in ("", "—", "-") else cur.rstrip(", ")
newlist = (base + ", " if base else "") + ", ".join(add)
return html[:m.start(2)] + newlist + html[m.end(2):]
done = 0
for b, missing, cur in plan:
print(f" {b}: + {missing} (war: {cur or '—'})")
if APPLY:
nh = patch_bb(W[b]["description_html"], missing)
if nh is None: print(f" ⚠ kein blocked-by-Feld in {b}"); continue
st, _ = http("PATCH", f"/issues/{W[b]['id']}/", {"description_html": nh}); time.sleep(1.1)
if st < 300: done += 1
else: print(f" ✗ HTTP {st}")
print(f"{'gepatcht: '+str(done) if APPLY else '→ scharf: --apply'}")
@@ -0,0 +1,227 @@
#!/usr/bin/env python3
"""
HiveGrid -> Plane Ticket-Sync (idempotent).
Liest Zugang aus ~/.cli-tokens/plane (env-Format).
ZIEL-PROJEKT ist HARDCODED auf HiveGrid (NICHT die PLANE_PROJECT-Variable,
die faelschlich auf PowerLinked zeigt).
Phase A: Cycles (W1-W4) + 7 Module + Labels + Modul "Externals" (12 Issues).
Phase B (spaeter): restliche Module-Issues + modueluebergreifende Relations.
Aufruf: python3 sync_plane.py
Re-Run-sicher: existierende Objekte werden per Name erkannt, nicht dupliziert.
"""
import json, os, sys, urllib.request, urllib.error
# ⚠ BOOTSTRAP-GUARD (seit 2026-06-16): Plane ist LIVE + manuell gescrubbt (Umlaute, PWA-Umbau,
# v3-Defers). Dieses Skript matcht Issues per VOLLNAMEN — ein Re-Run nach dem Scrub fände
# umbenannte Tickets NICHT wieder und legte DUPLIKATE an. Laufende Pflege -> scrub_plane.py
# (Working-ID-Match, idempotent). Bewusster Neu-Bootstrap nur mit --force-bootstrap.
if "--force-bootstrap" not in sys.argv:
raise SystemExit(
"✋ Bootstrap gesperrt: Plane ist live + gescrubbt — Re-Run würde Duplikate erzeugen.\n"
" Laufende Änderungen -> .planning/plane-sync/scrub_plane.py (idempotent).\n"
" Echter Neu-Bootstrap nur bewusst mit --force-bootstrap."
)
# ---- Zugang ----
TOK = {}
with open(os.path.expanduser("~/.cli-tokens/plane")) as f:
for line in f:
line = line.strip()
if "=" in line and not line.startswith("#"):
k, v = line.split("=", 1)
TOK[k.strip()] = v.strip()
BASE = TOK["PLANE_BASE_URL"].rstrip("/")
WS = TOK["PLANE_WORKSPACE"]
KEY = TOK["PLANE_API_KEY"]
# HARDCODED: HiveGrid-Projekt (NICHT PowerLinked!)
PID = "35d0d968-8ab3-40cc-97b8-b81d917dc5df"
API = f"{BASE}/api/v1/workspaces/{WS}/projects/{PID}"
GITEA = "https://git.tool-ctrl.de/toolctrl-labs/HiveGrid-Cloud/src/branch/main"
MEMBERS = {
"raffael": "8e34a88c-19c9-4565-b4f5-50415d623ce8",
"akeshan": "8bf43e86-dc8a-4963-b57a-aeb5f2cc450a",
"david": "6c1fc63f-133d-4f40-86e4-7f658a6edcc7",
"dejan": "a5883f5e-3038-453c-9401-39ab1f40be9e",
"haris": "48367c1f-20d2-44f1-8ae2-faf35aa2052a",
}
def req(method, path, body=None):
url = path if path.startswith("http") else API + path
data = json.dumps(body).encode() if body is not None else None
r = urllib.request.Request(url, data=data, method=method)
r.add_header("X-API-Key", KEY)
r.add_header("Content-Type", "application/json")
try:
with urllib.request.urlopen(r, timeout=30) as resp:
raw = resp.read().decode()
return resp.status, (json.loads(raw) if raw else {})
except urllib.error.HTTPError as e:
return e.code, {"_error": e.read().decode()[:400]}
def get_all(path):
"""Cursor-paginierte Liste -> alle results."""
out, cursor = [], None
while True:
p = path + (("?cursor=" + cursor) if cursor else "")
st, d = req("GET", p)
if st >= 400:
print(" GET FAIL", path, st, d); break
if isinstance(d, list):
out += d; break
out += d.get("results", [])
if d.get("next_page_results") and d.get("next_cursor"):
cursor = d["next_cursor"]
else:
break
return out
# ---- States ----
states = {s["name"]: s["id"] for s in get_all("/states/")}
BACKLOG = states.get("Backlog")
print("States:", list(states.keys()), "| Backlog-id ok:", bool(BACKLOG))
# ---- Cycles (idempotent by name) ----
CYCLES = [
("W1 — Fundament & Identitaet", "2026-06-16", "2026-06-19"),
("W2 — Plattform & CRM (Demo 1)", "2026-06-20", "2026-06-26"),
("W3 — Kern-Kette & Kommunikation (Demo 2)", "2026-06-27", "2026-07-03"),
("W4 — USP, Haertung & Launch", "2026-07-04", "2026-07-10"),
]
existing_cycles = {c["name"]: c["id"] for c in get_all("/cycles/")}
cycle_id = {}
for name, start, end in CYCLES:
if name in existing_cycles:
cycle_id[name] = existing_cycles[name]; print("Cycle vorhanden:", name)
else:
st, d = req("POST", "/cycles/", {"name": name, "start_date": start, "end_date": end, "project_id": PID})
if st < 400: cycle_id[name] = d["id"]; print("Cycle angelegt:", name)
else: print("Cycle FAIL:", name, st, d)
W = {"W1": CYCLES[0][0], "W2": CYCLES[1][0], "W3": CYCLES[2][0], "W4": CYCLES[3][0]}
# ---- Module (idempotent by name) ----
MODULES = ["Externals", "Raffael (Dev)", "Akeshan (Dev)", "David (Screens)",
"Dejan (Website)", "Haris (Vertrieb)", "Noah (Validierung)"]
existing_mods = {m["name"]: m["id"] for m in get_all("/modules/")}
module_id = {}
for name in MODULES:
if name in existing_mods:
module_id[name] = existing_mods[name]; print("Modul vorhanden:", name)
else:
st, d = req("POST", "/modules/", {"name": name})
if st < 400: module_id[name] = d["id"]; print("Modul angelegt:", name)
else: print("Modul FAIL:", name, st, d)
# ---- Labels (idempotent by name) ----
LABELS = {
"typ:phase": "#2563eb", "typ:screen": "#db2777", "typ:external": "#d97706",
"typ:website": "#0891b2", "typ:vertrieb": "#16a34a", "typ:validierung": "#7c3aed",
"gate:W1": "#9ca3af", "gate:W2": "#6b7280", "gate:W3": "#4b5563", "gate:W4": "#374151",
}
existing_labels = {l["name"]: l["id"] for l in get_all("/labels/")}
label_id = {}
for name, color in LABELS.items():
if name in existing_labels:
label_id[name] = existing_labels[name]
else:
st, d = req("POST", "/labels/", {"name": name, "color": color})
if st < 400: label_id[name] = d["id"]; print("Label angelegt:", name)
else: print("Label FAIL:", name, st, d)
# ---- Helper: Doku-HTML + Issue-Description ----
def doku_link(path, section):
return f'<a href="{GITEA}/{path}">{path.split("/")[-1]} — {section}</a>'
def desc(doku, blocked_by, blocks, owner, window, dod):
lis = "".join(f"<li>{d}</li>" for d in dod)
return (f"<p><b>📚 Doku</b><br/>{doku}</p>"
f"<p><b>⛔ blocked-by:</b> {blocked_by or '—'}<br/>"
f"<b>➡️ blocks:</b> {blocks or '—'}<br/>"
f"<b>👤 Owner:</b> {owner} &nbsp;·&nbsp; <b>🗓 Fenster:</b> {window}</p>"
f"<p><b>✅ Definition of Done</b></p><ul>{lis}</ul>")
# ---- Issue anlegen (idempotent by exact name) ----
existing_issues = {i["name"]: i["id"] for i in get_all("/issues/")}
def ensure_issue(title, assignees, labels, start, target, description_html):
if title in existing_issues:
return existing_issues[title], False
body = {"name": title, "description_html": description_html,
"state": BACKLOG, "assignees": [MEMBERS[a] for a in assignees],
"labels": [label_id[l] for l in labels if l in label_id],
"start_date": start, "target_date": target}
st, d = req("POST", "/issues/", body)
if st >= 400:
print("Issue FAIL:", title, st, d); return None, False
existing_issues[title] = d["id"]
return d["id"], True
def link_issue(iid, cycle_key, module):
"""Cycle- + Modul-Zuordnung (idempotent; Plane M2M ignoriert Duplikate)."""
cn = W[cycle_key]
if cn in cycle_id:
st, d = req("POST", f"/cycles/{cycle_id[cn]}/cycle-issues/",
{"issues": [iid], "project": PID})
if st >= 400 and "already" not in str(d).lower():
print(" cycle-link FAIL", st, d)
if module in module_id:
st, d = req("POST", f"/modules/{module_id[module]}/module-issues/",
{"issues": [iid], "project": PID})
if st >= 400 and "already" not in str(d).lower():
print(" module-link FAIL", st, d)
EXT_DOC = ".planning/EXTERNALS-CHECKLISTE.md"
EXTERNALS = [
("EXT-02 · Mailjet Sende-Domain (SPF/DKIM/DMARC) + Warm-up", ["raffael"], "W1", "2026-06-16", "2026-06-16",
"A6/B1/D1", "—", "P2 (Einladungs-Mails), P14 (Marketing-Zustellbarkeit)",
["SPF/DKIM/DMARC gesetzt & verifiziert (Auto-Probe gruen)", "Domain-Warm-up gestartet", "AD-6 im ADR auf Accepted"]),
("EXT-03 · Anwalt: AVV + DSGVO-Auskunft + Website-Rechtstexte", ["dejan"], "W1", "2026-06-16", "2026-06-19",
"E6", "—", "Website-LIVE (Rechtstexte), P21 / Launch",
["AVV-Vorlage (Art. 28) beauftragt", "DSGVO-Auskunfts-Vorlage", "Impressum/Datenschutz fuer Website"]),
("EXT-04 · KWP: Callback-URLs melden + bnWin.net 8.1 N3", ["raffael"], "W1", "2026-06-16", "2026-06-17",
"A1", "N-KWP (Noah/Geerkens-IT)", "v2-P10 (KWP-Integration)",
["Beide Callback-URLs an KWP gemeldet (app + staging, PKCE)", "bnWin.net-Update 8.1 N3 bei Geerkens-IT angestossen"]),
("EXT-05 · Noah: 4 Gate-Freitags-Slots blocken", ["raffael"], "W1", "2026-06-16", "2026-06-16",
"E1", "—", "alle Noah-Demos (19./26.06., 03./10.07.)",
["4 Slots terminiert", "von Noah bestaetigt"]),
("EXT-06 · Hetzner-Projekt HiveGrid: S3+Token + DEK-Master-Key", ["raffael"], "W1", "2026-06-16", "2026-06-17",
"B5", "—", "P4 (Storage), P5/P17 (DEK), AK-Infra-Live",
["Hetzner-Projekt HiveGrid + S3-Bucket + Token", "DEK-Master-Key in Coolify-Secrets", "SCALEWAY_*-Env -> Hetzner-Endpoint"]),
("EXT-07 · Stripe-Konto + Live-Verifizierung", ["raffael"], "W1", "2026-06-16", "2026-06-26",
"A5", "—", "P20 (Billing-Go-Live)",
["Konto + Geschaeftsdaten + Bankkonto", "Test-Mode fuer Dev aktiv", "Live-Verifizierung eingereicht"]),
("EXT-08 · AirCall-Konto + Sandbox + Webhooks", ["raffael"], "W1", "2026-06-16", "2026-06-30",
"B2", "—", "P15 (Telefonie)",
["Konto + Sandbox", "API-Keys", "Webhooks konfiguriert"]),
("EXT-09 · PandaDoc-Sandbox (Provider-Wahl)", ["raffael"], "W1", "2026-06-16", "2026-07-03",
"B4/D4", "—", "P16 (Angebot/Signatur)",
["Provider gewaehlt (PandaDoc vs. DocuSign)", "Sandbox + API-Key"]),
("EXT-10 · Google-Cloud OAuth + Calendar-Scope-Antrag", ["raffael"], "W1", "2026-06-16", "2026-06-18",
"A2", "—", "P16 (Kalender, nur Google)",
["OAuth-App + nur Calendar-Scope", "Verifizierung beantragt", "Testmodus-Bruecke mit Workspace-Konten"]),
("EXT-11 · Mistral API-Key", ["raffael"], "W1", "2026-06-16", "2026-06-18",
"B6", "—", "P13 (KI-Layer)",
["La-Plateforme-Key in Coolify-Secrets"]),
("EXT-12 · Geo-IP + HIBP pruefen/anbinden", ["raffael"], "W1", "2026-06-16", "2026-06-19",
"B8/B9", "—", "P2 (Session-Standort + Breach-Check)",
["Geo-IP EU-Konformitaet geprueft (oder stub)", "HIBP k-Anonymity angebunden"]),
("EXT-13 · v2-Vorlauf-Externals (Play/FCM/Gmail-Scope/Entra)", ["raffael"], "W3", "2026-06-29", "2026-06-29",
"v2-Vorlauf", "—", "v2 (Mobile-App, Postfach-Sync)",
["Google Play Console", "FCM/APNs-Zertifikate", "Gmail-Restricted-Scope-Antrag (Wochen Vorlauf!)", "MS-Entra-App"]),
]
print("\n--- Externals-Issues ---")
for title, asg, cyc, start, target, sec, bby, blk, dod in EXTERNALS:
html = desc(doku_link(EXT_DOC, sec), bby, blk,
", ".join(asg), f"{cyc} (faellig {target})", dod)
labels = ["typ:external", f"gate:{cyc}"]
iid, created = ensure_issue(title, asg, labels, start, target, html)
if iid:
link_issue(iid, cyc, "Externals")
print(("angelegt:" if created else "verknuepft:"), title)
print("\nFERTIG (Phase A). Projekt-URL:",
f"{BASE}/{WS}/projects/{PID}/issues/")
@@ -0,0 +1,407 @@
#!/usr/bin/env python3
"""
HiveGrid -> Plane Ticket-Sync PHASE B (idempotent).
Legt die restlichen Issues (Raffael/Akeshan/David/Dejan/Haris/Noah + R-REFIT + EXT-14)
an und verdrahtet das JIT-Netz als klickbare Issue-Links (blocked-by).
Voraussetzung: Phase A (sync_plane.py) lief -> Module/Cycles/Labels/Externals existieren.
Re-Run-sicher: Issues per Name, Links per Titel-Prefix erkannt.
"""
import json, os, sys, time, urllib.request, urllib.error
# ⚠ BOOTSTRAP-GUARD (seit 2026-06-16): Plane ist LIVE + manuell gescrubbt (Umlaute, PWA-Umbau,
# v3-Defers). Dieses Skript matcht Issues per VOLLNAMEN — ein Re-Run nach dem Scrub fände
# umbenannte Tickets NICHT wieder und legte DUPLIKATE an. Laufende Pflege -> scrub_plane.py
# (Working-ID-Match, idempotent). Bewusster Neu-Bootstrap nur mit --force-bootstrap.
if "--force-bootstrap" not in sys.argv:
raise SystemExit(
"✋ Bootstrap gesperrt: Plane ist live + gescrubbt — Re-Run würde Duplikate erzeugen.\n"
" Laufende Änderungen -> .planning/plane-sync/scrub_plane.py (idempotent).\n"
" Echter Neu-Bootstrap nur bewusst mit --force-bootstrap."
)
TOK = {}
for line in open(os.path.expanduser("~/.cli-tokens/plane")):
line = line.strip()
if "=" in line and not line.startswith("#"):
k, v = line.split("=", 1); TOK[k.strip()] = v.strip()
BASE = TOK["PLANE_BASE_URL"].rstrip("/"); WS = TOK["PLANE_WORKSPACE"]; KEY = TOK["PLANE_API_KEY"]
PID = "35d0d968-8ab3-40cc-97b8-b81d917dc5df"
API = f"{BASE}/api/v1/workspaces/{WS}/projects/{PID}"
GITEA = "https://git.tool-ctrl.de/toolctrl-labs/HiveGrid-Cloud/src/branch/main"
M = {"raffael":"8e34a88c-19c9-4565-b4f5-50415d623ce8","akeshan":"8bf43e86-dc8a-4963-b57a-aeb5f2cc450a",
"david":"6c1fc63f-133d-4f40-86e4-7f658a6edcc7","dejan":"a5883f5e-3038-453c-9401-39ab1f40be9e",
"haris":"48367c1f-20d2-44f1-8ae2-faf35aa2052a"}
def _once(method, url, body):
r = urllib.request.Request(url, data=json.dumps(body).encode() if body is not None else None, method=method)
r.add_header("X-API-Key", KEY); r.add_header("Content-Type", "application/json")
try:
with urllib.request.urlopen(r, timeout=30) as resp:
raw = resp.read().decode(); return resp.status, (json.loads(raw) if raw else {})
except urllib.error.HTTPError as e:
return e.code, {"_error": e.read().decode()[:300]}
def req(method, path, body=None):
"""Mit 429-Retry (Backoff) + Throttle, um Plane-Rate-Limit (60/min) zu respektieren."""
url = path if path.startswith("http") else API + path
st, d = None, None
for _ in range(8):
st, d = _once(method, url, body)
if st == 429:
time.sleep(25); continue
time.sleep(1.1) # Throttle: < 60 Requests/min
return st, d
return st, d
def get_all(path):
out, cursor = [], None
while True:
st, d = req("GET", path + (("?cursor=" + cursor) if cursor else ""))
if st >= 400: print("GET FAIL", path, st, d); break
if isinstance(d, list): out += d; break
out += d.get("results", [])
if d.get("next_page_results") and d.get("next_cursor"): cursor = d["next_cursor"]
else: break
return out
states = {s["name"]: s["id"] for s in get_all("/states/")}
BACKLOG = states["Backlog"]
cyc = {c["name"]: c["id"] for c in get_all("/cycles/")}
mod = {m["name"]: m["id"] for m in get_all("/modules/")}
lab = {l["name"]: l["id"] for l in get_all("/labels/")}
CY = {"W1":"W1 — Fundament & Identitaet","W2":"W2 — Plattform & CRM (Demo 1)",
"W3":"W3 — Kern-Kette & Kommunikation (Demo 2)","W4":"W4 — USP, Haertung & Launch"}
# Doku-Pfade
RM,PS,SM,EM,PB,TL,EX = (".planning/ROADMAP.md",".planning/PHASE-SOURCES.md",".planning/SCREEN-MAP.md",
".planning/ENTITY-MODEL.md",".planning/DESIGNER-FIRST-PLAYBOOK.md",".planning/TIMELINE.md",".planning/EXTERNALS-CHECKLISTE.md")
AD,IC = "docs/ARCHITECTURE-DECISIONS.md","docs/INTEGRATION-CONTRACTS.md"
def sp(x): return f"_bmad-output/specs/{x}"
def ho(p): return f".planning/handouts/{p}"
def link(path, sec): return f'<a href="{GITEA}/{path}">{path.split("/")[-1]} — {sec}</a>'
def desc(doks, bby, blk, owner, win, dod):
dl = "<br/>".join(link(p, s) for p, s in doks)
li = "".join(f"<li>{d}</li>" for d in dod)
return (f"<p><b>📚 Doku</b><br/>{dl}</p>"
f"<p><b>⛔ blocked-by:</b> {bby or '—'}<br/><b>➡️ blocks:</b> {blk or '—'}<br/>"
f"<b>👤 Owner:</b> {owner} &nbsp;·&nbsp; <b>🗓 Fenster:</b> {win}</p>"
f"<p><b>✅ Definition of Done</b></p><ul>{li}</ul>")
# Issue-Definition: (wid, title, [assignees], cycle, modul, typ, start, target, [doku], [blocked_by], blocks_text, [dod])
def I(wid,t,a,c,mo,ty,s,tg,dk,bb,bl,dod): return (wid,t,a,c,mo,ty,s,tg,dk,bb,bl,dod)
RA,AK,DA,DJ,HA,NO = "Raffael (Dev)","Akeshan (Dev)","David (Screens)","Dejan (Website)","Haris (Vertrieb)","Noah (Validierung)"
ISSUES = [
# ---- RAFFAEL ----
I("R-REFIT","R-REFIT · ER-Modell-Re-Fit P6–P9 (Requirements/Screen-Map/Phase-Sources)",["raffael"],"W1",RA,"typ:phase","2026-06-16","2026-06-21",
[(EM,"gelocktes Modell"),(PS,"Phase 6–9 Pivot-Note"),(SM,"§2–§4")],[],"R-P6, R-P7, R-P9a, D-CRM, D-KANBAN, D-ABN",
["REQUIREMENTS P6–9 gegen ENTITY-MODEL nachgezogen","SCREEN-MAP §2–§4 finalisiert (Lead→Projekt, ein Kanban, Rechnung-Sub-Entity)","PHASE-SOURCES P6–9 re-mapped"]),
I("R-P1a","R-P1a · P1 EU-Sterilisation + Contracts + URL-Schemata",["raffael"],"W1",RA,"typ:phase","2026-06-16","2026-06-17",
[(RM,"Phase 1"),(IC,"URL-Schemata"),(EX,"D3 GA/ConvertKit raus")],[],"R-P1b + gesamtes Fundament",
["GitHub/Google-OAuth-Reste + githubId/googleId raus","GA + ConvertKit entfernt (D3)","URL-Schemata (App/Admin/Portal/Forms/Booking/API) dokumentiert"]),
I("R-P1b","R-P1b · P1 Service-Kerne (Audit/notify/i18n/Flags) + Konnektor-Muster",["raffael"],"W1",RA,"typ:phase","2026-06-17","2026-06-18",
[(RM,"Phase 1"),(sp("M21-audit-log.md"),"Audit"),(sp("M32-feature-flags.md"),"Flags")],["R-P1a"],"R-P2a, AK-P3, alle Module (Konnektor)",
["AuditEvent SHA-256-Hash-Kette (default-on)","notify() Kanal-Abstraktion (In-App/Email, Push-Stub)","packages/i18n + verify:i18n","tenantHasFlag() + tenantHasModule()-Muster am Skeleton"]),
I("R-P2a","R-P2a · P2 Mandant + Auth (Email/PW/HIBP) + Sessions + TOTP",["raffael"],"W1",RA,"typ:phase","2026-06-18","2026-06-19",
[(RM,"Phase 2"),(sp("M27-auth-multi-tenancy.md"),"Auth")],["R-P1b","EXT-12"],"R-P2b",
["Self-Service-Signup + Auto-Slug (Reserved-Words)","Login Email/PW + HIBP + Brute-Force","TOTP-2FA","Sessions Postgres-SoT + Redis-Cache (AD-4)"]),
I("R-P2b","R-P2b · P2 RLS-Härtung (Gate-Beweis) + RBAC + User-Lifecycle",["raffael"],"W1",RA,"typ:phase","2026-06-19","2026-06-19",
[(RM,"Phase 2"),(AD,"AD-1 RLS")],["R-P2a"],"Gate W1 + alle Tenant-Daten-Module",
["RLS USING/WITH CHECK, SET LOCAL app.tenant_id, App-Rolle ohne BYPASSRLS","Cross-Tenant-Zugriff nachweisbar verhindert","6 SHK-Rollen geseedet","Einladung 48h / Deaktivierung / PII-Löschung"]),
I("R-P5","R-P5 · P5 Apps-Engine & Integrations-Framework",["raffael"],"W2",RA,"typ:phase","2026-06-20","2026-06-21",
[(RM,"Phase 5"),(sp("M33a-apps-engine.md"),"Apps-Engine")],["R-P2b"],"R-P6, AK-P14a, AK-P15a, AK-P16a, EXT-08/09/10",
["DataConnection OAuth2 + API-Key-Connect","type-safe Adapter-Registry, AppSyncRun/Item","Connection-Health, OAuth-Tokens per-Tenant-DEK (AD-8)"]),
I("R-P6","R-P6 · P6 CRM-Kern",["raffael"],"W2",RA,"typ:phase","2026-06-22","2026-06-24",
[(RM,"Phase 6"),(sp("M01-crm-kern.md"),"CRM"),(EM,"Kontaktmodell")],["R-P5","AK-P4b","R-REFIT"],"R-P7, AK-P14a, AK-P15a",
["Entitäten typisiert + RLS, Entity-Builder raus (AD-2)","Listen filter/sort/paginate/bulk/CSV serverseitig","Detail Inline-Edit + Activity-Stream + Custom-Felder","Live-Duplikat-Check + Lead→Projekt (AD-20)","Konnektor tenantHasModule('crm')"]),
I("R-P7","R-P7 · P7 Lead-Inbox",["raffael"],"W2",RA,"typ:phase","2026-06-25","2026-06-26",
[(RM,"Phase 7"),(sp("M02-lead-inbox.md"),"Lead-Inbox")],["R-P6","R-REFIT"],"R-P8a, AK-P16c (Form→Lead), Demo 1",
["Triage-Liste + Quick-Actions + Bulk + Realtime","Multi-Quellen-Auto-Anlage (Form/Email/AirCall)","Status-Workflow + DSGVO-Auto-Lösch-Cron","Anti-Spam/Quarantäne","lead.qualified-Event"]),
I("R-P8a","R-P8a · P8 Pipeline-Engine + Deal-CRUD + Auto-Verkaufsfall",["raffael"],"W3",RA,"typ:phase","2026-06-27","2026-06-28",
[(RM,"Phase 8"),(sp("M03-sales-pipeline.md"),"Sales"),(EM,"Projekt-Kern")],["R-P7"],"R-P8b",
["Pipeline/Stage/Deal + HiveNumberSeq, SHK-Pipelines geseedet","M049: lead.qualified → Auto-Verkaufsfall","Lost-Reason-CRUD"]),
I("R-P8b","R-P8b · P8 Konfigurierbarer Kanban + Forecast/Reporting",["raffael"],"W3",RA,"typ:phase","2026-06-28","2026-06-29",
[(RM,"Phase 8"),(sp("M03-sales-pipeline.md"),"Kanban/KPIs")],["R-P8a"],"R-P9a (deal.won), R-P11b (Aggregate)",
["Kanban D&D + Stage-Validation, SSE-Realtime","Forecast/KPIs/Stage-Conversion mit Aggregat-Cache","Field-Level-Permissions (Volumen)","deal.won-Event"]),
I("R-P9a","R-P9a · P9 Projekt-Pipeline + Sub-Areas + Rechnung (Sub-Entity v1)",["raffael"],"W3",RA,"typ:phase","2026-06-30","2026-07-01",
[(RM,"Phase 9"),(sp("M04-auftragspipeline.md"),"Auftrag"),(EM,"Projekt + Sub-Areas")],["R-P8b","R-REFIT"],"R-P9b",
["Auftrags-Welt = Pipeline-View auf Projekt-Kern (kein Won-Objekt)","Sub-Areas: Termine/Rechnungen/Checklisten/Tasks/Doku","Rechnung = neues Sub-Entity v1"]),
I("R-P9b","R-P9b · P9 Plantafel (offline) + Abnahme-Protokoll (offline)",["raffael"],"W3",RA,"typ:phase","2026-07-01","2026-07-02",
[(RM,"Phase 9"),(sp("M04-auftragspipeline.md"),"Plantafel/Abnahme")],["R-P9a","AK-P17b"],"Demo 2, R-P11a",
["Plantafel pro Monteur/Tag, offline-fähig, HR-Abwesenheiten sichtbar","Abnahme-Protokoll Touch-Signatur, offline + Sync","PDF + Auto-Email"]),
I("R-P11a","R-P11a · P11 Globale Suche (Meilisearch, Cmd+K)",["raffael"],"W4",RA,"typ:phase","2026-07-03","2026-07-04",
[(RM,"Phase 11"),(sp("M24-globale-suche.md"),"Suche")],["R-P9b","AK-INFRA2"],"R-P11b",
["Meilisearch permission-aware via SearchAdapter","Outbox-Index-Pattern, SearchIndexEntry/RecentSearch","Cmd+K debounced + Vollbild-View"]),
I("R-P11b","R-P11b · P11 Dashboard (3 Rollen-Layouts)",["raffael"],"W4",RA,"typ:phase","2026-07-04","2026-07-05",
[(RM,"Phase 11"),(sp("M20-dashboard.md"),"Dashboard")],["R-P11a","R-P8b"],"R-P12a",
["3 feste Rollen-Layouts (GF/Büro/Monteur) geseedet","Widgets aus Sales/Projekte/Tasks/HR/KI","Live-Update WebSocket/SSE + Aggregat-Cache"]),
I("R-P12a","R-P12a · P12 Automation-Engine + Trigger/Action-Registry + Guards",["raffael"],"W4",RA,"typ:phase","2026-07-06","2026-07-07",
[(RM,"Phase 12"),(sp("M17-automation-engine.md"),"Automation")],["R-P11b"],"R-P12b, R-P13 (KI-Actions)",
["Trigger-Library (CRM/Sales/Projekte/Email/Forms/Kalender/Zeit/Webhook)","Action-Library erweiterbar (KWP/KI docken nach)","Loop-Guard/Rate-Limit/Idempotenz/Metering","AutomationRule/Execution/StepExecution"]),
I("R-P12b","R-P12b · P12 Visueller Flow-Editor + Dry-Run + 24h-Undo + Sprach-Andock",["raffael"],"W4",RA,"typ:phase","2026-07-07","2026-07-08",
[(RM,"Phase 12"),(sp("M17-automation-engine.md"),"Flow-Editor")],["R-P12a","D-FLOW"],"R-P13",
["Graph-Editor aus Trigger/Action-Library","Dry-Run-Vorschau + Bestätigungs-Pflicht","24h-Undo-Fenster","Sprach-zu-Automation-Andock (nie Auto-Aktivierung)"]),
I("R-P13","R-P13 · P13 KI-Layer (Mistral-Gateway)",["raffael"],"W4",RA,"typ:phase","2026-07-09","2026-07-09",
[(RM,"Phase 13"),(sp("M18-ki-layer.md"),"KI")],["R-P12b","EXT-11"],"FREEZE Do 09.07.",
["EU-LLM-Gateway Mistral + AiCredits-Konto + harte Limits","Multi-Provider-Fallback-Interface","Promptfoo-Suite (Injection)","Sprach-zu-Automation exklusiv im Automation-Kontext"]),
# ---- AKESHAN ----
I("AK-P1c","AK-P1c · P1 Hot-Swap-Maschine + Walking-Skeleton + PWA",["akeshan"],"W1",AK,"typ:phase","2026-06-16","2026-06-17",
[(RM,"Phase 1"),(PB,"§1 Fundamente")],[],"alle Screen-Andock, Gate W1",
["VM-Konvention + Action-Callback + Subframe-Adapter","ui-mock + Visual-Regression-Gate + Hot-Swap-Drill","Walking-Skeleton-Route + PWA-Manifest"]),
I("AK-INFRA1","AK-INFRA1 · Infra-Live: Staging + Coolify-Apps + PG/Redis/PgBouncer",["akeshan"],"W1",AK,"typ:external","2026-06-16","2026-06-17",
[(EX,"C3/C4")],["EXT-06"],"CI/Gates, alle Deploys",
["staging-app/api auf staging-1 (öffentlich + gehärtet, noindex, HMAC)","Coolify-managed Postgres/Redis + PgBouncer"]),
I("AK-INFRA2","AK-INFRA2 · DNS + Wildcard-TLS + zentrale Dienste anbinden",["akeshan"],"W1",AK,"typ:external","2026-06-17","2026-06-18",
[(EX,"C1/C2/C5")],["AK-INFRA1"],"R-P2a (mCaptcha), AK-P4a (ClamAV), R-P11a (Meili)",
["Cloudflare *.hivegrid.de Wildcard-TLS + admin/staging-Subdomains","Meili-scoped-Key + mCaptcha + ClamAV per ENV anbinden"]),
I("AK-P4a","AK-P4a · P4 Files (chunked Upload, HEIC→JPG, ClamAV)",["akeshan"],"W1",AK,"typ:phase","2026-06-18","2026-06-19",
[(RM,"Phase 4"),(sp("M23-files.md"),"Files")],["AK-INFRA2","EXT-06"],"AK-P4b, R-P6 (File-Links)",
["chunked Upload (TUS) + RLS auf Storage-Pfaden (Hetzner-S3)","Preview PDF→PNG / Bild→WebP / HEIC→JPG (Pflicht!)","ClamAV-Scan, Permissions/Sharing, FileEntityLink"]),
I("AK-P4b","AK-P4b · P4 Tasks + polymorphe EntityLink-Tabelle",["akeshan"],"W1",AK,"typ:phase","2026-06-19","2026-06-19",
[(RM,"Phase 4"),(sp("M26-tasks.md"),"Tasks")],["AK-P4a"],"R-P6, Gate W1 (EntityLink)",
["Task-CRUD: Status/Priorität/Fälligkeit/Entity-Link/Watcher/Reminder","30-Tage-Auto-Archiv-Cron","polymorphe EntityLink-Tabelle (entity_type+entity_id)"]),
I("AK-P3","AK-P3 · P3 Querschnitts-Oberflächen (Audit/Notif/Sprache DE)",["akeshan"],"W2",AK,"typ:phase","2026-06-20","2026-06-21",
[(RM,"Phase 3"),(sp("M21-audit-log.md"),"Audit-UI"),(sp("M22-notifications.md"),"Notif-UI")],["R-P1b","R-P2b"],"—",
["Audit-Viewer permission-gegated + NDJSON/CSV-Export","Notification-Center + Kategorie-Toggles pro Kanal","Sprach-Settings DE (i18n-ready)"]),
I("AK-P19","AK-P19 · P19 Plattform-Admin (admin.hivegrid.de)",["akeshan"],"W2",AK,"typ:phase","2026-06-22","2026-06-24",
[(RM,"Phase 19"),(sp("M37-plattform-admin.md"),"Admin")],["R-P2b","AK-P3"],"AK-P20, AK-DEMO1",
["Host-Routing admin.hivegrid.de (NICHT /admin-Pfad!) + Cookie-Domain-Trennung","TOTP-Pflicht, Admin ohne Tenant-Workspace","Tenant-Verwaltung + Abo-Zusammenstellung (Konnektoren+Stripe)","Queue-Monitor + Support-Inbox + AdminAuditLog"]),
I("AK-P17a","AK-P17a · P17 HR-Kern (Stammdaten, Doku, Passwort-Safe)",["akeshan"],"W2",AK,"typ:phase","2026-06-25","2026-06-25",
[(RM,"Phase 17"),(sp("M14-hr-hub.md"),"HR")],["AK-P4b"],"AK-P17b",
["HR-Profile/Dokumente AES-256-GCM (KMS-Envelope, AD-8)","verschlüsselter Passwort-Safe mit Audit-Trail + Reveal"]),
I("AK-P17b","AK-P17b · P17 HR Urlaub/Krank + Surveys + Self-Service",["akeshan"],"W2",AK,"typ:phase","2026-06-26","2026-06-26",
[(RM,"Phase 17"),(sp("M14-hr-hub.md"),"Urlaub/Krank")],["AK-P17a"],"R-P9b (Abwesenheiten→Plantafel)",
["mehrstufiger Urlaubs-Approval-Workflow + Abwesenheits-Kalender","Krankmeldung + AU-Upload (verschlüsselt)","Surveys, Mitarbeiter-Self-Service (Web/PWA)"]),
I("AK-DEMO1","AK-DEMO1 · Demo-Tenant + SHK-Demo-Daten für Noah-Demo 1",["akeshan"],"W2",AK,"typ:external","2026-06-26","2026-06-26",
[(ho("akeshan/HANDOUT-AKESHAN.md"),"Demo-Setup")],["AK-P19","N-DATEN"],"N-DEMO1, H-DEMO",
["Demo-Tenant via Admin angelegt","SHK-Seeds eingespielt (echte Geerkens-Beispieldaten)","klickbarer CRM-Stand für Noah"]),
I("AK-P14a","AK-P14a · P14 Sende-Domain-Verifikation + BCC-Brücke + Tracking",["akeshan"],"W3",AK,"typ:phase","2026-06-27","2026-06-28",
[(RM,"Phase 14"),(sp("M09-email-inbox.md"),"Sende-Domain/Inbound")],["EXT-02","R-P6"],"AK-P14b",
["Sende-Domain DKIM/SPF/DMARC + Auto-Probe","BCC-Logging-Brücke (Mail am Kontakt, kein OAuth)","Email-Tracking + Delivery-Status + Bounces"]),
I("AK-P14b","AK-P14b · P14 Email-Marketing (Kampagnen + A/B)",["akeshan"],"W3",AK,"typ:phase","2026-06-28","2026-06-29",
[(RM,"Phase 14"),(sp("M10-email-marketing.md"),"Marketing")],["AK-P14a"],"—",
["Block-Editor + Segmente + Versand-Engine (BullMQ, Rate-Limit)","Double-Opt-In + Suppression + One-Click-Unsubscribe","Reporting + A/B-Varianten"]),
I("AK-P15a","AK-P15a · P15 Telefonie (AirCall)",["akeshan"],"W3",AK,"typ:phase","2026-06-30","2026-07-01",
[(RM,"Phase 15"),(sp("M12-telefonie.md"),"Telefonie")],["EXT-08","R-P5","R-P6"],"AK-P15b",
["AirCall-Adapter (Apps-Engine, OAuth verschlüsselt)","Click-to-Call + Inbound, unbekannte Nr → Lead","Anruf-Events als Automation-Trigger, Voicemail/Notizen"]),
I("AK-P15b","AK-P15b · P15 Team-Chat (Realtime)",["akeshan"],"W3",AK,"typ:phase","2026-07-01","2026-07-02",
[(RM,"Phase 15"),(sp("M13-team-chat.md"),"Chat")],["AK-P15a","AK-P4a"],"Demo 2",
["WebSocket + Presence/Typing/Read-Receipts (Redis-Pub/Sub, AD-9)","3 Channel-Typen (public/private/entity-linked)","@Mentions + File-Uploads + Threads/Reactions/Pins + Suche"]),
I("AK-P16a","AK-P16a · P16 Kalender-Sync (Google)",["akeshan"],"W4",AK,"typ:phase","2026-07-03","2026-07-04",
[(RM,"Phase 16"),(sp("M25-calendar-sync.md"),"Kalender")],["EXT-10","R-P5"],"AK-P16b",
["bidirektionaler Google-Sync (Auto-Token-Refresh, Webhooks)","HiveGrid-Termine + Konflikt-Log (Outlook → v2)"]),
I("AK-P16b","AK-P16b · P16 Booking (Slots + Verfügbarkeit + Storno)",["akeshan"],"W4",AK,"typ:phase","2026-07-04","2026-07-05",
[(RM,"Phase 16"),(sp("M06-booking.md"),"Booking")],["AK-P16a"],"—",
["öffentliche Booking-Seiten, Slots timezone-aware","Buchung → Lead + Activity + Bestätigungs-Email (iFrame)","Storno/Verschiebung/Re-Assign/No-Show (M129 voll)"]),
I("AK-P16c","AK-P16c · P16 Form-Builder (Editor + Submission + Actions)",["akeshan"],"W4",AK,"typ:phase","2026-07-05","2026-07-06",
[(RM,"Phase 16"),(sp("M05-form-builder.md"),"Forms")],["AK-INFRA2","R-P7"],"—",
["12 Feldtypen + Conditional-Logic + SHK-Templates","Embed URL/QR/iFrame","Post-Submit-Actions (Lead/Deal/Task/Webhook/Email/Automation) + ActionLog","Rate-Limit + mCaptcha + DSGVO-Pflicht"]),
I("AK-P16d","AK-P16d · P16 Angebot/Signatur (PandaDoc)",["akeshan"],"W4",AK,"typ:phase","2026-07-06","2026-07-07",
[(RM,"Phase 16"),(sp("M07-angebot-signatur.md"),"Signatur")],["EXT-09"],"—",
["PDF-Upload → Multi-Signer via PandaDoc (Apps-Engine)","Webhook-Verarbeitung + Status-Tracking pro Unterzeichner"]),
I("AK-P20","AK-P20 · P20 Billing (Stripe Abo-Baukasten) + Onboarding + Branding",["akeshan"],"W4",AK,"typ:phase","2026-07-08","2026-07-08",
[(RM,"Phase 20"),(sp("M28-subscriptions-billing.md"),"Billing")],["EXT-07","AK-P19"],"AK-P21",
["Stripe Abo-Baukasten: Basis/Nutzer + Module als Positionen (KEINE Seat-Typen!)","Trial + Dunning + Frozen-Modus (Read-Only-Middleware)","Auto-SHK-Provisionierung + Demo-Daten-Knopf","Hell/Dunkel-Toggle (SSR-Cookie)"]),
I("AK-P21","AK-P21 · P21 DSGVO (Export + Lösch-Workflow) + Feedback-Widget",["akeshan"],"W4",AK,"typ:phase","2026-07-09","2026-07-09",
[(RM,"Phase 21"),(sp("M35-dsgvo-export.md"),"DSGVO")],["AK-P20"],"FREEZE",
["DSGVO-ZIP-Export (72h-signed-URL)","Tenant-Löschung: Crypto-Shredding + Stripe-Cancel + Storage-Cleanup","Feedback-Widget → Admin-Support-Inbox + Minimal-FAQ"]),
# ---- DAVID ----
I("D-WEB","D-WEB · Website-Screens + Brand-Tokens",["david"],"W1",DA,"typ:screen","2026-06-16","2026-06-16",
[(SM,"Website"),(ho("david/HANDOUT-DAVID.md"),"Website")],[],"J-STRUKTUR, H-PITCH (Tokens)",
["Landing/Features/Pricing-Teaser/Demo-Formular","Brand-/Design-Tokens (Web + App)"]),
I("D-D0a","D-D0a · D0 Design-System + App-Shell (A1)",["david"],"W1",DA,"typ:screen","2026-06-16","2026-06-18",
[(SM,"§0.1 App-Shell"),(PB,"§1")],[],"ALLE Screens, H-PITCH",
["Tokens (Farben/Typo/Spacing)","Sidebar (Konnektor-Gating) + Topbar (Cmd+K, Bell, Tenant-Switch) + Breadcrumb","Status-Banner-System + Toast"]),
I("D-D0b","D-D0b · D0 Archetypen A2–A7 + Zustands-Kit + Primitives",["david"],"W1",DA,"typ:screen","2026-06-18","2026-06-20",
[(SM,"§0.2/0.3"),(PB,"§2 Archetypen")],["D-D0a"],"alle Compose-Screens",
["A2 List · A3 Detail · A4 Form (12 Typen) · A5 Modal/Wizard · A6 Settings/Connection · A7 Zustände","Primitives (Buttons/Badges/KPI/Charts/Signatur-Feld)"]),
I("D-FLOW","D-FLOW · Flow-/Node-Editor (Bespoke, Langläufer ab 18.06.)",["david"],"W3",DA,"typ:screen","2026-06-18","2026-07-03",
[(SM,"§5 Flow-Editor"),(PB,"§3 Rang 1")],["D-D0b"],"R-P12b",
["Graph-Canvas + Knoten-Katalog nach Modul","Dry-Run-Vorschau + Bestätigung","Sprach-Eingabe-Feld + Loop-Guard-Warnung"]),
I("D-CRM","D-CRM · CRM-Cluster-Screens",["david"],"W2",DA,"typ:screen","2026-06-22","2026-06-24",
[(SM,"§2"),(EM,"Kontaktmodell")],["D-D0b","R-REFIT"],"N-DEMO1 (Politur)",
["Kontakt/Firma Liste + Detail (A3-Muster)","Lead-Inbox + Lead→Projekt","Custom-Felder + Tags + Duplikat-Tool","§2 gegen ENTITY-MODEL finalisiert"]),
I("D-KANBAN","D-KANBAN · Pipeline-Kanban (Bespoke, konfigurierbar)",["david"],"W2",DA,"typ:screen","2026-06-24","2026-06-26",
[(SM,"§3 Kanban"),(EM,"Pipeline=View")],["D-D0b","R-REFIT"],"—",
["EIN konfigurierbares Board (Deal/Auftrag = Pipeline-Typen)","Won/Lost-Drop-Dialoge","Volumen permission-gegated"]),
I("D-FORM","D-FORM · Form-Builder-Canvas + öffentliches Formular (Bespoke)",["david"],"W2",DA,"typ:screen","2026-06-24","2026-06-26",
[(SM,"§3 Form-Builder"),(PB,"§3 Rang 2")],["D-D0b"],"—",
["Feld-Palette + Canvas D&D + Conditional-Logic-Editor","öffentliches Formular (mCaptcha, Tenant-Logo)"]),
I("D-KAMP","D-KAMP · Kampagnen-Editor + Segmente (Bespoke)",["david"],"W2",DA,"typ:screen","2026-06-25","2026-06-26",
[(SM,"§3 Kampagnen")],["D-D0b"],"—",
["Multi-Step (Basis→Inhalt→Empfänger→Test→Zeit→Bestätigung)","Ausschluss-Aufschlüsselung + Pflicht-Footer","Klick-Map + A/B-Vergleich + Segment-Builder"]),
I("D-HR","D-HR · HR-Compose-Screens",["david"],"W2",DA,"typ:screen","2026-06-25","2026-06-26",
[(SM,"§3 HR")],["D-D0b"],"—",
["Hub-Start + Announcements","Urlaub/Krank + Payslips + Passwort-Safe (Reveal) + Surveys"]),
I("D-ADMIN","D-ADMIN · Plattform-Admin-Compose",["david"],"W2",DA,"typ:screen","2026-06-26","2026-06-26",
[(SM,"§3 Plattform-Admin")],["D-D0b"],"—",
["Admin-Dashboard (Tenants/User/MRR) + Tenant-Liste/Detail","Abo-Zusammenstellung + Feature-Flags + Health/Queues + Support-Inbox"]),
I("D-PLAN","D-PLAN · Plantafel (Bespoke-Mobile, offline)",["david"],"W3",DA,"typ:screen","2026-06-29","2026-07-01",
[(SM,"§4 Plantafel"),(PB,"§3 Rang 3")],["D-D0b"],"—",
["Desktop-Grid (Mitarbeiter×Zeit) D&D + Konflikt-Indikatoren","Monteur-Mobil-Modus 'Meine Termine heute' offline"]),
I("D-ABN","D-ABN · Abnahme-Workflow (Bespoke-Mobile)",["david"],"W3",DA,"typ:screen","2026-06-29","2026-07-01",
[(SM,"§4 Abnahme")],["D-D0b","R-REFIT"],"—",
["SHK-Abnahme-Formular + Mängel-Repeater mit Foto","Touch-Unterschriften Kunde+Monteur, offline + Sync"]),
I("D-CHAT","D-CHAT · Chat-UI (Bespoke)",["david"],"W3",DA,"typ:screen","2026-06-30","2026-07-01",
[(SM,"§4 Chat")],["D-D0b"],"—",
["Channel-Index + Channel-Detail (Reactions/Threads/Read)","Composer (Markdown/Emoji/@Mention/Anhang) + Tipp-Indikator"]),
I("D-DASH","D-DASH · Dashboard (3 Rollen-Layouts) + Cmd+K",["david"],"W3",DA,"typ:screen","2026-07-01","2026-07-03",
[(SM,"§5 Dashboard/Cmd+K")],["D-D0b"],"—",
["3 feste Rollen-Layouts (GF/Büro/Monteur)","Cmd+K-Modal (Match-Highlight) + Vollbild-Such-View"]),
I("D-BOOK","D-BOOK · Booking-Page (Public, Polish) + Kalender-View",["david"],"W3",DA,"typ:screen","2026-07-02","2026-07-03",
[(SM,"§5 Booking/Kalender")],["D-D0b"],"—",
["öffentliche Booking-Page (Slot-Picker, .ics, höchster Polish)","Kalender Monats-/Wochen-Grid + Connect-Card"]),
I("D-REST","D-REST · KI/Telefonie/Signatur/Billing/DSGVO-Compose",["david"],"W4",DA,"typ:screen","2026-07-04","2026-07-06",
[(SM,"§6")],["D-D0b"],"—",
["KI-Settings/Credits, AirCall-Setup, Signatur-Wizard","Abo-Übersicht, Privacy-Hub, Feedback-Widget"]),
I("D-POLISH","D-POLISH · Politur extern sichtbarer Flächen + Visual-Reg-Baselines",["david"],"W4",DA,"typ:screen","2026-07-06","2026-07-09",
[(PB,"§6c CI-Gates")],["D-BOOK","D-DASH"],"FREEZE",
["Booking/Forms/Marketing-Mails poliert","Visual-Regression-Baselines final (vor Freeze)"]),
# ---- DEJAN ----
I("J-SETUP","J-SETUP · Domain/Hosting/Stack + Setup",["dejan"],"W1",DJ,"typ:website","2026-06-16","2026-06-16",
[(ho("dejan/HANDOUT-DEJAN.md"),"AP-1")],[],"J-STRUKTUR",
["Stack/Hosting/Domain geklärt","Repo-Setup + Seitengerüst"]),
I("J-STRUKTUR","J-STRUKTUR · Seitenstruktur + Davids Screens einbauen",["dejan"],"W1",DJ,"typ:website","2026-06-16","2026-06-17",
[(ho("dejan/HANDOUT-DEJAN.md"),"AP-1")],["J-SETUP","D-WEB"],"J-CONTENT",
["Seitenstruktur (Landing/Features/Pricing-Teaser/Demo-Formular/Webinar-Warteliste)","Davids Designs umgesetzt"]),
I("J-CONTENT","J-CONTENT · Content/Texte einbauen",["dejan"],"W1",DJ,"typ:website","2026-06-17","2026-06-17",
[(ho("dejan/HANDOUT-DEJAN.md"),"AP-1")],["J-STRUKTUR","H-TXT","N-TXTABN"],"J-LIVE",
["Texte (Haris, Noah-abgenommen) eingepflegt","Webinar-Plattform gewählt (EU-konform)"]),
I("J-LAW","J-LAW · Rechtstexte einbauen (Anwalt)",["dejan"],"W1",DJ,"typ:website","2026-06-17","2026-06-18",
[(EX,"E6")],["EXT-03"],"J-LIVE",
["Impressum/Datenschutz/AVV-Link eingebaut"]),
I("J-QA","J-QA · QA + Lead-Routing-Test",["dejan"],"W1",DJ,"typ:website","2026-06-17","2026-06-18",
[(ho("dejan/HANDOUT-DEJAN.md"),"AP-1")],["J-CONTENT"],"J-LIVE",
["responsive QA","Formular → Lead-Routing an Haris getestet"]),
I("J-LIVE","J-LIVE · WEBSITE LIVE",["dejan"],"W1",DJ,"typ:website","2026-06-18","2026-06-18",
[(TL,"Dejan / LIVE 17./18."),(ho("dejan/HANDOUT-DEJAN.md"),"AP-1")],["J-QA","J-LAW"],"H-INBOUND",
["live auf hivegrid.de","EU-konformes Analytics + Search Console"]),
I("J-SEO","J-SEO · SEO + Conversion + Pricing-Seite vorbereiten",["dejan"],"W2",DJ,"typ:website","2026-06-20","2026-06-26",
[(ho("dejan/HANDOUT-DEJAN.md"),"AP-2")],["J-LIVE"],"—",
["SEO-Basics + Conversion-Feinschliff","Pricing-Seite vorbereitet (Preise 25.06.) + Founding-Sektion + Payment-Link"]),
I("J-WEBINAR","J-WEBINAR · Webinar-Landing + Anmelde-Flow",["dejan"],"W3",DJ,"typ:website","2026-06-29","2026-07-03",
[(ho("dejan/HANDOUT-DEJAN.md"),"AP-3")],["J-LIVE"],"H-WEBINAR",
["Landing + Anmelde-Flow","Bestätigungs-/Erinnerungs-Mails"]),
I("J-WEBTECH","J-WEBTECH · Webinar-Technik (Plattform/Aufzeichnung)",["dejan"],"W4",DJ,"typ:website","2026-07-04","2026-07-10",
[(ho("dejan/HANDOUT-DEJAN.md"),"AP-5")],["J-WEBINAR"],"—",
["Plattform-Setup (Livestorm/Zoom) + Generalprobe","Aufzeichnung + Follow-up-Seite (Webinar 14./15.07.)"]),
I("J-LAUNCHUPD","J-LAUNCHUPD · Launch-Update Website",["dejan"],"W4",DJ,"typ:website","2026-07-06","2026-07-10",
[(ho("dejan/HANDOUT-DEJAN.md"),"AP-4")],["J-LIVE","J-SEO"],"—",
["finale Feature-Seiten + Pricing live","Launch-Ankündigung"]),
# ---- HARIS ----
I("H-LISTE","H-LISTE · Zielkundenliste SHK (KWP-Nutzer-Fokus)",["haris"],"W1",HA,"typ:vertrieb","2026-06-16","2026-06-17",
[(ho("haris/HANDOUT-HARIS.md"),"AP-1")],[],"H-CALLS",
["SHK-Zielkundenliste, Fokus KWP-Nutzer (A-Leads)"]),
I("H-PAIN","H-PAIN · Painpoint-Gespräch mit Noah",["haris"],"W1",HA,"typ:vertrieb","2026-06-16","2026-06-17",
[(ho("haris/HANDOUT-HARIS.md"),"AP-1")],["EXT-05"],"H-TXT, H-PITCH",
["Exklusiv-Gespräch SHK-Painpoints (HubSpot/Zettelwirtschaft)"]),
I("H-TXT","H-TXT · Website-Texte schreiben",["haris"],"W1",HA,"typ:vertrieb","2026-06-17","2026-06-17",
[(ho("haris/HANDOUT-HARIS.md"),"AP-1")],["H-PAIN","N-PAIN"],"N-TXTABN, J-CONTENT",
["Headline/Nutzenversprechen/Feature-Texte → an Dejan"]),
I("H-PITCH","H-PITCH · Pitch-Deck + Gesprächsskript",["haris"],"W1",HA,"typ:vertrieb","2026-06-18","2026-06-19",
[(ho("haris/HANDOUT-HARIS.md"),"AP-2")],["D-D0a"],"H-CALLS",
["Pitch-Deck mit D0/Auth-Screens","Gesprächsskript (Noah-Abnahme)"]),
I("H-INBOUND","H-INBOUND · Lead-Sheet + Inbound-Prozess (<24h)",["haris"],"W1",HA,"typ:vertrieb","2026-06-18","2026-06-19",
[(ho("haris/HANDOUT-HARIS.md"),"AP-2")],["J-LIVE"],"—",
["Lead-Sheet aufgesetzt","jede Anfrage < 24h beantwortet"]),
I("H-CALLS","H-CALLS · Erste Discovery-Calls",["haris"],"W2",HA,"typ:vertrieb","2026-06-23","2026-06-26",
[(ho("haris/HANDOUT-HARIS.md"),"AP-3")],["H-LISTE","H-PITCH"],"H-FOUND",
["Discovery/Qualifizierung (Pain, KWP-Nutzung, Team-Größe)"]),
I("H-FOUND","H-FOUND · Founding-Member-Angebot strukturieren",["haris"],"W2",HA,"typ:vertrieb","2026-06-25","2026-06-26",
[(ho("haris/HANDOUT-HARIS.md"),"AP-4")],["H-CALLS","EXT-14"],"H-PAYLINK",
["Early-Bird-Jahresdeal (Preise 25.06.!)","Noah-Abnahme"]),
I("H-PAYLINK","H-PAYLINK · Stripe Payment Link (Founding-Deal)",["haris"],"W2",HA,"typ:vertrieb","2026-06-26","2026-06-26",
[(ho("haris/HANDOUT-HARIS.md"),"AP-4")],["EXT-07","EXT-14"],"H-DEMO",
["Founding-Deal-Payment-Link live (Geld VOR Launch möglich)"]),
I("H-DEMO","H-DEMO · Klick-Demos + echte Produkt-Demos",["haris"],"W3",HA,"typ:vertrieb","2026-06-30","2026-07-03",
[(ho("haris/HANDOUT-HARIS.md"),"AP-5")],["AK-DEMO1"],"H-FOLLOW",
["Klick-Demos (Demo-1-Stand) ab 30.06.","echte Demos (Kette E2E) ab 03.07."]),
I("H-WEBINAR","H-WEBINAR · Webinar-Einladungen + Moderation",["haris"],"W4",HA,"typ:vertrieb","2026-07-06","2026-07-10",
[(ho("haris/HANDOUT-HARIS.md"),"AP-5")],["J-WEBINAR"],"—",
["Einladungen raus (kleine Liste, Spam-Risiko)","Webinar Nr.1 moderieren (14./15.07.)"]),
I("H-FOLLOW","H-FOLLOW · Trial-Follow-ups + Bilanz",["haris"],"W4",HA,"typ:vertrieb","2026-07-09","2026-07-10",
[(ho("haris/HANDOUT-HARIS.md"),"AP-6")],["H-DEMO"],"—",
["Trial-Follow-ups (14 Tage nach Onboarding)","Bilanz: erste Gelder ✓"]),
# ---- NOAH (Assignees Haris + Dejan) ----
I("N-KWP","N-KWP · KWP-Mail freigeben + bnWin.net 8.1 N3 anstoßen",["haris","dejan"],"W1",NO,"typ:validierung","2026-06-16","2026-06-17",
[(EX,"A1"),(ho("noah/HANDOUT-NOAH.md"),"KWP")],[],"EXT-04",
["KWP-Mail-Antwort freigegeben/weitergeleitet","bnWin.net-Update 8.1 N3 bei Geerkens-IT angestoßen"]),
I("N-PAIN","N-PAIN · Painpoint-Input liefern (mit Haris)",["haris","dejan"],"W1",NO,"typ:validierung","2026-06-16","2026-06-17",
[(ho("noah/HANDOUT-NOAH.md"),"Painpoint")],[],"H-TXT",
["SHK-Alltag-Painpoints im Gespräch geliefert"]),
I("N-TXTABN","N-TXTABN · Website-Texte abnehmen",["haris","dejan"],"W1",NO,"typ:validierung","2026-06-17","2026-06-17",
[(ho("noah/HANDOUT-NOAH.md"),"Abnahme")],["H-TXT"],"J-CONTENT",
["Website-Texte abgenommen (alle Außen-Texte = Noah)"]),
I("N-SLOTS","N-SLOTS · 4 Gate-Freitags-Slots bestätigen",["haris","dejan"],"W1",NO,"typ:validierung","2026-06-16","2026-06-16",
[(ho("noah/HANDOUT-NOAH.md"),"Slots")],["EXT-05"],"N-DEMO1, N-DEMO2, N-GONOGO",
["Slots 19./26.06. + 03./10.07. bestätigt"]),
I("N-DATEN","N-DATEN · SHK-Beispieldaten liefern",["haris","dejan"],"W2",NO,"typ:validierung","2026-06-20","2026-06-26",
[(EX,"E3"),(ho("noah/HANDOUT-NOAH.md"),"Daten")],[],"AK-DEMO1",
["echte Pipelines + Custom-Felder + Rollen geliefert (für Seeds)"]),
I("N-LAGER","N-LAGER · Lagerist-Frage beantworten (M070-Scope)",["haris","dejan"],"W2",NO,"typ:validierung","2026-06-20","2026-06-26",
[(EX,"E2")],[],"—",
["Antwort: gehört Lagerist-Arbeitsplatz zum Validierungs-Versprechen? (entscheidet M070-Dünnung)"]),
I("N-DEMO1","N-DEMO1 · Demo 1 abnehmen (CRM klickbar)",["haris","dejan"],"W2",NO,"typ:validierung","2026-06-26","2026-06-26",
[(TL,"Gate W2 / Demo 1")],["AK-DEMO1","R-P7","D-CRM","N-SLOTS"],"—",
["CRM klickbar validiert (Geerkens-Praxisbrille)"]),
I("N-DEMO2","N-DEMO2 · Demo 2 abnehmen (Kette E2E)",["haris","dejan"],"W3",NO,"typ:validierung","2026-07-03","2026-07-03",
[(TL,"Gate W3 / Demo 2")],["R-P9b","N-SLOTS"],"—",
["Kette Lead→Sales→Auftrag E2E validiert"]),
I("N-GONOGO","N-GONOGO · Voll-Walkthrough + Go/No-Go",["haris","dejan"],"W4",NO,"typ:validierung","2026-07-10","2026-07-10",
[(TL,"Gate W4 / Launch")],["R-P13","AK-P21","N-SLOTS"],"[LAUNCH]",
["Voll-Walkthrough + Go/No-Go-Entscheidung Big-Bang-Launch"]),
# ---- ergänztes External ----
I("EXT-14","EXT-14 · Kostenmatrix/Preise mit Partner fixieren",["raffael"],"W2","Externals","typ:external","2026-06-24","2026-06-25",
[(EX,"AD-15 / Preise"),(TL,"Risiko 1 — härtester Business-Blocker")],[],"H-FOUND, H-PAYLINK, J-SEO (Pricing-Seite)",
["Kostenmatrix mit Partner durchgerechnet","Preise/Tier-Zuschnitt fixiert (Abo-Baukasten)","an Haris übergeben"]),
]
# ---- Anlegen ----
existing = {i["name"]: i["id"] for i in get_all("/issues/")}
wid2id = {}
for i in get_all("/issues/"):
nm = i["name"]
if " · " in nm: wid2id[nm.split(" · ", 1)[0]] = i["id"]
created = 0
for (wid, title, asg, cy, mo, ty, start, target, doks, bby, blk, dod) in ISSUES:
if title in existing:
iid = existing[title]
else:
win = f"{cy} (faellig {target})"
html = desc(doks, ", ".join(bby) if bby else "—", blk, ", ".join(asg), win, dod)
body = {"name": title, "description_html": html, "state": BACKLOG,
"assignees": [M[a] for a in asg], "labels": [lab[ty], lab[f"gate:{cy}"]],
"start_date": start, "target_date": target}
st, d = req("POST", "/issues/", body)
if st >= 400:
print("ISSUE FAIL:", wid, st, d); continue
iid = d["id"]; existing[title] = iid; created += 1
wid2id[wid] = iid
cn = CY[cy]
if cn in cyc: req("POST", f"/cycles/{cyc[cn]}/cycle-issues/", {"issues": [iid], "project": PID})
if mo in mod: req("POST", f"/modules/{mod[mo]}/module-issues/", {"issues": [iid], "project": PID})
print(f"Issues: {created} neu angelegt, {len(ISSUES)-created} bereits vorhanden.")
# ---- Blocker-Links (JIT-Netz) ----
print("\n--- Blocker-Links ---")
title_by_wid = {wid: t for (wid, t, *_ ) in ISSUES}
linkn = 0
for (wid, title, asg, cy, mo, ty, start, target, doks, bby, blk, dod) in ISSUES:
if not bby: continue
iid = wid2id.get(wid)
if not iid: continue
have = {l.get("title","") for l in get_all(f"/issues/{iid}/links/")}
for b in bby:
bid = wid2id.get(b)
if not bid:
print(f" ! Blocker {b} (von {wid}) nicht gefunden"); continue
lt = f"⛔ blocked-by: {b}"
if any(x.startswith(lt) for x in have): continue
url = f"{BASE}/{WS}/projects/{PID}/issues/{bid}/"
st, d = req("POST", f"/issues/{iid}/links/", {"title": lt, "url": url})
if st < 400: linkn += 1
else: print(" link FAIL", wid, "->", b, st, d)
print(f"Blocker-Links: {linkn} neu gesetzt.")
print("\nFERTIG (Phase B).", f"{BASE}/{WS}/projects/{PID}/")
@@ -0,0 +1,250 @@
#!/usr/bin/env python3
"""
HiveGrid -> Plane Ticket-Sync v2 (idempotent).
Legt die 38 v2-Tickets an: Cycles v2-W1..W3 + Label v2/block-2 + Issues über 7 Module
+ JIT-Blocker-Links (inkl. v1->v2-Andockpunkte, die v1-Tickets existieren bereits).
Doku-Permalinks zeigen ins HiveGrid-Gitea-Repo (wie in v1).
Re-Run-sicher: Issues per Name, Links per Titel-Prefix, Cycles/Labels per Name erkannt.
"""
import json, os, sys, time, urllib.request, urllib.error
# ⚠ BOOTSTRAP-GUARD (seit 2026-06-16): Plane ist LIVE + manuell gescrubbt (Umlaute, PWA-Umbau,
# v3-Defers). Dieses Skript matcht Issues per VOLLNAMEN — ein Re-Run nach dem Scrub fände
# umbenannte Tickets NICHT wieder und legte DUPLIKATE an. Laufende Pflege -> scrub_plane.py
# (Working-ID-Match, idempotent). Bewusster Neu-Bootstrap nur mit --force-bootstrap.
if "--force-bootstrap" not in sys.argv:
raise SystemExit(
"✋ Bootstrap gesperrt: Plane ist live + gescrubbt — Re-Run würde Duplikate erzeugen.\n"
" Laufende Änderungen -> .planning/plane-sync/scrub_plane.py (idempotent).\n"
" Echter Neu-Bootstrap nur bewusst mit --force-bootstrap."
)
TOK = {}
for line in open(os.path.expanduser("~/.cli-tokens/plane")):
line = line.strip()
if "=" in line and not line.startswith("#"):
k, v = line.split("=", 1); TOK[k.strip()] = v.strip()
BASE = TOK["PLANE_BASE_URL"].rstrip("/"); WS = TOK["PLANE_WORKSPACE"]; KEY = TOK["PLANE_API_KEY"]
PID = "35d0d968-8ab3-40cc-97b8-b81d917dc5df"
API = f"{BASE}/api/v1/workspaces/{WS}/projects/{PID}"
GITEA = "https://git.tool-ctrl.de/toolctrl-labs/HiveGrid-Cloud/src/branch/main"
M = {"raffael":"8e34a88c-19c9-4565-b4f5-50415d623ce8","akeshan":"8bf43e86-dc8a-4963-b57a-aeb5f2cc450a",
"david":"6c1fc63f-133d-4f40-86e4-7f658a6edcc7","dejan":"a5883f5e-3038-453c-9401-39ab1f40be9e",
"haris":"48367c1f-20d2-44f1-8ae2-faf35aa2052a"}
def _once(method, url, body):
r = urllib.request.Request(url, data=json.dumps(body).encode() if body is not None else None, method=method)
r.add_header("X-API-Key", KEY); r.add_header("Content-Type", "application/json")
try:
with urllib.request.urlopen(r, timeout=30) as resp:
raw = resp.read().decode(); return resp.status, (json.loads(raw) if raw else {})
except urllib.error.HTTPError as e:
return e.code, {"_error": e.read().decode()[:300]}
def req(method, path, body=None):
url = path if path.startswith("http") else API + path
st, d = 0, {}
for _ in range(8):
st, d = _once(method, url, body)
if st == 429:
time.sleep(25); continue
time.sleep(1.1)
return st, d
return st, d
def get_all(path):
out, cursor = [], None
while True:
st, d = req("GET", path + (("?cursor=" + cursor) if cursor else ""))
if st >= 400: print("GET FAIL", path, st, d); break
if isinstance(d, list): out += d; break
out += d.get("results", [])
if d.get("next_page_results") and d.get("next_cursor"): cursor = d["next_cursor"]
else: break
return out
states = {s["name"]: s["id"] for s in get_all("/states/")}
BACKLOG = states["Backlog"]
# ---- v2-Cycles (idempotent) ----
CYCLES = [
("v2-W1 — Public-API/Postfach/Abo/KI-Start", "2026-07-13", "2026-07-19"),
("v2-W2 — KWP/Portal/Mobile-Start", "2026-07-20", "2026-07-26"),
("v2-W3 — Admin/Help/Dashboard/v2-Launch", "2026-07-27", "2026-07-31"),
]
existing_cycles = {c["name"]: c["id"] for c in get_all("/cycles/")}
cyc = dict(existing_cycles)
for name, start, end in CYCLES:
if name not in cyc:
st, d = req("POST", "/cycles/", {"name": name, "start_date": start, "end_date": end, "project_id": PID})
if st < 400: cyc[name] = d["id"]; print("Cycle angelegt:", name)
else: print("Cycle FAIL:", name, st, d)
W = {"v2-W1": CYCLES[0][0], "v2-W2": CYCLES[1][0], "v2-W3": CYCLES[2][0]}
# ---- Module + Labels (idempotent; Module existieren aus v1) ----
mod = {m["name"]: m["id"] for m in get_all("/modules/")}
lab = {l["name"]: l["id"] for l in get_all("/labels/")}
for name, color in {"v2": "#0d9488", "block-2": "#b91c1c"}.items():
if name not in lab:
st, d = req("POST", "/labels/", {"name": name, "color": color})
if st < 400: lab[name] = d["id"]; print("Label angelegt:", name)
# ---- Doku-Pfade ----
RM, RV2, EX, TL = ".planning/ROADMAP.md", ".planning/ROADMAP-V2.md", ".planning/EXTERNALS-CHECKLISTE.md", ".planning/TIMELINE.md"
RECUT = "docs/milestones/M19-KWP-API-RECUT.md"
def sp(x): return f"_bmad-output/specs/{x}"
def ho(p): return f".planning/handouts/{p}"
def link(path, sec): return f'<a href="{GITEA}/{path}">{path.split("/")[-1]} — {sec}</a>'
def desc(doks, bby, blk, owner, win, dod):
dl = "<br/>".join(link(p, s) for p, s in doks)
li = "".join(f"<li>{d}</li>" for d in dod)
return (f"<p><b>📚 Doku</b><br/>{dl}</p>"
f"<p><b>⛔ blocked-by:</b> {bby or '—'}<br/><b>➡️ blocks:</b> {blk or '—'}<br/>"
f"<b>👤 Owner:</b> {owner} &nbsp;·&nbsp; <b>🗓 Fenster:</b> {win}</p>"
f"<p><b>✅ Definition of Done</b></p><ul>{li}</ul>")
RA, AK, DA, DJ, HA, NO = "Raffael (Dev)", "Akeshan (Dev)", "David (Screens)", "Dejan (Website)", "Haris (Vertrieb)", "Noah (Validierung)"
def I(wid, t, a, c, mo, ty, extra, s, tg, dk, bb, bl, dod): return (wid, t, a, c, mo, ty, extra, s, tg, dk, bb, bl, dod)
ISSUES = [
# ---- EXTERNALS ----
I("VEXT-1","VEXT-1 · KWP-API-Zugang nutzen + Recut-Detailplanung gegen API-Doku",["raffael"],"v2-W2","Externals","typ:external",["block-2"],"2026-07-20","2026-07-20",
[(RM,"Phase 32"),(RECUT,"Recut bindend")],"—","VR-P32a, VN-1",["KWP-API-Zugang aktiv (Auth/Endpoints/Webhook-Support geklärt)","Recut-Detailplanung pro Milestone gegen echte Doku","kwpsync.exe NICHT bauen"]),
I("VEXT-2","VEXT-2 · HalloPetra-Spec erheben (API-Vertrag)",["raffael"],None,"Externals","typ:external",["block-2"],"2026-07-27","2026-07-29",
[(RM,"Phase 33")],"—","VR-P33",["HalloPetra-API-Vertrag erhoben (Auth/Webhook-Events/Recording/Call-Lifecycle)","auf TelephonyProviderInterface gemappt"]),
I("VEXT-3","VEXT-3 · Memberspot/Boobora-Spec erheben (HR-Drittanbieter)",["akeshan"],None,"Externals","typ:external",["block-2"],"2026-07-27","2026-07-29",
[(RM,"Phase 34")],"—","VA-P34",["Drittanbieter-API-Vertrag erhoben (Sync-Richtung/Datenkategorien)","auf Apps-Engine-Adapter gemappt"]),
I("VEXT-4","VEXT-4 · App-Store-Einreichung Apple + Google (TestFlight/interner Track)",["akeshan"],"v2-W3","Externals","typ:external",[],"2026-07-28","2026-07-28",
[(RM,"Phase 27"),(TL,"v2-Externals")],"VA-P27b","VJ-3 (Badges)",["Build eingereicht Apple + Google","TestFlight/interner Track sofort nutzbar","Privacy-Manifest + Demo-Account beigelegt"]),
I("VEXT-5","VEXT-5 · Gmail-Restricted-Scope-Verifizierung nachhalten",["raffael"],"v2-W1","Externals","typ:external",[],"2026-07-13","2026-07-19",
[(EX,"A2")],"—","VA-P23 (Gmail-Breite)",["Google-OAuth-App-Verification verfolgt (Antrag lief v1 EXT-13)","Outlook + Gmail-Testmodus als Brücke"]),
# ---- RAFFAEL ----
I("VR-P22a","VR-P22a · Public-API: OpenAPI + Read-Endpoints (M161)",["raffael"],"v2-W1",RA,"typ:phase",["v2"],"2026-07-13","2026-07-15",
[(RM,"Phase 22"),(sp("M34-public-api.md"),"Read-API")],"R-P2b (ApiKey)","VR-P22b",["GET contacts/companies/deals/projects/tasks/leads cursor-paginiert + Filter/Sort/Sparse-Fieldsets","read_only-Scope lässt sensible Felder aus (nicht 403)","OpenAPI-3.1 auto-generiert + Swagger-UI"]),
I("VR-P22b","VR-P22b · Public-API: API-Key-Auth/Scopes/Rate-Limit (M162/M027) + Webhooks (M163)",["raffael"],"v2-W1",RA,"typ:phase",["v2"],"2026-07-15","2026-07-17",
[(RM,"Phase 22"),(sp("M34-public-api.md"),"Auth/Webhooks")],"VR-P22a, R-P12a (Automation external_event)","—",["API-Key-Auth + Scopes + Rate-Limit (1k/h Key, 10k/h Tenant) + X-RateLimit-Header","Incoming-Lead-Webhooks (HMAC/Token) + Auto-Match","Ausgehende WebhookSubscriptions HMAC-signiert, Retry/Backoff, Auto-Disable nach 10 Fehlern"]),
I("VR-P25","VR-P25 · KI-Tiefe: HiveMind/RAG + Whisper + pgvector-Hybrid (M087)",["raffael"],"v2-W1",RA,"typ:phase",["v2"],"2026-07-18","2026-07-20",
[(RM,"Phase 25"),(sp("M18-ki-layer.md"),"RAG/HiveMind")],"R-P13 (Gateway), R-P11a (Outbox/Suche)","VA-P24b (KI-Coach), VA-P29 (RAG-Korpus retro)",["Embedding-Pipeline → TenantEmbedding (pgvector), Permission-Pre-Filter vor Vector-Search","Hybride globale Suche (Volltext+Vektor RRF) + Whisper-EU async","HiveMind-Agent mit Action-Boundary (keine Schreib-Aktion ohne Bestätigung)"]),
I("VR-P32a","VR-P32a · KWP: Connector + Health + Push-Queue (M089/090/091)",["raffael"],"v2-W2",RA,"typ:phase",["v2","block-2"],"2026-07-20","2026-07-22",
[(RM,"Phase 32"),(sp("M19-kwp-integration.md"),"KWP"),(RECUT,"Recut bindend")],"R-P5 (Apps-Engine M33a), VEXT-1","VR-P32b",["KWP-Connector hinterm M33a-Adapter-Interface, Creds per-Tenant-DEK","Connection-Health-Probe (generisch, statt Heartbeat)","Push-Queue via Cloud-Outbox + Rate-Limited-Replay"]),
I("VR-P32b","VR-P32b · KWP: Contract-Sentinel + Konflikt 'KWP gewinnt' (M092/093)",["raffael"],"v2-W2",RA,"typ:phase",["v2","block-2"],"2026-07-22","2026-07-24",
[(RM,"Phase 32"),(RECUT,"Contract-Sentinel")],"VR-P32a","VR-P32c",["API-Contract-Sentinel (zod-Validierung + Versions-Check) pausiert Sync bei Drift + Admin-Alarm","Konflikt 'KWP gewinnt' (LWW + Audit-Restore über rolledBackData)","Optimistic Locking HiveGrid-seitig"]),
I("VR-P32c","VR-P32c · KWP: Plantafel-Sync + Doku-Archiv + Task-ERP-Sync (M094/095/074)",["raffael"],"v2-W2",RA,"typ:phase",["v2","block-2"],"2026-07-24","2026-07-26",
[(RM,"Phase 32"),(RECUT,"Sync-Familie")],"VR-P32b, R-P9b (Plantafel/Auftrag)","VN-2 (E2E 24.)",["Plantafel-Sync bidirektional über die API","Dokumenten-Archiv-Sync KWP→@toolctrl/storage","Task-ERP-Sync (M074), idempotent über AppSyncItem; E2E mit Geerkens Fr 24.07."]),
I("VR-P28a","VR-P28a · AdminUser-Welt + AdminRBAC (M038/039)",["raffael"],"v2-W3",RA,"typ:phase",["v2"],"2026-07-27","2026-07-29",
[(RM,"Phase 28"),(sp("M37-plattform-admin.md"),"AdminUser/RBAC")],"AK-P19 (Admin-Welt-Fundament)","VR-P31, VA-P28b",["Eigene AdminUser-Klasse, kein BYPASSRLS, eigene Cookies SameSite=Strict","AdminRBAC + 2FA-Pflicht + Self-Permission-Schutz (letzter super_admin)","AdminAuditLog cross-tenant mit Reason-Pflicht + Impersonate mit Reason+Banner"]),
I("VR-P33","VR-P33 · Telefonie-Erweiterung HalloPetra (M105)",["raffael"],None,RA,"typ:phase",["v2","block-2"],"2026-07-29","2026-07-31",
[(RM,"Phase 33"),(sp("M12-telefonie.md"),"Provider-Pattern")],"AK-P15a (TelephonyProviderInterface), VEXT-2","—",["HalloPetra-Adapter implementiert TelephonyProviderInterface ohne Kern-Umbau","Webhook-Auto-Match auf Contact/Lead/Deal + Activity + Automation-Trigger","⚠ Vorlauf-Spec VEXT-2 nötig (HalloPetra in keiner Spec)"]),
I("VR-P31","VR-P31 · DSGVO-Vollausbau: AVV/Subprozessoren/Auskunft (M166)",["raffael"],"v2-W3",RA,"typ:phase",["v2"],"2026-07-29","2026-07-31",
[(RM,"Phase 31"),(sp("M35-dsgvo-export.md"),"DSGVO")],"AK-P21 (DSGVO-Fundament), VR-P28a (Admin-Legal)","—",["AVV-Versionierung + dynamisches PDF + elektronische Akzeptanz + Re-Akzeptanz-Frist (14 Tage → Read-Only)","Subprozessoren-Liste + Drittland-Warnung + 14-Tage-Widerspruchs-Workflow","User/Tenant-Voll-Export (ZIP, async, 7-Tage-Window) + Lösch-Workflow (Grace + Hard-Delete-Cron)"]),
# ---- AKESHAN ----
I("VA-P24a","VA-P24a · Self-Service-Abo-Baukasten-UI (M28-Delta)",["akeshan"],"v2-W1",AK,"typ:phase",["v2"],"2026-07-13","2026-07-15",
[(RM,"Phase 24"),(sp("M28-subscriptions-billing.md"),"Block P Self-Service")],"AK-P20 (Billing-Fundament)","VA-P24b",["Self-Service-Trial ohne Vertriebs-Freigabe (Zahlungsmethode-Pflicht)","Modul-Toggle + Preis-Vorschau (Abo-Baukasten)","App-Store-konform (kein Pricing-UI in Mobile, Web-Flow)"]),
I("VA-P23","VA-P23 · Postfach-Sync: Gmail/Outlook OAuth + Inbox + Threading + Versand (M096-098)",["akeshan"],"v2-W1",AK,"typ:phase",["v2"],"2026-07-13","2026-07-17",
[(RM,"Phase 23"),(sp("M09-email-inbox.md"),"OAuth-Sync/Inbox")],"R-P5 (Apps-Engine), R-P6 (CRM-Match), AK-P14a (Sende-Domain)","—",["OAuth-Connect Gmail (Pub/Sub) + Outlook (Graph + 3-Tage-Renewal-Worker)","Push-Sync + Auto-Match (From/Subject/1-Deal) mit manuellem Override","Inbox-Liste + Thread-Detail (sicherer HTML-Render) + Reply/Forward; read_own/read_all"]),
I("VA-P24b","VA-P24b · Onboarding-Wizard-UI (M157)",["akeshan"],"v2-W1",AK,"typ:phase",["v2"],"2026-07-18","2026-07-20",
[(RM,"Phase 24"),(sp("M29-onboarding.md"),"Wizard")],"VA-P24a, VR-P25 (KI-Coach retro)","—",["Wizard resumebar, Step-Validierung, Rückwärts-Block nach irreversiblen Actions","SHK-Branchen-Template deklarativ geseedet (weitere Branchen 'coming soon')","Erste-Schritte-Checkliste + Demo-Daten-Bulk-Löschung"]),
I("VA-P26a","VA-P26a · Customer-Portal: Auth/Magic-Link + Projekt-Sicht + Status-Mails (M141/142) ⭐",["akeshan"],"v2-W2",AK,"typ:phase",["v2"],"2026-07-20","2026-07-21",
[(RM,"Phase 26"),(sp("M15-customer-portal.md"),"Portal")],"AK-P4a (FileEntityLink), R-P6 (CRM), R-P9a (Project)","VA-P26b",["Eigene PortalUser-Klasse getrennt (Cookies/Routes), Magic-Link primär","Nur eigene Projekte/konfigurierte Stages sichtbar, fehlend → 404","Auto-Status-Mails bei project.stage_changed (Debounce/Bedingungen)"]),
I("VA-P26b","VA-P26b · Customer-Portal: Upload/Reklamation + Subunternehmer/Skalierung/DSGVO (M143-146) ⭐",["akeshan"],"v2-W2",AK,"typ:phase",["v2"],"2026-07-21","2026-07-22",
[(RM,"Phase 26"),(sp("M15-customer-portal.md"),"Portal-Skalierung")],"VA-P26a","VJ-3",["Upload (Kamera/Multi-File) → Files + Activity + PL-Notification","Reklamations-Form + Subunternehmer-Zugang + Skalierungs-Sicht (Service-Inbox)","Tenant-Admin-Konfig (Sichtbarkeit/Templates) + DSGVO-Lösch/Export für PortalUser"]),
I("VA-P27a","VA-P27a · Mobile-App (Expo): Setup + Build + Native-Features Push/Bio/Kamera (M167/168)",["akeshan"],"v2-W2",AK,"typ:phase",["v2"],"2026-07-23","2026-07-25",
[(RM,"Phase 27"),(sp("M36-mobile-app.md"),"Expo-Recut")],"R-P9b (OfflineSyncQueue), AK-P21 (notify-Push)","VA-P27b",["Expo-Setup + EAS-Build-Pipeline","Pre-Cache beim Login + Offline-Write-Queue (Foto/Note/Task/Checklist/Acceptance/Chat)","Push (Apple-Pre-Prompt) + Biometrie (Keychain/Keystore, 2FA bleibt) + Kamera"]),
I("VA-P27b","VA-P27b · Mobile-App: Tab-Bar/Routes + Offline-Sync + Store-Compliance (M169/170/171)",["akeshan"],"v2-W3",AK,"typ:phase",["v2"],"2026-07-25","2026-07-27",
[(RM,"Phase 27"),(sp("M36-mobile-app.md"),"Offline/Compliance")],"VA-P27a","VEXT-4 (Einreichung)",["Native Tab-Bar (Baustelle/Büro) + Mobile-Routes","Sync-on-Reconnect idempotent (lokale UUID) + Konflikt-Resolution","Store-Compliance: kein Pricing-UI (Build-Flag), Account-Löschung, Privacy-Manifest, Deeplinks + Force-Update"]),
I("VA-P29","VA-P29 · Help-Center + Help-Desk (M172-175)",["akeshan"],"v2-W3",AK,"typ:phase",["v2"],"2026-07-28","2026-07-30",
[(RM,"Phase 29"),(sp("M38-help-center.md"),"Help-Center"),(sp("M39-help-desk.md"),"Help-Desk")],"AK-P21 (Feedback-Widget), AK-P19 (Admin)","VJ-2, VR-P25 (RAG-Korpus retro)",["Markdown-Artikel (Frontmatter) + Build-Index + öffentliche Routen ohne Auth + SEO/Suche","Deep-Link Route→Artikel (Hilfe-Icon pro Route)","Feedback-Widget → Feedback + Auto-Kontext; Admin-Feedback-Liste/Detail + Audit"]),
I("VA-P30a","VA-P30a · Dashboard-Deluxe: Custom-Widgets + Export (M149/150)",["akeshan"],"v2-W3",AK,"typ:phase",["v2"],"2026-07-29","2026-07-30",
[(RM,"Phase 30"),(sp("M20-dashboard.md"),"Custom-Widgets/Export")],"R-P11b (Dashboard/Widget-Registry)","—",["Layout anpassbar (Drag/Resize, permission-gegateter Widget-Catalog)","Drilldown pro Kachel + CSV-Export + Report-Versand","Realtime-Updates mit Opt-Out"]),
I("VA-P30b","VA-P30b · Querschnitt: Notif-Bündelung/Quiet-Hours (M117) + Sprach-Wechsler/EN (M029)",["akeshan"],"v2-W3",AK,"typ:phase",["v2"],"2026-07-30","2026-07-31",
[(RM,"Phase 30"),(sp("M22-notifications.md"),"Bündelung"),(sp("M30-i18n.md"),"Wechsler/EN")],"AK-P3 (Notif-Center), R-P1b (i18n-Library)","—",["Notif-Bündelung (5-Min-Window → 1 Push/Mail mit count) + Quiet-Hours (Urgent-Override)","Pro-User-Präferenzen Event×Kanal","Sprach-Wechsler + EN-Locale (DeepL DE→EN mit Review) + Empfänger-Sprach-Auflösung"]),
I("VA-P28b","VA-P28b · Flag-Massen-Statistik (M033) + interne Lead-Pipeline (M040)",["akeshan"],"v2-W3",AK,"typ:phase",["v2"],"2026-07-29","2026-07-31",
[(RM,"Phase 28"),(sp("M32-feature-flags.md"),"Massen-Statistik")],"AK-P19 (Admin), VR-P28a (AdminAudit)","—",["Flag-Massen-Statistik (Effektiv-Auswertung X aktiv/Y nicht + Live-Filter-Vorschau + Bulk-Override)","Deterministische Auswertung (Override > Filter > Default) + Audit","Interne Lead-Pipeline (HiveGrid-eigene Verkäufe)"]),
I("VA-P34","VA-P34 · HR-Drittanbieter-Onboarding Memberspot/Boobora (M138)",["akeshan"],None,AK,"typ:phase",["v2","block-2"],"2026-07-29","2026-07-31",
[(RM,"Phase 34"),(sp("M14-hr-hub.md"),"HR-Onboarding")],"R-P5 (Apps-Engine), AK-P17a (HR-Hub), VEXT-3","—",["HR-Onboarding-Checklisten pro neuem MA (verlinkte Forms/Tasks/Reminders)","Drittanbieter als DataConnection via Apps-Engine (gleicher Mechanismus wie KWP)","⚠ Vorlauf-Spec VEXT-3 nötig (Memberspot/Boobora in keiner Spec)"]),
# ---- DAVID ----
I("VD-1","VD-1 · Screens: Abo-Baukasten-UI + Wizard + Postfach-Inbox",["david"],"v2-W1",DA,"typ:screen",["v2"],"2026-07-13","2026-07-16",
[(RV2,"P23/P24"),(sp("M28-subscriptions-billing.md"),"Self-Service")],"D-D0b (Archetypen)","VA-P24a, VA-P24b, VA-P23",["Abo-Baukasten-UI (Modul-Toggle + Preis-Vorschau) + Wizard-Steps + Postfach-Inbox; 4 Zustände + Reconciliation"]),
I("VD-2","VD-2 · Screens: Portal-Shell (extern sichtbar, eigener Polish)",["david"],"v2-W1",DA,"typ:screen",["v2"],"2026-07-17","2026-07-19",
[(RV2,"P26"),(sp("M15-customer-portal.md"),"Portal-UI")],"D-D0b","VA-P26a, VA-P26b",["Portal-Shell mit eigener Design-Sprache (höchster Polish), Endkunden-Flächen + 4 Zustände"]),
I("VD-3","VD-3 · Screens: Mobile-Shell Expo (Touch, Tab-Bar, Offline-Zustände)",["david"],"v2-W2",DA,"typ:screen",["v2"],"2026-07-20","2026-07-22",
[(RV2,"P27"),(sp("M36-mobile-app.md"),"Mobile-UI")],"D-D0b","VA-P27a, VA-P27b",["Mobile-Shell: native Tab-Bar, Touch-Paradigma, Offline-Zustände, Sync-Queue/Konflikt-View"]),
I("VD-4","VD-4 · Screens: Help-Center (Public-Content-Site)",["david"],"v2-W2",DA,"typ:screen",["v2"],"2026-07-23","2026-07-27",
[(RV2,"P29"),(sp("M38-help-center.md"),"Help-UI")],"D-D0b","VA-P29",["Help-Home/Kategorie/Artikel-Detail/Suche; SEO-Layout"]),
I("VD-5","VD-5 · Screens: Public-API-Keys + Admin-Tiefe + KWP-Setup",["david"],"v2-W2",DA,"typ:screen",["v2"],"2026-07-17","2026-07-22",
[(RV2,"P22/P28/P32")],"D-D0b","VR-P22b, VR-P28a, VR-P32a",["API-Key-/Webhook-Verwaltung + AdminUser/Flag-Statistik + KWP-Setup-Wizard (OAuth/Sync-Vorschau)"]),
I("VD-6","VD-6 · Screens: App-Store-Assets/Screenshots + v2-Politur + Visual-Reg",["david"],"v2-W3",DA,"typ:screen",["v2"],"2026-07-28","2026-07-31",
[(TL,"David v2")],"VD-2, VD-3","VJ-1",["App-Store-Screenshots/Assets (mit Dejan) + v2-Politur extern + Visual-Reg-Baselines"]),
# ---- DEJAN ----
I("VJ-1","VJ-1 · App-Store-Metadaten (Beschreibung/Keywords/Screenshots/Datenschutz)",["dejan"],"v2-W2",DJ,"typ:website",["v2"],"2026-07-20","2026-07-27",
[(ho("dejan/HANDOUT-DEJAN.md"),"App-Store")],"VD-6","VEXT-4",["Store-Listings Apple + Google (Beschreibung/Keywords/Screenshots/Datenschutz-Angaben) einreichbar"]),
I("VJ-2","VJ-2 · Help-Center-Inhalte einpflegen",["dejan"],"v2-W3",DJ,"typ:website",["v2"],"2026-07-28","2026-07-28",
[(ho("dejan/HANDOUT-DEJAN.md"),"Help-Inhalte")],"VA-P29","—",["Help-Center-Artikel (Markdown/Git-PRs) eingepflegt"]),
I("VJ-3","VJ-3 · Website-Update: Portal/Mobile/KWP als Features live + Store-Badges",["dejan"],"v2-W3",DJ,"typ:website",["v2"],"2026-07-31","2026-07-31",
[(ho("dejan/HANDOUT-DEJAN.md"),"Launch-Update")],"VA-P26b, VA-P27b, VR-P32c","—",["Feature-Seiten Portal/Mobile/KWP live + Store-Badges (sobald Freigabe)"]),
# ---- NOAH (Assignees Haris + Dejan) ----
I("VN-1","VN-1 · KWP-Test-Instanz/Testdaten bereitstellen",["haris","dejan"],"v2-W2",NO,"typ:validierung",["v2","block-2"],"2026-07-20","2026-07-23",
[(ho("noah/HANDOUT-NOAH.md"),"KWP-Verprobung")],"VEXT-1","VN-2",["KWP-Test-Instanz + Testdaten bei Geerkens bereit (ab 20.07.)"]),
I("VN-2","VN-2 · KWP-Sync-E2E-Verprobung mit Geerkens",["haris","dejan"],"v2-W2",NO,"typ:validierung",["v2","block-2"],"2026-07-24","2026-07-24",
[(TL,"KWP-E2E 24.07.")],"VR-P32c, VN-1","VH-1",["KWP-Sync-E2E mit echten Geerkens-Testdaten verprobt (Fr 24.07.)"]),
# ---- HARIS ----
I("VH-1","VH-1 · KWP-Sync als Verkaufsargument + weitere Onboardings/Conversions",["haris"],"v2-W2",HA,"typ:vertrieb",["v2"],"2026-07-24","2026-07-31",
[(ho("haris/HANDOUT-HARIS.md"),"AP-6")],"VN-2","—",["KWP-Sync-Referenz (Geerkens) als A-Lead-Argument","weitere Onboardings + Trial-Conversions Richtung 'erste Gelder ≤ Ende Juli'"]),
]
# ---- Anlegen ----
existing = {i["name"]: i["id"] for i in get_all("/issues/")}
wid2id = {}
for i in get_all("/issues/"):
if " · " in i["name"]: wid2id[i["name"].split(" · ", 1)[0]] = i["id"]
created = 0
for (wid, title, asg, cy, mo, ty, extra, start, target, doks, bb, bl, dod) in ISSUES:
new = title not in existing
if new:
win = (f"{cy} (faellig {target})" if cy else f"Backlog/agil (Trigger, Ziel {target})")
html = desc(doks, bb, bl, ", ".join(asg), win, dod)
labels = [lab[ty], lab["v2"]] + [lab[x] for x in extra if x in lab and x != "v2"]
body = {"name": title, "description_html": html, "state": BACKLOG,
"assignees": [M[a] for a in asg], "labels": list(dict.fromkeys(labels)),
"start_date": start, "target_date": target}
st, d = req("POST", "/issues/", body)
if st >= 400: print("ISSUE FAIL:", wid, st, d); continue
iid = d["id"]; existing[title] = iid; created += 1
else:
iid = existing[title]
wid2id[wid] = iid
if cy and W[cy] in cyc:
req("POST", f"/cycles/{cyc[W[cy]]}/cycle-issues/", {"issues": [iid], "project": PID})
if mo in mod:
req("POST", f"/modules/{mod[mo]}/module-issues/", {"issues": [iid], "project": PID})
print(("neu:" if new else "vorhanden:"), wid)
print(f"\nIssues: {created} neu, {len(ISSUES)-created} vorhanden.")
# ---- Blocker-Links (JIT-Netz; blocked_by aus den ⛔-Feldern, Working-IDs extrahiert) ----
print("\n--- Blocker-Links ---")
import re
def parse_bby(s):
# extrahiert Working-IDs am Zeilenanfang/komma-getrennt: "R-P2b (ApiKey), VEXT-1" -> ["R-P2b","VEXT-1"]
ids = re.findall(r'\b(?:V?(?:R|AK|A|D|J|H|N|EXT)[-A-Za-z0-9]*)\b', s)
out = []
for x in ids:
if x in wid2id and x not in out: out.append(x)
return out
linkn = 0
for (wid, title, asg, cy, mo, ty, extra, start, target, doks, bb, bl, dod) in ISSUES:
if not bb or bb == "—": continue
iid = wid2id.get(wid)
if not iid: continue
have = {l.get("title","") for l in get_all(f"/issues/{iid}/links/")}
for b in parse_bby(bb):
bid = wid2id.get(b)
if not bid: continue
lt = f"⛔ blocked-by: {b}"
if any(x.startswith(lt) for x in have): continue
url = f"{BASE}/{WS}/projects/{PID}/issues/{bid}/"
st, d = req("POST", f"/issues/{iid}/links/", {"title": lt, "url": url})
if st < 400: linkn += 1
else: print(" link FAIL", wid, "->", b, st, d)
print(f"Blocker-Links: {linkn} neu gesetzt.")
print("\nFERTIG (v2).", f"{BASE}/{WS}/projects/{PID}/")