Files
werkbaum/docs/examples/example-werkbaum.werkbaum
T
mhoennigandClaude Opus 4.8 aa3e087ee6 notation: + für optionale Knoten — Zugaben statt Pflicht oder Alternative
Die Notation kannte nur „erforderlich" (-) und „wählbar" (|). Ein einzelnes
zusätzliches Feature — weder nötig noch Alternative zu etwas anderem — musste
als normales -Kind notiert werden und log damit. Feature-Modelle (FODA)
unterscheiden seit den 90ern mandatory/optional/alternative; `+` ergänzt die
fehlende zweite Beziehung. Mnemonik: `-` Teilpaket, `+` Zugabe, `|` Alternative.

Anlass ist nicht die Optik, sondern der günstigste Pfad (D18): markCheapest()
lief bei all-of über ALLE Kinder, jede Zugabe steckte also im errechneten
Minimum — systematisch zu groß, und zwar umso mehr, je ehrlicher ein Plan auch
die Kür notiert. Sichtbar wird es beim Alternativenvergleich: eine Alternative
mit teurer Zugabe verlor gegen eine schlichtere, obwohl die Zugabe gar nicht
dazugehört.

- Parser setzt `optional:true` und lässt `type:'and'` stehen — `+` gehört zum
  Knoten, nicht zur Gruppe. Dadurch bleiben gateOf() und die mixedGate-Warnung
  unverändert richtig: sie meldet weiter genau dann, wenn | mit -/+ gemischt
  wird. `-` neben `+` ist erlaubt und still — „diese drei sind nötig, das hier
  wäre schön" ist der Normalfall, nicht der Fehlerfall.
- Aus dem Pfad fallen optionale Knoten über pathChildren() heraus, die eine
  Stelle, die cheapestCost() und markCheapest() gemeinsam nutzen — deshalb
  wirkt es samt Teilbaum.
- Darstellung: hohler Kreis mittig auf der Knotenkante, wo der Abzweig
  auftrifft (FODA-Konvention). Bewusst KEIN dritter Linienstil: im kompakten
  Modus codiert allein der Stil das Gate (D15), gepunktet müsste sich dort
  gegen gestrichelt-grau behaupten. Der Kreis ist orthogonal dazu.
  CSS-Grundfall ist gestapelt (links/50 %), Ausnahme der horizontale Fächer
  (oben/50 %), Rück-Ausnahme der gestapelte all-of-Teilbaum unter any-of (D18)
  — andersherum wären es vier Ausnahmen statt zwei.
- SVG-Export zeichnet den Kreis NACH den Knoten (optMarks, Schritt 3a): er
  liegt halb außerhalb der Box und würde sonst vom Knoten-Rechteck überdeckt.
- Legende, Knoten-Tooltip und aria-label in allen neun Sprachen; hint_root
  formuliert die neue Mischregel.

Bekannte Schwäche, bewusst in Kauf genommen: Bei aktivem Pfad-Umschalter wird
der optionale Knoten ausgeblasst (opacity:.32) — und mit ihm sein Kreis, der
die Erklärung dafür wäre. `opacity` am Elternteil schlägt auf Pseudoelemente
durch, das lässt sich nicht zurücknehmen. Das Zurücktreten ist hier die
Hauptaussage (wie bei nicht gewählten Alternativen), Tooltip/aria/Legende
liefern die Begründung nach.

Verhaltensänderung: `+` am Zeilenanfang ist jetzt ein Zeichen und nicht mehr
Teil des Labels (`+ 5 % Puffer` ergibt „5 % Puffer"). Test-abgedeckt.

SPEC §1/§3/§9/§10 zuerst, dann Code (CLAUDE). Das kanonische Beispiel in §10
enthält jetzt eine `+`-Zeile und ist mit der Test-Fixture wieder deckungsgleich.
Der mitgelieferte Werkbaum-Plan markiert Drucklayout, „Was ist neu?" und die
Personenfarben als Zugaben — „Was ist neu?" war der Auslöser der Frage.

Verifiziert: 12 neue Tests (Parser setzt optional/type; Status/Größe/Tags/URL
am +-Knoten; führendes + wird verbraucht; Pfad lässt Zugabe samt Teilbaum aus;
Kosten des Elternknotens ohne Zugabe; Alternativenvergleich ohne Zugaben;
optionale Knoten bleiben sichtbar; opt-Klasse; keine Warnung bei -/+; Warnung
bei |/+; aria-label). Vitest 58/58, Snapshot zeigt `node opt` OHNE `cheap`.
Im Browser in allen drei Modi angesehen: Kreis sitzt in horizontal oben mittig,
in vertikal und kompakt links auf halber Höhe, jeweils genau auf dem Ende des
Abzweigs; SVG-Export enthält beide Kreise an denselben Punkten (gerendert
geprüft, nicht nur im Quelltext).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-27 20:58:52 +02:00

101 lines
4.4 KiB
Plaintext

%% Werkbaum, planned with Werkbaum — what exists today and where it could go.
%% Distilled from docs/ROADMAP.md, docs/TASKS.md and docs/DECISIONS.md.
[~] Werkbaum (XXL) https://github.com/mhoennig/werkbaum
- [^] Notation (L)
- [^] Line format (M)
- [^] Status box, eight states (S)
- [^] T-shirt size and the "decompose from M" rule (S)
- [^] People tags, bare URLs, %% comments (XS)
- [^] And/or decomposition (S)
- [^] Optional nodes — neither required nor an alternative (S)
- [-] A separate storage format for the structure (L) %% the text is the format
- [ ] Ticket references #123 (S)
- [?] Benefit per node, not only cost (M)
| [?] Another sigil next to the size (S)
| [?] Story points behind the T-shirt sizes (M)
- [~] Editor (XL) https://werkbaum.javagil.de
- [^] Live diagram from text (M)
- [^] Parser (S)
- [^] Renderer, three layout modes (M)
- [^] Horizontal fan (S)
- [^] Vertical, transposed (S)
- [^] Compact (S)
- [^] Cheapest path (M)
- [^] Cost model, missing size counts as M (S)
- [^] Metro-map line through the leaves (S)
- [^] Export (M)
- [^] SVG and PNG download (S)
- [^] PNG to the clipboard (S)
+ [^] Print stylesheet (XS)
- [^] Nine interface languages (M)
- [^] Translations (S)
- [^] Default taken from the browser (XS)
- [^] Accessibility: aria labels, focus order (S)
- [^] Works on a phone (S)
- [^] Several documents in one editor (M)
- [^] Switcher in the editor title bar (S)
- [^] Load a document from ?sourceUrl= (S)
- [^] Jump between diagram and text (S)
+ [^] Show what is new since your last visit (S)
- [ ] Open and save .werkbaum files (S)
+ [?] A pastel colour per person (S)
- [?] Dates and milestones (M)
| [?] An attribute in the line (S)
| [?] A separate timeline view (L)
- [^] Build and delivery (M)
- [^] One self-contained file, bundled by Vite (S)
- [^] Unit tests (S)
- [^] Published on every push (S)
- [-] Deploy through a gh-pages branch (S) %% GitHub Actions instead
- [-] Fonts from Google (XS) %% self-hosted, no third-party request
- [ ] Backend (XL)
- [ ] Kotlin and Spring Boot scaffold (M)
- [ ] Gradle Kotlin DSL, JDK 21 (S)
- [ ] Health endpoint and CI (S)
- [ ] Documents on the server (L)
- [ ] Text plus metadata, no structure format (M)
- [ ] REST endpoints (S)
- [ ] Persistence (S)
- [ ] Share by link (S)
- [?] Accounts and permissions (L)
| [?] Single user, one token (S)
| [?] Log in with OIDC (L)
- [?] Working together on one plan (XL)
- [ ] Git as the shared store (L)
| [ ] A file in a repository, changed by pull request (S) %% works today, no code
| [?] The backend commits every change (L)
- [?] History and restore (M)
- [?] Diff between two versions (S)
- [?] Who changed this line (S)
- [?] A branch per scenario (S)
- [?] Live editing, several people at once (XL)
- [ ] Transport over a websocket (S) %% the easy half
- [!] Merging simultaneous edits (L) %% the actual work
| [?] Text CRDT — the plan is plain text, so it fits (L)
| [?] Operational transformation (XL)
- [?] Cursors and who else is here (S)
- [-] A merge algorithm of our own (XL) %% solved problem, do not reinvent
- [?] Mermaid plugin (XL)
- [!] A layout engine of its own (XL) %% measure, place, route — the real work
- [ ] Measure node sizes (M)
- [ ] Text metrics without a browser (S)
- [ ] Badges and tags inside the box (S)
- [ ] Place nodes and route connectors (L)
- [ ] All-of fan (M)
- [ ] Horizontal (S)
- [ ] Transposed (S)
- [ ] Any-of rail (S)
- [?] Registration with Mermaid (M)
| [?] External diagram, self-hosted pages only (M)
| [?] Pull request into Mermaid itself (L)
- [?] Tracker integration (XL)
| [?] Taiga (L) https://taiga.io
- [ ] Resolve #123 over the REST API (M)
- [ ] Read title, link and status (S)
- [ ] Map the workflow onto the states (S)
- [?] Write the status back (M)
- [-] A plugin inside Taiga itself (L) %% legacy frontend, self-hosted only
| [?] Tenzu, the successor (XXL) https://tenzu.net
| [ ] No tracker, plain text is enough (XS)