Eskalation, Konflikt und Beschluss als eigene Vorgaenge (#689, Stufe 1+2)

- Cases/Decisions in der Instanz-DB; CaseDesk fuehrt die Regeln, der Brett-Task traegt
  den Vorgang zum jeweiligen Halter
- Eskalation nur nach oben, eine Ebene je Schritt; die Leitung entscheidet (mit Begruendung,
  bindet ihren Bereich), erledigt selbst oder reicht mit Einschaetzung weiter
- Erst nachsehen: bindende Beschluesse werden vor dem Eskalieren gezeigt; dieselbe Frage
  aus derselben Einheit schliesst sich dem offenen Vorgang an
- Tagesdeckel je Einheit; nach der Frist wird ein Mensch gerufen (Anschluss fuer #644)
- Konflikt: zuerst die Gegenseite, dann Zustellung an die niedrigste gemeinsame Leitung;
  Ebenen dazwischen vermerkt, nicht befragt
- Fremdinhalt-Stufe (#715): Eskalation ohne eigenen Text, kein Konflikt mit Position
- Jede Ebene haengt an (#697), beim Halter gerahmt als Daten
- Escalation ist ein implizites Werkzeug jedes Agenten; Briefing nennt den Weg
- Scanner behaelt einen im Lauf gesetzten Status blockiert/abgebrochen

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Richard
2026-09-25 09:46:20 +02:00
co-authored by Claude Opus 5.5
parent c03664cf29
commit 36fe1ad2aa
19 changed files with 1878 additions and 7 deletions
@@ -46,6 +46,9 @@ public sealed record AgentToolContext(
/// #715: The calling agent's trust tier, from its tools. Tools that let an agent write to
/// someone above it check the way up here. Standard in tests and outside the engine.
/// </summary>
/// <summary>#689: The desk for escalations, conflicts and decisions. <c>null</c> outside the engine.</summary>
public Cases.ICaseDesk? Cases { get; init; }
/// <summary>#697: The run this call belongs to — for stamping where something came from.</summary>
public string? RunId { get; init; }
+10 -1
View File
@@ -5,6 +5,15 @@ namespace ClawdDotNet.Core.Tools;
public sealed class ToolRegistry
{
private readonly Dictionary<string, IAgentTool> _tools = new();
/// <summary>
/// #689: Tools every agent has, without being granted them. Escalation is one: a case
/// nobody can raise is a case nobody solves — being able to say "I cannot get on" is not a
/// permission, it is part of working in an organisation.
/// </summary>
public static readonly IReadOnlySet<string> ImplicitTools =
new HashSet<string>(StringComparer.OrdinalIgnoreCase) { Cases.CaseDesk.ToolName };
private readonly Lock _lock = new();
public void Register(IAgentTool tool)
@@ -23,7 +32,7 @@ public sealed class ToolRegistry
{
lock (_lock)
return _tools.Values
.Where(t => agent.Tools.ContainsKey(t.Name))
.Where(t => agent.Tools.ContainsKey(t.Name) || ImplicitTools.Contains(t.Name))
.ToList();
}