Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Lokale Mac-App (Tauri 2 + React/TypeScript) zum Schreiben und Planen von Romanen
- `core/` ist reines TypeScript ohne DOM und ohne Tauri; dort liegt die testbare Logik (Vitest).
- Die KI schreibt nie Text: `core/ki` darf nur `ProjektLeser` nutzen, nie `ProjektDateisystem`.
- Releases: Tag `v*` → `.github/workflows/release.yml`, Ablauf in `docs/release.md`; Version mit `node scripts/version.mjs <x.y.z>` setzen.
- Commits immer mit Sign-off (`git commit -s`), auch auf Feature-Branches; die CI prüft das DCO. Vergessen → `git rebase --signoff origin/main`, dann `git push --force-with-lease`.
- Keine Inhalte aus privaten Manuskripten ins Repo; Beispiele nur aus dem Demo-Roman in `fixtures/`. Die Git-Hooks in `.githooks/` (aktiv nach `npm install`) blockieren Commits und Pushes mit Begriffen aus `~/.config/plotwerk/sperrliste.txt`; `npm run sperrliste` prüft das ganze Repo.
- Rust liegt unter `/opt/homebrew/opt/rustup/bin` (vor Cargo-Befehlen `export PATH="/opt/homebrew/opt/rustup/bin:$PATH"`).

Expand Down
10 changes: 7 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,13 @@ Damit hängt Git die Zeile `Signed-off-by: Dein Name <deine@mail>` an. Sie best
geschrieben oder darfst ihn einreichen. Vergessene Sign-offs ergänzt
`git rebase --signoff main` und danach `git push --force-with-lease`. Die CI prüft das.

**Warum Apache-2.0 und nicht FSL?** Später soll es optionale bezahlte Zusatzfunktionen geben, etwa
ein KI-Abo, die das Projekt finanzieren. Unter Apache-2.0 darf der Maintainer Beiträge dafür
verwenden. Dein Urheberrecht bleibt bei dir, und du darfst deinen Code weiterhin beliebig nutzen.
**Warum Apache-2.0 und nicht FSL?** Ab Version 1.0 finanziert sich Plotwerk über Lizenzen für die
fertige Mac-App und später über das optionale Abo Plotwerk+ mit eingebauter KI. Unter Apache-2.0 darf der
Maintainer Beiträge dafür verwenden. Dein Urheberrecht bleibt bei dir, und du darfst deinen Code
weiterhin beliebig nutzen.

**Name und Icon** gehören nicht zur Lizenz. Forks und eigene Builds brauchen einen anderen Namen und
ein anderes Icon.

## Verhalten

Expand Down
33 changes: 24 additions & 9 deletions README.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@

- **Your text belongs to you.** Everything is stored as Markdown and JSON in an ordinary folder, for example
in iCloud or OneDrive. You can read it at any time without Plotwerk, say in Obsidian or VS Code.
No account, no cloud, and without an internet connection everything works except the AI.
No account, no cloud, and without an internet connection everything works, even the AI with a local model.
- **The AI never writes.** It makes no wording suggestions and has no write access. It only
observes: contradictions, open threads, timing errors, characters who suddenly sound different. Every
observation needs a verbatim quote from your book, otherwise it is discarded.
Expand Down Expand Up @@ -129,14 +129,23 @@ The interface follows the language of your Mac. You can switch between English a

## Setting up the AI (optional)

Plotwerk works completely without AI. If you want to use the AI check, enter your own access under
*Settings (⌘,)*: the **Claude API** (Anthropic) or **Claude in Microsoft Foundry**. The key is
stored in the macOS keychain, never in the project folder.
Plotwerk works completely without AI. If you want to use the AI check, choose your own access under
*Settings (⌘,)*:

- The **Claude API** (Anthropic) or **Claude in Microsoft Foundry**. Plotwerk is tuned for these.
- **Locally on your Mac** with **Ollama** or **LM Studio**. Then not a single word leaves your Mac, no
key is needed and there are no costs. Good results need a large model and plenty of memory.
- **Other OpenAI-compatible services:** OpenAI, OpenRouter, Qwen (Alibaba Cloud) or your own URL.

Keys are stored in the macOS keychain, never in the project folder. Models other than Claude are not
specifically tuned. But because every note needs a verbatim quote from the book, Plotwerk discards
anything a model cannot back up.

An allowlist governs what goes to the model. Chapter text, titles, names and plan fields are
allowed. Private notes and the “truth behind the scenes” never leave your Mac. Before every run
Plotwerk shows the estimated cost. A check of the whole book (80,000 words) costs roughly $0.50 to $2
with Sonnet. Results are saved and cost nothing when you open them again. Prompts and answers follow the
allowed. Private notes and the “truth behind the scenes” never leave your Mac. With Claude, Plotwerk
shows the estimated cost before every run. A check of the whole book (80,000 words) costs roughly
$0.50 to $2 with Sonnet. Other services get no cost estimate. Results are saved and cost nothing when
you open them again. Prompts and answers follow the
language of the book.

## Building it yourself
Expand All @@ -163,8 +172,12 @@ licensed under Apache-2.0 and confirmed with `git commit -s`; there is no separa

- **English interface:** included since v0.2.0 (Settings → Language), with the English demo novel
“Harbour Lights”. More languages are welcome, see [CONTRIBUTING.md](CONTRIBUTING.md).
- **Plotwerk AI:** an optional subscription that lets the AI work without your own API key. The app
itself stays free, and using your own key remains possible.
- **Free during the beta.** From version 1.0 you can try Plotwerk at your own pace and then unlock it with
a one-time payment, no subscription. The source code stays open, building it yourself stays free.
- **AI your way:** With your own access in the cloud (Claude API, Microsoft Foundry or an
OpenAI-compatible service) or locally on your Mac (Ollama, LM Studio), the AI costs nothing extra.
- **Plotwerk+ (planned):** for everyone who would rather focus on writing than on API keys. The AI is
built right in, as an optional subscription.

## License

Expand All @@ -173,6 +186,8 @@ Plotwerk is licensed under the **[Functional Source License 1.1](LICENSE.md)** (
- ✅ Use it, including for commercially published books: your text belongs to you.
- ✅ Read, change, build the source code for yourself and pass it on.
- ❌ Offer Plotwerk or a derivative as a competing commercial product.
- ❌ Distribute your own builds or derivatives under the name “Plotwerk” or with the Plotwerk icon. The
name and icon are not covered by the license.
- 🔓 Two years after release every version automatically becomes **Apache-2.0**, i.e. fully open source.

© 2026 Leon Machnik
34 changes: 25 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@

- **Dein Text gehört dir.** Alles liegt als Markdown und JSON in einem normalen Ordner, zum Beispiel in
iCloud oder OneDrive. Du kannst ihn jederzeit auch ohne Plotwerk lesen, etwa in Obsidian oder VS Code.
Kein Konto, keine Cloud, und ohne Internet funktioniert alles außer der KI.
Kein Konto, keine Cloud, und ohne Internet funktioniert alles, mit einem lokalen Modell sogar die KI.
- **Die KI schreibt nie.** Sie macht keine Formulierungsvorschläge und hat keinen Schreibzugriff. Sie
beobachtet nur: Widersprüche, offene Fäden, Zeitfehler, Figuren, die plötzlich anders klingen. Jede
Beobachtung braucht ein wörtliches Zitat aus deinem Buch, sonst wird sie verworfen.
Expand Down Expand Up @@ -122,14 +122,24 @@ Voraussetzungen: macOS 12 (Monterey) oder neuer, Apple Silicon oder Intel. Updat

## KI einrichten (optional)

Plotwerk funktioniert vollständig ohne KI. Wer die KI-Prüfung nutzen möchte, trägt unter
*Einstellungen (⌘,)* einen eigenen Zugang ein: **Claude API** (Anthropic) oder **Claude in Microsoft
Foundry**. Der Schlüssel liegt im macOS-Schlüsselbund, nie im Projektordner.
Plotwerk funktioniert vollständig ohne KI. Wer die KI-Prüfung nutzen möchte, wählt unter
*Einstellungen (⌘,)* einen eigenen Zugang:

- **Claude API** (Anthropic) oder **Claude in Microsoft Foundry**. Darauf ist Plotwerk abgestimmt.
- **Lokal auf deinem Mac** mit **Ollama** oder **LM Studio**. Dann verlässt kein Wort den Mac, ein
Schlüssel ist nicht nötig, und es entstehen keine Kosten. Gute Ergebnisse brauchen ein großes Modell
und entsprechend viel Arbeitsspeicher.
- **Andere OpenAI-kompatible Dienste:** OpenAI, OpenRouter, Qwen (Alibaba Cloud) oder eine eigene URL.

Schlüssel liegen im macOS-Schlüsselbund, nie im Projektordner. Andere Modelle als Claude sind nicht
eigens abgestimmt. Weil jeder Hinweis ein wörtliches Zitat aus dem Buch braucht, verwirft Plotwerk
aber alles, was ein Modell nicht belegen kann.

Was an das Modell geht, regelt eine Allowlist. Kapiteltext, Titel, Namen und Plan-Felder sind
erlaubt. Private Notizen und die „Wahrheit hinter den Kulissen“ verlassen den Mac nie. Vor jedem Lauf
zeigt Plotwerk die geschätzten Kosten. Eine Prüfung des ganzen Buchs (80.000 Wörter) kostet mit Sonnet
grob 0,50 bis 2 $. Ergebnisse werden gespeichert und kosten beim erneuten Öffnen nichts.
erlaubt. Private Notizen und die „Wahrheit hinter den Kulissen“ verlassen den Mac nie. Mit Claude
zeigt Plotwerk vor jedem Lauf die geschätzten Kosten. Eine Prüfung des ganzen Buchs (80.000 Wörter)
kostet mit Sonnet grob 0,50 bis 2 $. Für andere Dienste gibt es keine Kostenschätzung. Ergebnisse
werden gespeichert und kosten beim erneuten Öffnen nichts.

## Selbst bauen

Expand All @@ -154,8 +164,12 @@ Apache-2.0 und werden per `git commit -s` bestätigt; einen extra Vertrag gibt e

- **Englische Oberfläche:** seit v0.2.0 enthalten (Einstellungen → Sprache), mit englischem Demo-Roman
„Harbour Lights“. Weitere Sprachen sind willkommen, siehe [CONTRIBUTING.md](CONTRIBUTING.md).
- **Plotwerk KI:** ein optionales Abo, mit dem die KI ohne eigenen API-Schlüssel funktioniert. Die App
selbst bleibt kostenlos, der eigene Schlüssel bleibt weiterhin möglich.
- **Kostenlos während der Beta.** Ab Version 1.0 kannst du Plotwerk in Ruhe ausprobieren und danach mit
einer einmaligen Zahlung freischalten, ohne Abo. Der Quellcode bleibt offen, selbst bauen bleibt kostenlos.
- **KI nach deiner Wahl:** Mit eigenem Zugang in der Cloud (Claude API, Microsoft Foundry oder ein
OpenAI-kompatibler Dienst) oder lokal auf deinem Mac (Ollama, LM Studio) kostet die KI nichts extra.
- **Plotwerk+ (geplant):** für alle, die sich aufs Schreiben konzentrieren möchten statt um API-Schlüssel.
Die KI ist dann direkt eingebaut, als optionales Abo.

## Lizenz

Expand All @@ -164,6 +178,8 @@ Plotwerk steht unter der **[Functional Source License 1.1](LICENSE.md)** (FSL-1.
- ✅ Benutzen, auch für kommerziell veröffentlichte Bücher: Dein Text gehört dir.
- ✅ Quellcode lesen, ändern, für dich selbst bauen und weitergeben.
- ❌ Plotwerk oder einen Ableger als konkurrierendes kommerzielles Produkt anbieten.
- ❌ Eigene Builds oder Ableger unter dem Namen „Plotwerk“ oder mit dem Plotwerk-Icon verteilen. Name und
Icon sind nicht Teil der Lizenz.
- 🔓 Zwei Jahre nach Erscheinen wird jede Version automatisch **Apache-2.0**, also vollständig Open Source.

© 2026 Leon Machnik
1 change: 1 addition & 0 deletions docs/architektur.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ Design: `docs/design/screens/*.dc.html` (verbindlich, Pixelwerte und Farben exak
| E15 | **Dritter Anbieter: OpenAI-kompatibel** (`projekt.ki.anbieter: openai`, Block `ki.openai{vorlage, endpoint, modelle, kontextTokens?}`). Vorlagen Ollama (Standard, `http://localhost:11434/v1`), LM Studio (`:1234/v1`), OpenAI, OpenRouter, Qwen (Alibaba Cloud), eigene URL (`core/ki/anbieter.ts`, `VORLAGEN`). `core/ki` baut weiter Messages-API-Bodys; der Transport übersetzt nach Chat Completions und zurück (`core/ki/openai.ts`: `nachOpenAi`/`vonOpenAi`, Schema als `response_format` json_schema strict, bei Qwen json_object mit Schema im System-Prompt), der Rust-Kern schickt an `{endpoint}/chat/completions` mit `Authorization: Bearer` (Schlüssel optional, Konto `openai-kompatibel`, http nur für localhost, Zeitlimit 30 min). Modelle ohne Claude-Standard (leere Rolle = Prüfmodell). Kein `count_tokens` (Schätzung Zeichen/3), keine Listenpreise (Kosten „keine Angabe“, Ablagen ohne `kostenUsd`). Ist `kontextTokens` gesetzt, lehnt der Transport Anfragen ab, die samt 4 000 Tokens Reserve nicht hineinpassen – lokale Server kürzen sonst still. Andere Modelle als Claude sind nicht abgestimmt; die Zitatprüfung (E6) verwirft, was nicht wörtlich zitiert. | Leons Vorgabe: lokale und andere Modelle |
| E16 | **Funktionsumfang als App-Einstellung** `funktionen` in `einstellungen.json` (Browser-Demo: `localStorage` `plotwerk:funktionen`), nie im Projektordner. Katalog, Presets (Anfänger/Mittel/Profi/Schriftsteller), Abhängigkeiten und eigene Presets in `core/funktionen`. Ausgeblendet ≠ gelöscht: Daten ausgeblendeter Funktionen bleiben im Projekt und im Export. Was ein gespeichertes Profil noch nicht kannte (`bekannt`), wird nach seiner Basis entschieden. Ohne „Plan-Abgleich“ setzt die Prüfung `PruefAuftrag.ohnePlan` (keine Plan-Felder im Kontext). | Einstieg für neue Nutzer, weniger Tokens (2026-10-13) |
| E17 | **No-AI-Modus** (`profil.kiAus`): alle KI-Funktionen ausgeblendet; `mitKiSperre` (src/state/funktionen.ts) umhüllt den KI-Transport des Backends und lehnt `senden` und `tokenZaehlen` ab. | Datenschutz, Arbeiten ohne Zugang (2026-10-13) |
| E18 | **Vertrieb: Testphase, dann einmal bezahlen** (entschieden 2026-10-13). Bis 1.0 ist die App kostenlos (Beta). Ab 1.0 läuft sie eine Testphase lang voll (Länge noch offen, eher 14–30 Tage, gern als Nutzungstage) und wird danach mit einem **Lizenzschlüssel** freigeschaltet, der einmal online aktiviert wird (Merchant of Record Paddle oder Lemon Squeezy mit deren License-API). Einmalzahlung ohne Abo; „unbegrenzt“ wird nicht versprochen, damit eine große neue Version später ein bezahltes Upgrade sein kann. Die DMG bleibt frei herunterladbar. Die Prüfung muss ohne Internet weiter funktionieren (Kulanzzeit) und soll ehrliche Nutzer führen, nicht gängeln; unter FSL darf sie für den Eigengebrauch ausgebaut werden. Quellcode bleibt offen, selbst bauen ist kostenlos. KI mit eigenem Zugang (Cloud-API oder lokal über Ollama/LM Studio, E15) bleibt kostenlos. **Plotwerk+** (geplant): optionales Abo mit eingebauter KI ohne eigenen Schlüssel, serverseitig über einen eigenen Proxy durchgesetzt. Der Update-Feed zieht auf `updates.plotwerk.app` um (Domain vorhanden, Weiterleitung folgt). Name und Icon fallen nicht unter die Lizenz (FSL „Trademarks“). | Nebeneinkommen mit wenig Betrieb und Support |

## Phasen

Expand Down
Loading