Skip to content

Self-hosted project management for devs and their clients: tickets, time tracking, docs and meetings, with an AI assistant that cites its sources. AGPL-3.0.

State the rule for actors, finders, policies and guards

Guido Boyked1f745311101
diff --git a/app/services/CLAUDE.md b/app/services/CLAUDE.md
index 8c7fbe7..78bb69a 100644
--- a/app/services/CLAUDE.md
+++ b/app/services/CLAUDE.md
@@ -1,4 +1,4 @@
-# Karte: app/services (Stand: 2026-10-31)
+# Karte: app/services (Stand: 2026-11-01)
**Entry-Point-Konvention für NEUE Services: `Klass.call(**kwargs)`** (Klassenmethode; eine
Instanz-`#call`-Implementierung dahinter ist erlaubt). Pflicht: mindestens 1 Kommentarzeile
@@ -13,6 +13,12 @@ Ausgenommene Subtrees mit eigenem Vertrag: `actors/`, `lalabase/tools/`).
„Actor-Pattern", Guard: `spec/services/actors/actor_contract_guard_spec.rb`). Triviales
Einzel-`update!` ohne Side-Effects bleibt im Controller.
+* An actor writes and checks no rights.
+* Finding belongs to one object per domain (`Tickets::ReadableForToken`, `Tickets::RelationAccess`, `People::Lookup`); they share the question, not code.
+* The policy decides yes or no.
+* The caller words the answer (status, text, 404 form).
+* A guard holds where a mistake discloses data (`ticket_token_lookup_guard_spec.rb`, `ticket_relation_actor_callers_guard_spec.rb`).
+
Verzeichnis-Übersicht (Auswahl):
* `knowledge/` — `lookup.rb` (`Knowledge::Lookup`, REST R2, 29.10.2026) ist das EINE Lesen
des Wissens eines Projekts (Notizen, Dokumente) nach Titel, für das MCP-Werkzeug