Paliadin — in-app AI buddy / pet (Clippy-but-cool, RAG over paliad data, Anthropic backend, mlex reuse) #9
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Goal
Add Paliadin — paliad's in-app AI buddy/pet. m's framing (2026-05-07 20:31):
The Paliadin is a chat-style AI assistant that:
/lex*skill familyWhat Paliadin is NOT (anti-scope)
Sketch
A persistent chat panel docked into the paliad UI (right-side drawer? bottom-right floating? top-bar drop-down?), accessible from every page. User types a question, Paliadin replies in markdown, can:
Open design questions (for inventor — m will answer in design pass)
Architecture + LLM backend
search_deadlines,lookup_court,compute_fristetc.) — natural fit with Claude's tool API.mlexcodebase, inventory which adapters / prompt templates / RAG primitives carry over. Document the seams. Same for the/lex*skill family — which patterns translate.cassandra(lexy role) per classification batch. Does Paliadin spawn a one-off worker per session, OR run as a long-lived service Claude API call? Recommend the latter for latency; the former matches the existing "agent-as-skill" pattern already deployed.Data access + RLS
can_see_project+ derivation per t-139)UX
Token budget + cost
paliad.paliadin_sessionswith PII-aware redaction.Tool surface
search_deadlines,search_termine,get_project,lookup_court,lookup_glossary,compute_frist,search_youpc_casescreate_deadline,attach_partner_unit, etc. — out of scope v1? Inventor: scope.mlex's tool definitions + which translate (court lookup likely yes, judgment classification likely paliad-irrelevant).Phasing
search_my_deadlines,search_my_termine,lookup_court,lookup_glossarypaliadinname in bubble header)References
mlexproject — inventory in design pass (location TBD; inventor confirms with m)/lex*skills —~/.claude/skills/lex*family (lex-research, lex-classify, lex-extract, lex-classify-patent)lexyworker pattern —mai-lexyskill, classification pipeline (cassandra worker example)claude-apiskill —~/.claude/skills/claude-api/for SDK + tool-use shapeANTHROPIC_API_KEYenv var (per project CLAUDE.md, "Reserved for Phase H — do not set" — this is the un-deferral)lookup_courttool source)Inventor brief
mai/noether/inventor-paliadindocs/design-paliadin-2026-05-07.md. Five coordinated sub-designs:mlexproject during the design pass (m: confirm location). Map which adapters/prompts/tools translate. Same for the/lex*skill family. Don't reinvent.Shipped to main (commit
fc7192c)What landed
paliad.paliadin_turnsaudit tableinternal/services/paliadin.go— tmux orchestration + audit row writer + dashboard stats (withIsOwneremail gate)internal/services/paliadin_prompt.go— system prompt + 9 SQL recipes (paliad data + cross-schema youpc case-law)internal/handlers/paliadin.go— POST /api/paliadin/turn + SSE relay + admin endpoints, all gated byrequirePaliadinOwner/paliadinchat panel (citation chips, EventSource, localStorage history, starter prompts)/admin/paliadinmonitoring dashboard (daily counts, classifier histogram, tool-use rate, top prompts, recent turns)Gating change (m's call 21:52)
Dropped the
PALIADIN_ENABLEDenv-var toggle ("bad form"). Replaced with an in-code per-request gate:services.PaliadinOwnerEmail(matthias.siebels@hoganlovells.com). Every other authenticated user gets a 404 — pretend the route doesn't exist. Sidebar entries hidden by default, revealed by/api/meon owner.Production safety
Routes register on every paliad deploy (paliad.de included), but the gate makes them invisible to non-m users. The Dokploy container has no
tmux/claudeCLI, so even m hitting the route from prod gets "tmux unavailable" — clear failure, not a security concern.Try it locally
What's NOT in v1 (deliberate per design §0.5.9)
Anthropic API client, BYO-AI, per-user rate limiting, multi-replica SSE bus, mascot SVG, persistent threads. All gated on the §0.5.7 expansion criteria (≥3 turns/working-day, ≥50% tool-use rate, 4 weeks).
Feature branch
mai/noether/inventor-paliadin-in-appis now reachable from main; safe to delete or keep as audit trail.